summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/hal/hal.inc
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-09-01 19:09:11 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-09-01 19:09:57 +0100
commitd62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 (patch)
treef36fe3008f36ff75cbdd31b630f8f13f1f205ebb /meta/recipes-support/hal/hal.inc
parentcaab7fc509bf27706ff3248689f6afd04225cfda (diff)
downloadpoky-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.gz
packages: Separate out most of the remaining packages into recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-support/hal/hal.inc')
-rw-r--r--meta/recipes-support/hal/hal.inc85
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 @@
1DESCRIPTION = "Hardware Abstraction Layer"
2HOMEPAGE = "http://freedesktop.org/Software/hal"
3BUGTRACKER = "http://bugs.freedesktop.org/buglist.cgi?product=hal"
4SECTION = "unknown"
5
6LICENSE = "GPLv2+ | AFL"
7LIC_FILES_CHKSUM = "file://COPYING;md5=5b5ffd59fbb7c2fff6de76c94177af31"
8
9DEPENDS = "virtual/kernel dbus-glib udev util-linux intltool intltool-native expat libusb gperf-native"
10RDEPENDS += "udev hal-info"
11
12SRC_URI = "http://hal.freedesktop.org/releases/hal-${PV}.tar.gz \
13 file://20hal"
14
15inherit autotools pkgconfig
16
17
18LEAD_SONAME = "libhal.so"
19
20# machines with pci and acpi get a machine dependant hal
21EXTRA_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
33MY_ARCH := "${PACKAGE_ARCH}"
34PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'acpi', '${MACHINE_ARCH}', '${MY_ARCH}',d)}"
35PACKAGE_ARCH = "${@base_contains('MACHINE_FEATURES', 'pci', '${MACHINE_ARCH}', '${MY_ARCH}',d)}"
36PACKAGE_ARCH_emenlow := "${PACKAGE_ARCH}"
37
38do_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
44pkg_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
65pkg_postrm_hal () {
66 deluser haldaemon || true
67 delgroup haldaemon || true
68}
69
70FILES_${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"