summaryrefslogtreecommitdiffstats
path: root/rules/hal.make
blob: b042a3ce50a5c008af348a2c7ee2f0f3ec6c1a1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
# -*-makefile-*-
#
# Copyright (C) 2009 by Robert Schwebel <r.schwebel@pengutronix.de>
#
# See CREDITS for details about who has contributed to this project.
#
# For further information about the PTXdist project and license conditions
# see the README file.
#

#
# We provide this package
#
PACKAGES-$(PTXCONF_HAL) += hal

#
# Paths and names
#
HAL_VERSION	:= 0.5.14
HAL		:= hal-$(HAL_VERSION)
HAL_SUFFIX	:= tar.bz2
HAL_URL		:= http://hal.freedesktop.org/releases/$(HAL).$(HAL_SUFFIX)
HAL_SOURCE	:= $(SRCDIR)/$(HAL).$(HAL_SUFFIX)
HAL_DIR		:= $(BUILDDIR)/$(HAL)

# ----------------------------------------------------------------------------
# Get
# ----------------------------------------------------------------------------

$(HAL_SOURCE):
	@$(call targetinfo)
	@$(call get, HAL)

# ----------------------------------------------------------------------------
# Prepare
# ----------------------------------------------------------------------------

HAL_PATH	:= PATH=$(CROSS_PATH)

# hack alert ... we set the policy validator to always-ok
HAL_ENV 	:= \
	$(CROSS_ENV) \
	ac_cv_prog_POLKIT_POLICY_FILE_VALIDATE=/bin/true

#
# autoconf
#
HAL_AUTOCONF := \
	$(CROSS_AUTOCONF_USR) \
	--localstatedir=/var \
	--enable-shared \
	--enable-static \
	--disable-pci-ids \
	--disable-usb-ids \
	--disable-pnp-ids \
	--disable-ansi \
	--disable-verbose-mode \
	--disable-docbook-docs \
	--disable-man-pages \
	--disable-gtk-doc \
	--disable-acpi-acpid \
	--disable-acpi-proc \
	--disable-acpi-ibm \
	--disable-acpi-toshiba \
	--disable-parted \
	--disable-usb \
	--disable-smbios \
	--disable-acl-management \
	--disable-umount-helper \
	--disable-acpi \
	--disable-apm \
	--disable-pmu \
	--disable-pci \
	--disable-sonypic \
	--without-keymaps \
	--without-imac \
	--with-hal-user=haldaemon \
	--with-hal-group=haldaemon

ifdef PTXCONF_HAL_POLKIT
HAL_AUTOCONF += --enable-policy-kit --enable-console-kit
else
HAL_AUTOCONF += --disable-policy-kit --disable-console-kit
endif

#  --with-os-type=<os>     Distribution or OS (redhat)
#  --with-pid-file=<file>  PID file for HAL daemon
#  --with-hwdata=<dir>     Where PCI and USB IDs are found
#  --with-pci-ids=<dir>    Where PCI IDs are found (overrides --with-hwdata)
#  --with-usb-ids=<dir>    Where USB IDs are found (overrides --with-hwdata)
#  --with-socket-dir=<dir> Location of the HAL D-BUS listening sockets (auto)
#  --with-eject=<path>     Specify eject program. (default /usr/bin/eject)
#  --with-html-dir=PATH    path to installed docs
#  --with-expat=<dir>      Use expat from here
#  --without-libpci        Compile without pci support
#  --with-backend=<name>   backend to use (linux/solaris/freebsd/dummy)
#  --with-deprecated-keys  Add fdi-file to support deprecated/removed keys
#  --with-dbus-sys=<dir>   where D-BUS system.d directory is
#  --with-macbookpro       Whether to build Macbook Pro utils (auto)
#  --with-macbook          Include support for Macbook backlight (auto)
#  --with-omap             Whether to build OMAP utils (auto)
#  --with-cpufreq          Whether to build cpufreq utils (auto)
#  --with-usb-csr          Whether to build addon for wireless USB mice (auto)
#  --with-dell-backlight   Whether to build Dell backlight support (auto)
#  --with-linux-input-header=<path>
#  --with-socket-dir=<dir> Location of the HAL D-BUS listening sockets (auto)
#                          Use an given Linux input.h rather than that
#                          installed on the system (<linux/input.h>)

# ----------------------------------------------------------------------------
# Target-Install
# ----------------------------------------------------------------------------

$(STATEDIR)/hal.targetinstall:
	@$(call targetinfo)

	@$(call install_init, hal)
	@$(call install_fixup, hal,PACKAGE,hal)
	@$(call install_fixup, hal,PRIORITY,optional)
	@$(call install_fixup, hal,VERSION,$(HAL_VERSION))
	@$(call install_fixup, hal,SECTION,base)
	@$(call install_fixup, hal,AUTHOR,"Robert Schwebel <r.schwebel@pengutronix.de>")
	@$(call install_fixup, hal,DEPENDS,)
	@$(call install_fixup, hal,DESCRIPTION,missing)

