From e762dba18e4cd0c967f812f62f692613b92d1322 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 23 Mar 2009 08:38:24 +0100 Subject: [PATCH] Added hal-0.5.12rc1 template. --HG-- extra : convert_revision : 8f3db664b145683fd8d5e52048fd890b49baa787 --- templates/hal/INSTALL | 24 ++++++++++++++++++++++++ templates/hal/REMOVE | 11 +++++++++++ templates/hal/build.diff | 11 +++++++++++ templates/hal/files/hal | 32 ++++++++++++++++++++++++++++++++ templates/hal/template | 40 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 118 insertions(+) create mode 100644 templates/hal/INSTALL create mode 100644 templates/hal/REMOVE create mode 100644 templates/hal/build.diff create mode 100644 templates/hal/files/hal create mode 100644 templates/hal/template diff --git a/templates/hal/INSTALL b/templates/hal/INSTALL new file mode 100644 index 00000000000..7ff1692f6ca --- /dev/null +++ b/templates/hal/INSTALL @@ -0,0 +1,24 @@ +# +# This script creates the HAL system user/group. +# + +case "$2" in +pre) + ;; +post) + echo "Running $3-$4 post installation hooks..." + if ! chroot . getent group hal >/dev/null; then + chroot . groupadd -r hal + [ $? -ne 0 ] && exit $? + echo "Created HAL system group." + fi + if ! chroot . getent passwd hal >/dev/null; then + chroot . useradd -c "HAL daemon" \ + -d / -s /sbin/nologin -g hal \ + -G optical,floppy,storage -r hal && \ + chroot . passwd -l hal &>/dev/null + [ $? -ne 0 ] && exit $? + echo "Created HAL system user." + fi + ;; +esac diff --git a/templates/hal/REMOVE b/templates/hal/REMOVE new file mode 100644 index 00000000000..07b52173b1f --- /dev/null +++ b/templates/hal/REMOVE @@ -0,0 +1,11 @@ +# +# This script removes the HAL user/group. +# +case "$2" in +pre) + chroot . userdel hal &>/dev/null + [ $? -eq 0 ] && echo "Removed HAL system user/group." + ;; +post) + ;; +esac diff --git a/templates/hal/build.diff b/templates/hal/build.diff new file mode 100644 index 00000000000..32a165138db --- /dev/null +++ b/templates/hal/build.diff @@ -0,0 +1,11 @@ +--- configure.orig 2009-03-23 06:29:01.403464750 +0100 ++++ configure 2009-03-23 06:29:21.114421717 +0100 +@@ -23082,7 +23082,7 @@ fi + ac_ext=c + ac_cpp='$CPP $CPPFLAGS' + ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ++ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -lsmbios $LIBS >&5' + ac_compiler_gnu=$ac_cv_c_compiler_gnu + + if test "$LIB_SMBIOS" = "yes" ; then diff --git a/templates/hal/files/hal b/templates/hal/files/hal new file mode 100644 index 00000000000..637e5e0153d --- /dev/null +++ b/templates/hal/files/hal @@ -0,0 +1,32 @@ +#!/bin/sh +# +# PROVIDE: hal +# REQUIRE: DAEMON dbus +# KEYWORD: shutdown + +. /etc/rc.subr + +name="hal" +rcvar=$name +command="/usr/sbin/hald" +pidfile="/var/run/hald/pid" +start_precmd=hal_prestart + +hal_prestart() { + dirs="/var/run/hald /var/cache/hald" + for d in ${dirs}; do + if [ ! -d ${d} ]; then + mkdir ${d} + chmod 0755 ${d} + chown hal:hal ${d} + fi + done + for f in hald-local hald-runner; do + if [ ! -x /var/run/hald/${f} ]; then + touch /var/run/hald/${f} + fi + done +} + +load_rc_config $name +run_rc_command "$1" diff --git a/templates/hal/template b/templates/hal/template new file mode 100644 index 00000000000..4bd5fb6a89b --- /dev/null +++ b/templates/hal/template @@ -0,0 +1,40 @@ +# Template file for 'hal' +pkgname=hal +version=0.5.12rc1 +distfiles="http://hal.freedesktop.org/releases/hal-$version.tar.bz2" +build_style=gnu_configure +configure_args="--enable-man-pages --enable-console-kit --enable-policy-kit + --enable-acpi-ibm --enable-acpi-toshiba --disable-parted --enable-sonypic + --with-hal-user=hal --with-hal-group=hal --localstatedir=/var + --disable-docbook-docs" +short_desc="Hardware Abstraction Layer" +maintainer="Juan RP " +checksum=eeeb438dcc2a58288ed3def8c1d0076ca16f35b54d501c46f96e89da24fe38f4 +long_desc=" + HAL is daemon for collecting and maintaining information from several + sources about the hardware on the system." + +conf_files="/etc/dbus-1/system.d/hal.conf" + +Add_dependency full glibc +Add_dependency full udev +Add_dependency full dbus +Add_dependency full dbus-glib +Add_dependency full expat +Add_dependency full bash +Add_dependency full hal-info +Add_dependency full eject +Add_dependency full PolicyKit +Add_dependency full ConsoleKit +Add_dependency full pciutils +Add_dependency full usbutils +Add_dependency full dmidecode +Add_dependency build pkg-config +Add_dependency build libsmbios +Add_dependency run libsmbios-utils + +post_install() +{ + rm -rf ${DESTDIR}/var + install -D -m755 ${FILESDIR}/hal ${DESTDIR}/etc/rc.d/hal +}