wok-next annotate hal/receipt @ rev 20990

Remove mate116 stash
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Oct 02 22:23:34 2018 +0300 (2018-10-02)
parents 5c189fc65a98
children d5aab818505e
rev   line source
pascal@20163 1 # SliTaz package receipt v2.
pankso@792 2
pankso@792 3 PACKAGE="hal"
slaxemulator@6818 4 VERSION="0.5.14"
pankso@792 5 CATEGORY="x-window"
al@20534 6 SHORT_DESC="Hardware Abstraction Layer"
pankso@792 7 MAINTAINER="pankso@slitaz.org"
pascal@15002 8 LICENSE="GPL2"
al@20534 9 WEB_SITE="http://www.freedesktop.org/wiki/Software/hal"
al@20534 10
pankso@792 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
pankso@792 12 WGET_URL="http://hal.freedesktop.org/releases/$TARBALL"
pankso@792 13
al@20623 14 BUILD_DEPENDS="dbus-dev dbus-glib dbus-glib-dev eudev-dev pciutils \
al@20604 15 util-linux-blkid-dev expat-dev util-linux-uuid-dev glib-dev v4l-utils-dev"
al@20550 16 SPLIT="hal-scripts hal-extra hal hal-dev"
pankso@9696 17
al@20534 18 CROSS="error: cannot check for file existence when cross compiling"
pankso@792 19
al@20534 20 compile_rules() {
pascal@12979 21 sed -i 's|linux/videodev.h|libv4l1-videodev.h|' \
pascal@12979 22 hald/linux/probing/probe-video4linux.c
pascal@12979 23 sed -i 's|glib/gmain|glib|' hald/linux/addons/addon-*.c
al@20550 24 zcat /usr/share/misc/pci.ids.gz > /usr/share/misc/pci.ids
al@20550 25
pascal@6113 26 grep -qs 'define u8' hald/linux/probing/linux_dvd_rw_utils.c ||
pascal@6113 27 sed -i 's|#include <scsi/scsi.h>|#define u8 __u8\n&|' \
pascal@6113 28 hald/linux/probing/linux_dvd_rw_utils.c
al@20534 29
al@20550 30 libexecdir='/usr/lib/hal'
pankso@792 31 ./configure \
al@20550 32 --libexecdir=$libexecdir \
pankso@792 33 --disable-usb-ids \
pankso@792 34 --disable-policy-kit \
al@20575 35 $CONFIGURE_ARGS &&
al@20575 36 fix libtool &&
pascal@1536 37 make &&
pascal@2081 38 rm /usr/share/misc/pci.ids &&
al@20550 39 make install || return 1
al@20550 40
al@20550 41 chmod -R +x $install$libexecdir/scripts/*
al@20550 42
al@20550 43 # init script
al@20550 44 cp -a $stuff/etc $install
al@20550 45 # policy for ntfs-3g
al@20550 46 cp -a $stuff/policy $install/usr/share/hal/fdi/
al@20550 47 # change bash to sh in hal scripts; use full-path
al@20550 48 sed -i \
al@20550 49 -e 's:/bin/bash:/bin/sh:' \
al@20550 50 -e "s:hal-functions:$libexecdir/scripts/hal-functions:" \
al@20550 51 $install/usr/lib/hal/scripts/hal* \
al@20550 52 $install/usr/lib/hal/scripts/linux/hal*
pankso@792 53 }
pankso@792 54
al@20534 55 genpkg_rules() {
pascal@20163 56 case $PACKAGE in
al@20550 57 hal-scripts)
al@20550 58 copy hal/scripts/
al@20550 59 CAT="x-window|scripts"
al@20550 60 DEPENDS="dbus dbus-glib glib hal"
al@20550 61 ;;
al@20550 62 hal-extra)
al@20550 63 copy hald-addon-cpufreq hald-addon-hid-ups \
al@20550 64 hald-addon-imac-backlight hald-addon-ipw-killswitch \
al@20550 65 hald-probe-video4linux hald-probe-net-bluetooth \
al@20550 66 hald-probe-ieee1394-unit hald-probe-pc-floppy hald-probe-printer \
al@20550 67 10-cpufreq.fdi 10-dockstation.fdi 10-imac-backlight.fdi \
al@20550 68 15-storage-luks.fdi 30-wol.fdi
al@20550 69 CAT="x-window|extra lib and fdi files"
al@20550 70 DEPENDS="dbus dbus-glib glib hal"
al@20550 71 ;;
al@20550 72 hal)
al@20550 73 copy @std @rm
al@20623 74 DEPENDS="dbus dbus-glib slitaz-base-files eudev \
pascal@20163 75 util-linux-blkid libusb-compat"
al@20550 76 ;;
al@20550 77 hal-dev)
al@20550 78 copy @dev
al@20550 79 DEPENDS="hal dbus-dev"
al@20550 80 ;;
pascal@20163 81 esac
pankso@792 82 }
pankso@792 83
al@20534 84 pre_install_hal() {
al@19161 85 # Go for echoing on configuration files if any haldaemon user
pankso@792 86 # was found.
pascal@18730 87 if ! grep -q 'haldaemon' "$1/etc/passwd"; then
pascal@18730 88 echo 'haldaemon:x:26:26:HAL Daemon User:/dev/null:/bin/false' >> "$1/etc/passwd"
pascal@18730 89 echo 'haldaemon:!:14013:0:99999:7:::' >> "$1/etc/shadow"
pascal@18730 90 echo 'haldaemon:x:26:' >> "$1/etc/group"
pascal@18730 91 echo 'haldaemon:!::' >> "$1/etc/gshadow"
pankso@792 92 fi
pascal@18730 93 if ! grep -q ^HALD_OPTIONS "$1/etc/daemons.conf"; then
pascal@18730 94 cat >> "$1/etc/daemons.conf" << "EOT"
pankso@792 95 # HAL daemon options.
pankso@792 96 HALD_OPTIONS="--daemon=yes"
pankso@792 97
pankso@792 98 EOT
pankso@792 99 fi
pankso@792 100 }
pankso@792 101
al@20534 102 pre_remove_hal() {
pankso@792 103 /etc/init.d/hald stop
pankso@792 104 deluser haldaemon
pankso@792 105 }