#	# binaries
	@for i in \
		/usr/bin/hal-is-caller-locked-out \
		/usr/bin/hal-is-caller-privileged \
		/usr/bin/hal-set-property \
		/usr/bin/hal-device \
		/usr/bin/hal-find-by-capability \
		/usr/bin/hal-disable-polling \
		/usr/bin/hal-lock \
		/usr/bin/hal-find-by-property \
		/usr/bin/hal-get-property \
		/usr/bin/lshal \
		/usr/sbin/hald \
		/usr/libexec/hald-probe-net-bluetooth \
		/usr/libexec/hal-storage-unmount \
		/usr/libexec/hal-system-power-pm-is-supported \
		/usr/libexec/hald-probe-video4linux \
		/usr/libexec/hald-probe-storage \
		/usr/libexec/hald-probe-volume \
		/usr/libexec/hal-storage-closetray \
		/usr/libexec/hald-generate-fdi-cache \
		/usr/libexec/hald-probe-pc-floppy \
		/usr/libexec/hal-storage-cleanup-all-mountpoints \
		/usr/libexec/hald-probe-smbios \
		/usr/libexec/hald-probe-ieee1394-unit \
		/usr/libexec/hald-probe-serial \
		/usr/libexec/hald-addon-hid-ups \
		/usr/libexec/hald-addon-rfkill-killswitch \
		/usr/libexec/hald-addon-input \
		/usr/libexec/hald-probe-hiddev \
		/usr/libexec/hald-addon-ipw-killswitch \
		/usr/libexec/hald-probe-input \
		/usr/libexec/hal-storage-mount \
		/usr/libexec/hal-storage-eject \
		/usr/libexec/hald-probe-printer \
		/usr/libexec/hald-addon-storage \
		/usr/libexec/hald-addon-cpufreq \
		/usr/libexec/hal-system-setserial \
		/usr/libexec/hald-runner \
		/usr/libexec/hald-addon-generic-backlight \
		/usr/libexec/hal-storage-cleanup-mountpoint \
		/usr/libexec/hald-addon-leds \
	; do \
		$(call install_copy, hal, 0, 0, 0755, -, $$i); \
	done

#	# non-binaries
	@for i in \
		/usr/share/hal/fdi/fdi.dtd \
		/usr/share/hal/fdi/policy/10osvendor/30-wol.fdi \
		/usr/share/hal/fdi/policy/10osvendor/10-laptop-panel-mgmt-policy.fdi \
		/usr/share/hal/fdi/policy/10osvendor/10-dockstation.fdi \
		/usr/share/hal/fdi/policy/10osvendor/20-storage-methods.fdi \
		/usr/share/hal/fdi/policy/10osvendor/10-input-policy.fdi \
		/usr/share/hal/fdi/policy/10osvendor/10-rfkill-switch.fdi \
		/usr/share/hal/fdi/policy/10osvendor/10-x11-input.fdi \
		/usr/share/hal/fdi/policy/10osvendor/15-storage-luks.fdi \
		/usr/share/hal/fdi/policy/10osvendor/10-cpufreq.fdi \
		/usr/share/hal/fdi/policy/10osvendor/10-tabletPCs.fdi \
		/usr/share/hal/fdi/policy/10osvendor/10-power-mgmt-policy.fdi \
		/usr/share/hal/fdi/policy/10osvendor/10-leds.fdi \
	; do \
		$(call install_copy, hal, 0, 0, 0644, -, $$i); \
	done

ifdef PTXCONF_HAL_POLKIT
	@for i in \
		/usr/share/PolicyKit/policy/org.freedesktop.hal.policy \
		/usr/share/PolicyKit/policy/org.freedesktop.hal.power-management.policy \
		/usr/share/PolicyKit/policy/org.freedesktop.hal.storage.policy \
		/usr/share/PolicyKit/policy/org.freedesktop.hal.wol.policy \
		/usr/share/PolicyKit/policy/org.freedesktop.hal.leds.policy \
		/usr/share/PolicyKit/policy/org.freedesktop.hal.dockstation.policy \
		/usr/share/PolicyKit/policy/org.freedesktop.hal.killswitch.policy \
	; do \
		$(call install_copy, hal, 0, 0, 0644, -, $$i); \
	done
endif

