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