# $Id$ PNAME="hal" PVER="0.5.13" PBUILD="r3" PCATEGORIE="sys-apps" STATE="unstable" DESCRIPTION="HAL - Hardware Abstraction Layer." HOMEPAGE="http://www.freedesktop.org/wiki/Software/hal" DEPEND=">= dev-libs/glib2-2.22 >= sys-apps/dbus-1.3 >= dev-libs/dbus-glib-0.82 >= dev-libs/expat-2 >= sys-fs/udev-146 >= sys-apps/dmidecode-2 >= sys-apps/pciutils-3 >= dev-libs/libusb-0.1.12 >= sys-apps/eject-2.1.5 >= sys-apps/util-linux-2.16 >= app-misc/hal-info-2009 >= sys-apps/polkit-0.94 >= sys-apps/consolekit-0.3.1" SDEPEND=">= dev-util/pkgconfig-0.23 >= dev-util/intltool-0.40 >= dev-util/gperf-3.0.4" SRCFILE="${PNAME}-${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" # cvs revision of the initscript RC_CVS_REV=1.3 sminclude mtools multilib SRC_URI=( http://hal.freedesktop.org/releases/${SRCFILE} mirror://${PNAME}/${SRCFILE} mirror://${PNAME}/hald.rc-${RC_CVS_REV} mirror://${PNAME}/hal-unmount.dev mirror://${PNAME}/${PNAME}-0.5.7.1-plugdev-allow-send.patch mirror://${PNAME}/${PNAME}-0.5.10-hide-recovery-partitions.patch mirror://${PNAME}/${PNAME}-0.5.12-ntfs3g-valid-options.patch mirror://${PNAME}/${PNAME}-0.5.11-ntfs3g-rethink-extra-options-fix.patch mirror://${PNAME}/${PNAME}-${PVER}-use-at-console.patch ) UP2TARBALL="${PNAME}-[0-9]" UP2DATE="updatecmd_freedesktop ${PNAME}" src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR} # allow plugdev group people to mount mpatch ${PNAME}-0.5.7.1-plugdev-allow-send.patch || die # hide recovery partitions mpatch ${PNAME}-0.5.10-hide-recovery-partitions.patch || die # fix ntfs-3g options mpatch ${PNAME}-0.5.12-ntfs3g-valid-options.patch || die # fixes "TODO: have to rethink extra options" error message in KDE mpatch ${PNAME}-0.5.11-ntfs3g-rethink-extra-options-fix.patch || die # allow root to access devices and on local console only mpatch ${PNAME}-${PVER}-use-at-console.patch || die } src_compile() { cd ${SRCDIR} mconfigure \ --libexecdir=/usr/$(mlibdir)/hal \ --with-pid-file=/var/run/hald/hald.pid \ --with-hwdata=/usr/share/misc \ --with-cpufreq \ --with-usb-csr \ --with-keymaps \ --disable-verbose-mode \ --disable-policy-kit \ --disable-console-kit \ --disable-acl-management \ --enable-umount-helper \ --enable-man-pages \ --enable-pci \ --enable-sonypic \ --enable-hotplug-map \ --enable-pcmcia-support \ --enable-acpi-proc \ --enable-acpi-toshiba \ --enable-acpi-ibm \ --disable-docbook-docs \ --disable-doxygen-docs \ || die mmake || die } src_install() { cd ${SRCDIR} # needed directories minstalldir /lib/udev || die mmake DESTDIR=${BINDIR} install || die # hal umount for unclean unmounts minstallexec -s hal-unmount.dev /lib/udev/hal_unmount || die # init minstallrc hald.rc-${RC_CVS_REV} hald || die # mark some dirs undeletable mkeepdir /etc/hal/fdi/information || die mkeepdir /etc/hal/fdi/policy || die mkeepdir /etc/hal/fdi/preprobe || die mkeepdir /var/lib/cache/hald || die mkeepdir /var/run/hald || die # docs minstalldocs AUTHORS COPYING ChangeLog HACKING NEWS README || die } preinstall() { # adds plugdev group ${MLIBDIR}/mgroupadd -o "-g 302" plugdev # adds haldaemon user ${MLIBDIR}/mgroupadd -o "-g 301" haldaemon ${MLIBDIR}/museradd -o "-u 301 -g haldaemon -G haldaemon,plugdev,disk,cdrom,cdrw,floppy,usb -d /dev/null -s /bin/false" haldaemon } postinstall() { if [[ ! -d ${MROOT}/media ]] then install -d ${MROOT}/media touch ${MROOT}/media/.keep fi # make sure that the haldaemon user is in the haldaemons groups # if users have a problem with this, let them file a bug usermod -G haldaemon,plugdev,disk,cdrom,cdrw,floppy,usb haldaemon # fix permissions chown haldaemon:haldaemon ${MROOT}/var/run/hald mstartservice hald } postremove() { if [ ! -f ${MROOT}/usr/sbin/hald ] then mstopservice hald fi }