#	# libs
	@$(call install_copy, hal, 0, 0, 0644, -, /usr/lib/libhal.so.1.0.0)
	@$(call install_link, hal, libhal.so.1.0.0, /usr/lib/libhal.so.1)
	@$(call install_link, hal, libhal.so.1.0.0, /usr/lib/libhal.so)

	@$(call install_copy, hal, 0, 0, 0644, -, /usr/lib/libhal-storage.so.1.0.0)
	@$(call install_link, hal, libhal-storage.so.1.0.0, /usr/lib/libhal-storage.so.1)
	@$(call install_link, hal, libhal-storage.so.1.0.0, /usr/lib/libhal-storage.so)

#	# scripts
	@for i in \
		/usr/libexec/scripts/hal-dockstation-undock \
		/usr/libexec/scripts/hal-system-lcd-get-brightness \
		/usr/libexec/scripts/hal-system-killswitch-set-power \
		/usr/libexec/scripts/hal-system-lcd-set-brightness \
		/usr/libexec/scripts/hal-system-power-suspend-hybrid \
		/usr/libexec/scripts/hal-system-power-shutdown \
		/usr/libexec/scripts/hal-system-power-set-power-save \
		/usr/libexec/scripts/linux/hal-system-killswitch-set-power-linux \
		/usr/libexec/scripts/linux/hal-system-killswitch-get-power-linux \
		/usr/libexec/scripts/linux/hal-system-power-set-power-save-linux \
		/usr/libexec/scripts/linux/hal-luks-setup-linux \
		/usr/libexec/scripts/linux/hal-system-wol-linux \
		/usr/libexec/scripts/linux/hal-system-lcd-set-brightness-linux \
		/usr/libexec/scripts/linux/hal-system-power-suspend-hybrid-linux \
		/usr/libexec/scripts/linux/hal-system-lcd-get-brightness-linux \
		/usr/libexec/scripts/linux/hal-system-wol-enable-linux \
		/usr/libexec/scripts/linux/hal-luks-teardown-linux \
		/usr/libexec/scripts/linux/hal-dockstation-undock-linux \
		/usr/libexec/scripts/linux/hal-luks-remove-linux \
		/usr/libexec/scripts/linux/hal-system-power-reboot-linux \
		/usr/libexec/scripts/linux/hal-system-wol-enabled-linux \
		/usr/libexec/scripts/linux/hal-system-power-shutdown-linux \
		/usr/libexec/scripts/linux/hal-system-power-suspend-linux \
		/usr/libexec/scripts/linux/hal-system-wol-supported-linux \
		/usr/libexec/scripts/linux/hal-system-power-hibernate-linux \
		/usr/libexec/scripts/hal-functions \
		/usr/libexec/scripts/hal-system-power-suspend \
		/usr/libexec/scripts/hal-luks-teardown \
		/usr/libexec/scripts/hal-system-wol-enable \
		/usr/libexec/scripts/hal-system-power-hibernate \
		/usr/libexec/scripts/hal-system-wol-enabled \
		/usr/libexec/scripts/hal-system-killswitch-get-power \
		/usr/libexec/scripts/hal-system-wol-supported \
		/usr/libexec/scripts/hal-luks-remove \
		/usr/libexec/scripts/hal-luks-setup \
		/usr/libexec/scripts/hal-system-power-reboot \
	; do \
		$(call install_copy, hal, 0, 0, 0644, -, $$i); \
	done

#	# directories
	@$(call install_copy, hal, 0, 0, 0755, /usr/share/hal/fdi/information/20thirdparty)
	@$(call install_copy, hal, 0, 0, 0755, /usr/share/hal/fdi/preprobe/10osvendor)
	@$(call install_copy, hal, 0, 0, 0755, /usr/share/hal/fdi/preprobe/20thirdparty)
	@$(call install_copy, hal, 0, 0, 0755, /usr/share/hal/fdi/information/10freedesktop)
	@$(call install_copy, hal, 0, 0, 0755, /usr/share/hal/fdi/policy/20thirdparty)
	@$(call install_copy, hal, 0, 0, 0755, /usr/var/run/hald/hald-local)
	@$(call install_copy, hal, 0, 0, 0755, /usr/var/run/hald/hald-runner)
	@$(call install_copy, hal, 0, 0, 0755, /usr/var/cache/hald)
	@$(call install_copy, hal, 0, 0, 0755, /etc/hal/fdi/policy)
	@$(call install_copy, hal, 0, 0, 0755, /etc/hal/fdi/information)
	@$(call install_copy, hal, 0, 0, 0755, /etc/hal/fdi/preprobe)

#	# config files
	@$(call install_copy, hal, 0, 0, 0644, -, /usr/lib/udev/rules.d/90-hal.rules)
	@$(call install_copy, hal, 0, 0, 0644, -, /etc/dbus-1/system.d/hal.conf)

	@$(call install_finish, hal)

	@$(call touch)

# vim: syntax=make