Hal: merge improvements from poky, remove stale versions
authorKoen Kooi <koen@openembedded.org>
Sat, 4 Aug 2007 06:08:14 +0000 (06:08 +0000)
committerKoen Kooi <koen@openembedded.org>
Sat, 4 Aug 2007 06:08:14 +0000 (06:08 +0000)
packages/hal/files/20hal [new file with mode: 0644]
packages/hal/files/99_hal
packages/hal/hal_0.2.98.bb [deleted file]
packages/hal/hal_0.5.2.bb [deleted file]
packages/hal/hal_0.5.4.bb [deleted file]
packages/hal/hal_0.5.7.bb [deleted file]
packages/hal/hal_0.5.8.1.bb [deleted file]
packages/hal/hal_0.5.9.bb

diff --git a/packages/hal/files/20hal b/packages/hal/files/20hal
new file mode 100644 (file)
index 0000000..ff6ffc2
--- /dev/null
@@ -0,0 +1,58 @@
+#! /bin/sh
+#
+# hal          Start the Daemon that stores device informations
+#              for the Hardware abstraction layer
+#
+#              Written by Martin Waitz based on skeleton code
+#              written by Miquel van Smoorenburg <miquels@cistron.nl>.
+#              Modified for Debian 
+#              by Ian Murdock <imurdock@gnu.ai.mit.edu>.
+#
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/hald
+PIDDIR=/var/run/hald
+PIDFILE=$PIDDIR/hald.pid
+NAME=hald
+DAEMONUSER=haldaemon
+DESC="Hardware abstraction layer"
+
+test -x $DAEMON || exit 0
+
+set -e
+
+do_start() {
+  if [ ! -d $PIDDIR ]; then
+    mkdir -p $PIDDIR
+    chown $DAEMONUSER:$DAEMONUSER $PIDDIR
+  fi
+       echo "Starting $DESC" "$NAME"
+       start-stop-daemon --start --pidfile $PIDFILE \
+               --exec $DAEMON -- $DAEMON_OPTS
+}
+
+do_stop() {
+       echo "Stopping $DESC" "$NAME"
+       start-stop-daemon --stop --oknodo --quiet --pidfile $PIDFILE \
+               --exec $DAEMON 
+}
+
+case "$1" in
+  start)
+    do_start
+       ;;
+  stop)
+    do_stop
+       ;;
+  restart|force-reload)
+  do_stop
+       sleep 5
+  do_start
+       ;;
+  *)
+       echo "Usage: $0 {start|stop|restart|force-reload}" >&2
+       exit 1
+       ;;
+esac
+
+exit 0
index f983db9..c82da99 100644 (file)
@@ -1,2 +1,2 @@
 d root root 0700 /var/run/hald none
