increase dvbapp PR.
[vuplus_openembedded] / recipes / hal / hal_git.bb
1 DESCRIPTION = "Hardware Abstraction Layer"
2 HOMEPAGE = "http://freedesktop.org/Software/hal"
3 SECTION = "unknown"
4 LICENSE = "GPL LGPL AFL"
5
6 DEFAULT_PREFERENCE = "-1"
7
8 DEPENDS = "virtual/kernel dbus-glib udev intltool-native expat virtual/libusb0"
9 RDEPENDS_${PN} += "udev-utils hal-info"
10
11 SRC_URI = "git://anongit.freedesktop.org/hal/;protocol=git \
12         file://20hal \
13         file://99_hal"
14
15 PV = "0.5.9.1+git${SRCDATE}"
16 PR = "r8"
17
18 S = "${WORKDIR}/git"
19
20 inherit autotools pkgconfig
21
22 EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \
23                 --with-expat=${STAGING_DIR_HOST}${layout_prefix} \
24                 --with-dbus-sys=${sysconfdir}/dbus-1/system.d \
25                 --with-hotplug=${sysconfdir}/hotplug.d \
26                 --disable-docbook-docs \
27                 --disable-policy-kit \
28                 --disable-acpi --disable-acpi-acpid --disable-acpi-proc \
29                 --disable-sonypic \
30                 --disable-pmu --disable-pci \
31                 --disable-pci-ids --disable-pnp-ids \
32                 "
33
34 do_install_append() {
35         install -d ${D}/etc/default/volatiles
36         install -m 0644 ${WORKDIR}/99_hal ${D}/etc/default/volatiles
37         install -d ${D}/etc/dbus-1/event.d
38         install -m 0755 ${WORKDIR}/20hal ${D}/etc/dbus-1/event.d
39 }
40
41 do_stage() {
42         autotools_stage_all
43         install -d ${STAGING_LIBDIR}
44         install -m 755 libhal/.libs/libhal.so.1.0.0 ${STAGING_LIBDIR}/libhal.so
45         install -m 755 libhal-storage/.libs/libhal-storage.so.1.0.0 ${STAGING_LIBDIR}/libhal-storage.so
46 }
47
48 # At the time the postinst runs, dbus might not be setup so only restart if running
49 pkg_postinst_hal () {
50         # can't do this offline
51         if [ "x$D" != "x" ]; then
52                 exit 1
53         fi
54
55         grep haldaemon /etc/group || addgroup haldaemon
56         grep haldaemon /etc/passwd || adduser --disabled-password --system --home /var/run/hald --no-create-home haldaemon --ingroup haldaemon -g HAL
57
58         /etc/init.d/populate-volatile.sh update
59
60         DBUSPID=`pidof dbus-daemon`
61
62         if [ "x$DBUSPID" != "x" ]; then
63                 /etc/init.d/dbus-1 reload
64         fi
65 }
66
67 pkg_postrm_hal () {
68         deluser haldaemon || true
69         delgroup haldaemon || true
70 }
71
72 FILES_${PN} = "${sysconfdir} \
73                 ${bindir}/lshal \
74                 ${bindir}/hal-find-by-capability \
75                 ${bindir}/hal-find-by-property \
76                 ${bindir}/hal-device  \
77                 ${bindir}/hal-get-property \
78                 ${bindir}/hal-set-property  \
79                 ${bindir}/hal-lock  \
80                 ${bindir}/hal-is-caller-locked-out  \
81                 ${bindir}/hal-disable-polling  \
82                 ${sbindir} \
83                 ${libdir}/libhal.so.* \
84                 ${libdir}/libhal-storage.so.* \
85                 ${libdir}/hal \
86                 ${libexecdir} \
87                 ${datadir}/hal/fdi \
88                 ${datadir}/hal/scripts"