1 DESCRIPTION = "Hardware Abstraction Layer"
2 HOMEPAGE = "http://freedesktop.org/Software/hal"
4 LICENSE = "GPL LGPL AFL"
6 SRC_URI = "http://hal.freedesktop.org/releases/hal-${PV}.tar.gz"
8 S = "${WORKDIR}/hal-${PV}"
10 inherit autotools pkgconfig
12 DEPENDS = "virtual/kernel dbus-glib udev intltool intltool-native expat libusb gperf-native"
13 RDEPENDS += "hal-info udev-utils"
15 SRC_URI += "file://99_hal \
19 LEAD_SONAME = "libhal.so"
21 # machines with pci and acpi get a machine dependant hal
22 EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \
23 --with-expat=${STAGING_LIBDIR}/.. \
24 --with-dbus-sys=${sysconfdir}/dbus-1/system.d \
25 --with-hotplug=${sysconfdir}/hotplug.d \
26 --disable-docbook-docs \
27 --disable-policy-kit \
30 ${@base_contains('COMBINED_FEATURES', 'pci', '--enable-pci --enable-pci-ids', '--disable-pci --disable-pci-ids',d)} \
31 ${@base_contains('MACHINE_FEATURES', 'acpi', '--enable-acpi', '--disable-acpi',d)} \
34 MY_ARCH := "${PACKAGE_ARCH}"
35 PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'acpi', '${MACHINE_ARCH}', '${MY_ARCH}',d)}"
36 PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'pci', '${MACHINE_ARCH}', '${MY_ARCH}',d)}"
39 install -d ${D}/${sysconfdir}/default/volatiles
40 install -m 0644 ${WORKDIR}/99_hal ${D}/${sysconfdir}/default/volatiles
41 install -d ${D}/${sysconfdir}/dbus-1/event.d
42 install -m 0755 ${WORKDIR}/20hal ${D}/${sysconfdir}/dbus-1/event.d
43 rm -rf ${D}/${sysconfdir}/rc.d || true
47 oe_libinstall -C libhal -a -so libhal ${STAGING_LIBDIR}
48 oe_libinstall -C libhal-storage -a -so libhal-storage ${STAGING_LIBDIR}
50 install -d ${STAGING_INCDIR}/hal
51 install -m 0644 libhal/libhal.h ${STAGING_INCDIR}/hal
52 install -m 0644 libhal-storage/libhal-storage.h ${STAGING_INCDIR}/hal
55 # At the time the postinst runs, dbus might not be setup so only restart if running
57 # can't do this offline
58 if [ "x$D" != "x" ]; then
62 grep haldaemon ${sysconfdir}/group || addgroup haldaemon
63 grep haldaemon ${sysconfdir}/passwd || adduser --disabled-password --system --home /var/run/hald --no-create-home haldaemon --ingroup haldaemon -g HAL
65 ${sysconfdir}/init.d/populate-volatile.sh update
67 DBUSPID=`pidof dbus-daemon`
69 if [ "x$DBUSPID" != "x" ]; then
70 ${sysconfdir}/init.d/dbus-1 force-reload
75 deluser haldaemon || true
76 delgroup haldaemon || true
79 FILES_${PN} = "${sysconfdir} \
80 ${bindir}/hal-disable-polling \
81 ${bindir}/hal-setup-keymap \
83 ${bindir}/hal-find-by-capability \
84 ${bindir}/hal-find-by-property \
85 ${bindir}/hal-device \
86 ${bindir}/hal-get-property \
87 ${bindir}/hal-set-property \
89 ${bindir}/hal-is-caller-locked-out \
91 ${libdir}/libhal.so.* \
92 ${libdir}/libhal-storage.so.* \
96 ${datadir}/hal/scripts"