diff options
Diffstat (limited to 'meta/recipes-support/hal/hal.inc')
| -rw-r--r-- | meta/recipes-support/hal/hal.inc | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/meta/recipes-support/hal/hal.inc b/meta/recipes-support/hal/hal.inc new file mode 100644 index 0000000000..839dfd0652 --- /dev/null +++ b/meta/recipes-support/hal/hal.inc | |||
| @@ -0,0 +1,85 @@ | |||
| 1 | DESCRIPTION = "Hardware Abstraction Layer" | ||
| 2 | HOMEPAGE = "http://freedesktop.org/Software/hal" | ||
| 3 | BUGTRACKER = "http://bugs.freedesktop.org/buglist.cgi?product=hal" | ||
| 4 | SECTION = "unknown" | ||
| 5 | |||
| 6 | LICENSE = "GPLv2+ | AFL" | ||
| 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=5b5ffd59fbb7c2fff6de76c94177af31" | ||
| 8 | |||
| 9 | DEPENDS = "virtual/kernel dbus-glib udev util-linux intltool intltool-native expat libusb gperf-native" | ||
| 10 | RDEPENDS += "udev hal-info" | ||
| 11 | |||
| 12 | SRC_URI = "http://hal.freedesktop.org/releases/hal-${PV}.tar.gz \ | ||
| 13 | file://20hal" | ||
| 14 | |||
| 15 | inherit autotools pkgconfig | ||
| 16 | |||
| 17 | |||
| 18 | LEAD_SONAME = "libhal.so" | ||
| 19 | |||
| 20 | # machines with pci and acpi get a machine dependant hal | ||
| 21 | EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \ | ||
| 22 | --with-expat=${STAGING_LIBDIR}/.. \ | ||
| 23 | --with-dbus-sys=${sysconfdir}/dbus-1/system.d \ | ||
| 24 | --with-hotplug=${sysconfdir}/hotplug.d \ | ||
| 25 | --disable-docbook-docs \ | ||
| 26 | --disable-policy-kit \ | ||
| 27 | --disable-pmu \ | ||
| 28 | --disable-pnp-ids \ | ||
| 29 | ${@base_contains('COMBINED_FEATURES', 'pci', '--enable-pci --enable-pci-ids', '--disable-pci --disable-pci-ids',d)} \ | ||
| 30 | ${@base_contains('MACHINE_FEATURES', 'acpi', '--enable-acpi', '--disable-acpi',d)} \ | ||
| 31 | " | ||
| 32 | |||
| 33 | MY_ARCH := "${PACKAGE_ARCH}" | ||
| 34 | PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'acpi', '${MACHINE_ARCH}', '${MY_ARCH}',d)}" | ||
| 35 | PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'pci', '${MACHINE_ARCH}', '${MY_ARCH}',d)}" | ||
| 36 | PACKAGE_ARCH_emenlow := "${PACKAGE_ARCH}" | ||
| 37 | |||
| 38 | do_install_append() { | ||
| 39 | install -d ${D}/etc/dbus-1/event.d | ||
| 40 | install -m 0755 ${WORKDIR}/20hal ${D}/etc/dbus-1/event.d | ||
| 41 | } | ||
| 42 | |||
| 43 | # At the time the postinst runs, dbus might not be setup so only restart if running | ||
| 44 | pkg_postinst_hal () { | ||
| 45 | # can't do this offline | ||
| 46 | if [ "x$D" != "x" ]; then | ||
| 47 | exit 1 | ||
| 48 | fi | ||
| 49 | |||
| 50 | grep haldaemon /etc/group || addgroup haldaemon | ||
| 51 | grep haldaemon /etc/passwd || adduser --disabled-password --system --home /var/run/hald --no-create-home haldaemon --ingroup haldaemon -g HAL | ||
| 52 | |||
| 53 | # add volatile after new user/grp are created | ||
| 54 | echo "d root root 0700 /var/run/hald none" > /etc/default/volatiles/99_hal | ||
| 55 | echo "d haldaemon haldaemon 0755 /var/cache/hald none" >> /etc/default/volatiles/99_hal | ||
| 56 | /etc/init.d/populate-volatile.sh update | ||
| 57 | |||
| 58 | DBUSPID=`pidof dbus-daemon` | ||
| 59 | |||
| 60 | if [ "x$DBUSPID" != "x" ]; then | ||
| 61 | /etc/init.d/dbus-1 force-reload | ||
| 62 | fi | ||
| 63 | } | ||
| 64 | |||
| 65 | pkg_postrm_hal () { | ||
| 66 | deluser haldaemon || true | ||
| 67 | delgroup haldaemon || true | ||
| 68 | } | ||
| 69 | |||
| 70 | FILES_${PN} = "${sysconfdir} \ | ||
| 71 | ${bindir}/lshal \ | ||
| 72 | ${bindir}/hal-find-by-capability \ | ||
| 73 | ${bindir}/hal-find-by-property \ | ||
| 74 | ${bindir}/hal-device \ | ||
| 75 | ${bindir}/hal-get-property \ | ||
| 76 | ${bindir}/hal-set-property \ | ||
| 77 | ${bindir}/hal-lock \ | ||
| 78 | ${bindir}/hal-is-caller-locked-out \ | ||
| 79 | ${sbindir} \ | ||
| 80 | ${libdir}/libhal.so.* \ | ||
| 81 | ${libdir}/libhal-storage.so.* \ | ||
| 82 | ${libdir}/hal \ | ||
| 83 | ${libexecdir} \ | ||
| 84 | ${datadir}/hal/fdi \ | ||
| 85 | ${datadir}/hal/scripts" | ||
