wok-next annotate hal/receipt @ rev 20593
Up gpm (1.20.7)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sat Apr 14 16:28:35 2018 +0300 (2018-04-14) |
parents | e545e47edffa |
children | 10df65db91ad |
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 |
pankso@9696 | 14 BUILD_DEPENDS="dbus-dev dbus-glib dbus-glib-dev udev-dev pciutils \ |
al@20513 | 15 util-linux-blkid-dev expat-dev util-linux-uuid-dev glib-dev libv4l-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 patch -p1 < $stuff/hal-scripts.u || return 1 |
al@20550 | 26 #patch -p1 < $stuff/hal-udev.patch || return 1 |
al@20550 | 27 |
pascal@6113 | 28 grep -qs 'define u8' hald/linux/probing/linux_dvd_rw_utils.c || |
pascal@6113 | 29 sed -i 's|#include <scsi/scsi.h>|#define u8 __u8\n&|' \ |
pascal@6113 | 30 hald/linux/probing/linux_dvd_rw_utils.c |
al@20534 | 31 |
al@20550 | 32 libexecdir='/usr/lib/hal' |
pankso@792 | 33 ./configure \ |
al@20550 | 34 --libexecdir=$libexecdir \ |
pankso@792 | 35 --disable-usb-ids \ |
pankso@792 | 36 --disable-policy-kit \ |
al@20575 | 37 $CONFIGURE_ARGS && |
al@20575 | 38 fix libtool && |
pascal@1536 | 39 make && |
pascal@2081 | 40 rm /usr/share/misc/pci.ids && |
al@20550 | 41 make install || return 1 |
al@20550 | 42 |
al@20550 | 43 chmod -R +x $install$libexecdir/scripts/* |
al@20550 | 44 |
al@20550 | 45 # init script |
al@20550 | 46 cp -a $stuff/etc $install |
al@20550 | 47 # policy for ntfs-3g |
al@20550 | 48 cp -a $stuff/policy $install/usr/share/hal/fdi/ |
al@20550 | 49 # change bash to sh in hal scripts; use full-path |
al@20550 | 50 sed -i \ |
al@20550 | 51 -e 's:/bin/bash:/bin/sh:' \ |
al@20550 | 52 -e "s:hal-functions:$libexecdir/scripts/hal-functions:" \ |
al@20550 | 53 $install/usr/lib/hal/scripts/hal* \ |
al@20550 | 54 $install/usr/lib/hal/scripts/linux/hal* |
pankso@792 | 55 } |
pankso@792 | 56 |
al@20534 | 57 genpkg_rules() { |
pascal@20163 | 58 case $PACKAGE in |
al@20550 | 59 hal-scripts) |
al@20550 | 60 copy hal/scripts/ |
al@20550 | 61 CAT="x-window|scripts" |
al@20550 | 62 DEPENDS="dbus dbus-glib glib hal" |
al@20550 | 63 ;; |
al@20550 | 64 hal-extra) |
al@20550 | 65 copy hald-addon-cpufreq hald-addon-hid-ups \ |
al@20550 | 66 hald-addon-imac-backlight hald-addon-ipw-killswitch \ |
al@20550 | 67 hald-probe-video4linux hald-probe-net-bluetooth \ |
al@20550 | 68 hald-probe-ieee1394-unit hald-probe-pc-floppy hald-probe-printer \ |
al@20550 | 69 10-cpufreq.fdi 10-dockstation.fdi 10-imac-backlight.fdi \ |
al@20550 | 70 15-storage-luks.fdi 30-wol.fdi |
al@20550 | 71 CAT="x-window|extra lib and fdi files" |
al@20550 | 72 DEPENDS="dbus dbus-glib glib hal" |
al@20550 | 73 ;; |
al@20550 | 74 hal) |
al@20550 | 75 copy @std @rm |
al@20550 | 76 DEPENDS="dbus dbus-glib slitaz-base-files udev \ |
pascal@20163 | 77 util-linux-blkid libusb-compat" |
al@20550 | 78 ;; |
al@20550 | 79 hal-dev) |
al@20550 | 80 copy @dev |
al@20550 | 81 DEPENDS="hal dbus-dev" |
al@20550 | 82 ;; |
pascal@20163 | 83 esac |
pankso@792 | 84 } |
pankso@792 | 85 |
al@20534 | 86 pre_install_hal() { |
al@19161 | 87 # Go for echoing on configuration files if any haldaemon user |
pankso@792 | 88 # was found. |
pascal@18730 | 89 if ! grep -q 'haldaemon' "$1/etc/passwd"; then |
pascal@18730 | 90 echo 'haldaemon:x:26:26:HAL Daemon User:/dev/null:/bin/false' >> "$1/etc/passwd" |
pascal@18730 | 91 echo 'haldaemon:!:14013:0:99999:7:::' >> "$1/etc/shadow" |
pascal@18730 | 92 echo 'haldaemon:x:26:' >> "$1/etc/group" |
pascal@18730 | 93 echo 'haldaemon:!::' >> "$1/etc/gshadow" |
pankso@792 | 94 fi |
pascal@18730 | 95 if ! grep -q ^HALD_OPTIONS "$1/etc/daemons.conf"; then |
pascal@18730 | 96 cat >> "$1/etc/daemons.conf" << "EOT" |
pankso@792 | 97 # HAL daemon options. |
pankso@792 | 98 HALD_OPTIONS="--daemon=yes" |
pankso@792 | 99 |
pankso@792 | 100 EOT |
pankso@792 | 101 fi |
pankso@792 | 102 } |
pankso@792 | 103 |
al@20534 | 104 pre_remove_hal() { |
pankso@792 | 105 /etc/init.d/hald stop |
pankso@792 | 106 deluser haldaemon |
pankso@792 | 107 } |