-d root root 0700 /var/cache/hald none
+d haldaemon haldaemon 0755 /var/cache/hald none
diff --git a/packages/hal/hal_0.2.98.bb b/packages/hal/hal_0.2.98.bb
deleted file mode 100644 (file)
index 468a948..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-require hal.inc
-
-DEPENDS = "dbus expat"
-RDEPENDS += "hotplug"
-
-EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \
-               --with-expat=${STAGING_LIBDIR}/.. \
-               --with-dbus-sys=${sysconfdir}/dbus-1/system.d \
-               --with-hotplug=${sysconfdir}/hotplug.d"
diff --git a/packages/hal/hal_0.5.2.bb b/packages/hal/hal_0.5.2.bb
deleted file mode 100644 (file)
index 1ca95e8..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-require hal.inc
-
-DEPENDS = "dbus expat"
-RDEPENDS += "hotplug"
-RRECOMMENDS = "udev-utils"
-
-EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \
-               --with-expat=${STAGING_LIBDIR}/.. \
-               --with-dbus-sys=${sysconfdir}/dbus-1/system.d \
-               --with-hotplug=${sysconfdir}/hotplug.d"
-
-do_stage() {
-       autotools_stage_includes
-       install -d ${STAGING_LIBDIR}
-       install -m 755 libhal/.libs/libhal.so.1.0.0 ${STAGING_LIBDIR}/libhal.so
-       install -m 755 libhal-storage/.libs/libhal-storage.so.1.0.0 ${STAGING_LIBDIR}/libhal-storage.so
-}
diff --git a/packages/hal/hal_0.5.4.bb b/packages/hal/hal_0.5.4.bb
deleted file mode 100644 (file)
index 1246637..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-require hal.inc
-
-DEPENDS = "dbus expat libusb"
-RDEPENDS += "hotplug"
-RDEPENDS_hal-device-manager = "python hal python-pygnome"
-RRECOMMENDS = "udev-utils"
-PR = "r1"
-
-EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \
-               --with-expat=${STAGING_LIBDIR}/.. \
-               --with-dbus-sys=${sysconfdir}/dbus-1/system.d \
-               --with-hotplug=${sysconfdir}/hotplug.d \
-               --disable-docbook-docs"
-
-do_stage() {
-       autotools_stage_includes
-       install -d ${STAGING_LIBDIR}
-       install -m 755 libhal/.libs/libhal.so.1.0.0 ${STAGING_LIBDIR}/libhal.so
-       install -m 755 libhal-storage/.libs/libhal-storage.so.1.0.0 ${STAGING_LIBDIR}/libhal-storage.so
-}
-
-PACKAGES += "hal-device-manager"
-FILES_${PN} = "${sysconfdir} ${bindir}/lshal ${bindir}/hal-get-property ${bindir}/hal-set-property  ${sbindir} ${libdir}/libhal.so* ${libdir}/libhal-storage.so* ${libexecdir} ${datadir}/hal/fdi"
-FILES_hal-device-manager = "${datadir}/hal/device-manager/ ${bindir}/hal-device-manager"
-
diff --git a/packages/hal/hal_0.5.7.bb b/packages/hal/hal_0.5.7.bb
deleted file mode 100644 (file)
index 05a3ea0..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-require hal.inc
-
-DEPENDS = "dbus expat libusb"
-RDEPENDS += "hotplug"
-#RDEPENDS_hal-device-manager = "python hal python-pygnome"
-RRECOMMENDS = "udev-utils"
-
-SRC_URI += "file://dbus-fix-api.patch;patch=1"
-
-EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \
-               --with-expat=${STAGING_LIBDIR}/.. \
-               --with-dbus-sys=${sysconfdir}/dbus-1/system.d \
-               --with-hotplug=${sysconfdir}/hotplug.d \
-               --disable-docbook-docs"
-
-do_stage() {
-       autotools_stage_includes
-       install -d ${STAGING_LIBDIR}
-       install -m 755 libhal/.libs/libhal.so.1.0.0 ${STAGING_LIBDIR}/libhal.so
-       install -m 755 libhal-storage/.libs/libhal-storage.so.1.0.0 ${STAGING_LIBDIR}/libhal-storage.so
-}
-
-#PACKAGES += "hal-device-manager"
-FILES_${PN} = "${sysconfdir} \
-               ${bindir}/lshal \
-               ${bindir}/hal-find-by-capability \
-               ${bindir}/hal-find-by-property \
-               ${bindir}/hal-device  \
-               ${bindir}/hal-get-property \
-               ${bindir}/hal-set-property  \
-               ${sbindir} \
-               ${libdir}/libhal.so* \
-               ${libdir}/libhal-storage.so* \
-               ${libexecdir} \
-               ${datadir}/hal/fdi \
-               ${datadir}/hal/scripts"
-#FILES_hal-device-manager = " \
-#              ${datadir}/hal/device-manager/ \
-#              ${bindir}/hal-device-manager"
-
diff --git a/packages/hal/hal_0.5.8.1.bb b/packages/hal/hal_0.5.8.1.bb
deleted file mode 100644 (file)
index d0b8881..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-require hal.inc
-
-DEPENDS = "dbus-glib udev intltool  expat libusb"
-RDEPENDS += "udev"
-#RDEPENDS_hal-device-manager = "python hal python-pygnome"
-RRECOMMENDS = "udev-utils"
-
-PR = "r2"
-
-SRC_URI += "file://99_hal"
-
-EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \
-                --with-expat=${STAGING_LIBDIR}/.. \
-                --with-dbus-sys=${sysconfdir}/dbus-1/system.d \
-                --with-hotplug=${sysconfdir}/hotplug.d \
-                --disable-docbook-docs \
-                --disable-policy-kit \
-                "
-
-do_install_append() {
-       install -d ${D}/etc/default/volatiles
-       install -m 0644 ${WORKDIR}/99_hal ${D}/etc/default/volatiles
-}
-
-do_stage() {
-        autotools_stage_all
-        install -d ${STAGING_LIBDIR}
-        install -m 755 libhal/.libs/libhal.so.1.0.0 ${STAGING_LIBDIR}/libhal.so
-        install -m 755 libhal-storage/.libs/libhal-storage.so.1.0.0 ${STAGING_LIBDIR}/libhal-storage.so
-}
-
-# At the time the postinst runs, dbus might not be setup so only restart if running
-pkg_postinst_hal () {
-       # can't do this offline
-       if [ "x$D" != "x" ]; then
-               exit 1
-       fi
-
-       /etc/init.d/populate-volatile.sh update
-
-       grep haldaemon /etc/group || addgroup haldaemon
-       grep haldaemon /etc/passwd || adduser --disabled-password --system --home /var/run/hald --no-create-home haldaemon --ingroup haldaemon -g HAL
-
-       DBUSPID=`pidof dbus-daemon`
-
-       if [ "x$DBUSPID" != "x" ]; then
-               /etc/init.d/dbus-1 force-reload
-       fi
-}
-
-pkg_postrm_hal () {
-       deluser haldaemon || true
-       delgroup haldaemon || true
-}
-
-#PACKAGES += "hal-device-manager"
-
-#FILES_hal-device-manager = " \
-#               ${datadir}/hal/device-manager/ \
-#               ${bindir}/hal-device-manager"
-
-FILES_${PN} = "${sysconfdir} \
-                ${bindir}/lshal \
-                ${bindir}/hal-find-by-capability \
-                ${bindir}/hal-find-by-property \
-                ${bindir}/hal-device  \
-                ${bindir}/hal-get-property \
-                ${bindir}/hal-set-property  \
-                ${sbindir} \
-                ${libdir}/libhal.so* \
-                ${libdir}/libhal-storage.so* \
-                ${libdir}/hal \
-                ${libexecdir} \
-                ${datadir}/hal/fdi \
-                ${datadir}/hal/scripts"
index 79d5397..72d5dc4 100644 (file)
@@ -5,9 +5,11 @@ RDEPENDS += "udev hal-info"
 #RDEPENDS_hal-device-manager = "python hal python-pygnome"
 RRECOMMENDS = "udev-utils"
 
-PR = "r1"
+PR = "r2"
 
-SRC_URI += "file://99_hal"
+SRC_URI += "file://99_hal \
+            file://20hal \
+          "
 
 EXTRA_OECONF = "--with-hwdata=${datadir}/hwdata \
                 --with-expat=${STAGING_LIBDIR}/.. \
@@ -29,6 +31,8 @@ do_configure() {
 do_install_append() {
        install -d ${D}/etc/default/volatiles
        install -m 0644 ${WORKDIR}/99_hal ${D}/etc/default/volatiles
+        install -d ${D}/etc/dbus-1/event.d
+        install -m 0755 ${WORKDIR}/20hal ${D}/etc/dbus-1/event.d
 }
 
 do_stage() {