wok-current annotate hal/receipt @ rev 24992
Up sip (4.19.25)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat May 14 18:19:29 2022 +0000 (2022-05-14) |
parents | ff5fd8788cd9 |
children | 45673422e44e |
rev | line source |
---|---|
pankso@792 | 1 # SliTaz package receipt. |
pankso@792 | 2 |
pankso@792 | 3 PACKAGE="hal" |
slaxemulator@6818 | 4 VERSION="0.5.14" |
pankso@792 | 5 CATEGORY="x-window" |
pankso@792 | 6 SHORT_DESC="Hardware Abstraction Layer." |
pankso@792 | 7 MAINTAINER="pankso@slitaz.org" |
pascal@15002 | 8 LICENSE="GPL2" |
pankso@792 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pankso@792 | 10 WEB_SITE="http://www.freedesktop.org/wiki/Software/hal" |
pankso@792 | 11 WGET_URL="http://hal.freedesktop.org/releases/$TARBALL" |
pankso@10389 | 12 CROSS="error: cannot check for file existence when cross compiling" |
pankso@792 | 13 |
pankso@12481 | 14 DEPENDS="dbus dbus-glib slitaz-base-files udev util-linux-blkid libusb-compat" |
pankso@9696 | 15 BUILD_DEPENDS="dbus-dev dbus-glib dbus-glib-dev udev-dev pciutils \ |
pascal@12979 | 16 util-linux-blkid-dev expat-dev util-linux-uuid-dev glib-dev pkg-config \ |
pascal@12979 | 17 libv4l-dev" |
pankso@9696 | 18 |
pankso@792 | 19 EXTRA=" |
pankso@792 | 20 hald-addon-cpufreq |
pankso@792 | 21 hald-addon-hid-ups |
pankso@792 | 22 hald-addon-imac-backlight |
pankso@3106 | 23 hald-addon-ipw-killswitch |
pankso@792 | 24 hald-probe-video4linux |
pankso@792 | 25 hald-probe-net-bluetooth |
pankso@792 | 26 hald-probe-ieee1394-unit |
pankso@792 | 27 hald-probe-pc-floppy |
pankso@3106 | 28 hald-probe-printer" |
pankso@792 | 29 |
pascal@24445 | 30 # What is the latest version available today? |
pascal@24445 | 31 current_version() |
pascal@24445 | 32 { |
pascal@24445 | 33 wget -O - ${WGET_URL%/*} 2>/dev/null | \ |
pascal@24445 | 34 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q |
pascal@24445 | 35 } |
pascal@24445 | 36 |
pankso@792 | 37 # Rules to configure and make the package. |
pankso@792 | 38 compile_rules() |
pankso@792 | 39 { |
pankso@792 | 40 cd $src |
pascal@12979 | 41 sed -i 's|linux/videodev.h|libv4l1-videodev.h|' \ |
pascal@12979 | 42 hald/linux/probing/probe-video4linux.c |
pascal@12979 | 43 sed -i 's|glib/gmain|glib|' hald/linux/addons/addon-*.c |
pascal@2081 | 44 zcat /usr/share/misc/pci.ids.gz > /usr/share/misc/pci.ids && |
pankso@9696 | 45 patch -p1 < $stuff/hal-scripts.u || return 1 && |
pankso@9696 | 46 #patch -p1 < $stuff/hal-udev.patch || return 1 && |
pascal@6113 | 47 grep -qs 'define u8' hald/linux/probing/linux_dvd_rw_utils.c || |
pascal@6113 | 48 sed -i 's|#include <scsi/scsi.h>|#define u8 __u8\n&|' \ |
pascal@6113 | 49 hald/linux/probing/linux_dvd_rw_utils.c |
pankso@792 | 50 ./configure \ |
pankso@792 | 51 --prefix=/usr \ |
pankso@792 | 52 --libexecdir=/usr/lib/hal \ |
pankso@792 | 53 --sysconfdir=/etc \ |
pankso@792 | 54 --localstatedir=/var \ |
pankso@792 | 55 --disable-usb-ids \ |
pankso@792 | 56 --disable-policy-kit \ |
pankso@10389 | 57 --build=$HOST_SYSTEM \ |
pankso@10389 | 58 --host=$HOST_SYSTEM && |
pascal@1536 | 59 make && |
pascal@2081 | 60 rm /usr/share/misc/pci.ids && |
pankso@10389 | 61 make install |
pankso@792 | 62 } |
pankso@792 | 63 |
pankso@792 | 64 # Rules to gen a SliTaz package suitable for Tazpkg. |
pankso@792 | 65 genpkg_rules() |
pankso@792 | 66 { |
pankso@792 | 67 mkdir -p $fs/usr/lib $fs/usr/share |
pascal@15603 | 68 cp -a $install/etc $fs |
pascal@15603 | 69 cp -a $install/var $fs |
pascal@15603 | 70 cp -a $install/usr/bin $fs/usr |
pascal@15603 | 71 cp -a $install/usr/sbin $fs/usr |
pascal@15603 | 72 cp -a $install/usr/lib/*.so* $fs/usr/lib |
pascal@15603 | 73 cp -a $install/usr/lib/hal $fs/usr/lib |
pascal@15603 | 74 cp -a $install/usr/share/hal $fs/usr/share |
pankso@792 | 75 chmod -R +x $fs/usr/lib/hal/scripts/* |
pankso@2832 | 76 # Remove a few run time lib and strip. |
pankso@792 | 77 for lib in $EXTRA |
pankso@792 | 78 do |
pankso@792 | 79 rm $fs/usr/lib/hal/$lib |
pankso@792 | 80 done |
pankso@2832 | 81 strip -s $fs/usr/lib/hal/* 2>/dev/null |
pankso@792 | 82 # Init script |
pankso@792 | 83 cp -a stuff/etc $fs |
erjo@4743 | 84 |
erjo@4743 | 85 # Policy for ntfs-3g |
erjo@4743 | 86 cp -a stuff/policy $fs/usr/share/hal/fdi/ |
pankso@792 | 87 chown -R root.root $fs |
pankso@4114 | 88 |
jozee@3326 | 89 # exclude unwanted fdi files |
jozee@3326 | 90 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-cpufreq.fdi |
jozee@3326 | 91 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-dockstation.fdi |
jozee@3326 | 92 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-imac-backlight.fdi |
jozee@3326 | 93 rm $fs/usr/share/hal/fdi/policy/10osvendor/15-storage-luks.fdi |
jozee@3326 | 94 rm $fs/usr/share/hal/fdi/policy/10osvendor/30-wol.fdi |
jozee@5113 | 95 |
jozee@5113 | 96 # change bash to sh in hal scripts |
jozee@5113 | 97 sed -i 's:/bin/bash:/bin/sh:' $fs/usr/lib/hal/scripts/hal* |
jozee@5113 | 98 sed -i 's:/bin/bash:/bin/sh:' $fs/usr/lib/hal/scripts/linux/hal* |
jozee@5113 | 99 # use full-path |
jozee@5113 | 100 sed -i 's:hal-functions:/usr/lib/hal/scripts/hal-functions:' $fs/usr/lib/hal/scripts/hal* |
jozee@5113 | 101 sed -i 's:hal-functions:/usr/lib/hal/scripts/hal-functions:' $fs/usr/lib/hal/scripts/linux/hal* |
pankso@792 | 102 } |
pankso@792 | 103 |
pankso@792 | 104 pre_install() |
pankso@792 | 105 { |
al@19161 | 106 # Go for echoing on configuration files if any haldaemon user |
pankso@792 | 107 # was found. |
pascal@18730 | 108 if ! grep -q 'haldaemon' "$1/etc/passwd"; then |
pankso@792 | 109 echo -n "Adding user: messagebus..." |
pascal@18730 | 110 echo 'haldaemon:x:26:26:HAL Daemon User:/dev/null:/bin/false' >> "$1/etc/passwd" |
pascal@18730 | 111 echo 'haldaemon:!:14013:0:99999:7:::' >> "$1/etc/shadow" |
pascal@18730 | 112 echo 'haldaemon:x:26:' >> "$1/etc/group" |
pascal@18730 | 113 echo 'haldaemon:!::' >> "$1/etc/gshadow" |
pankso@792 | 114 status |
pankso@792 | 115 fi |
pascal@18730 | 116 if ! grep -q ^HALD_OPTIONS "$1/etc/daemons.conf"; then |
pascal@18730 | 117 echo -n "Configuring /etc/daemons.conf..." |
pascal@18730 | 118 cat >> "$1/etc/daemons.conf" << "EOT" |
pankso@792 | 119 # HAL daemon options. |
pankso@792 | 120 HALD_OPTIONS="--daemon=yes" |
pankso@792 | 121 |
pankso@792 | 122 EOT |
pankso@792 | 123 status |
pankso@792 | 124 fi |
pankso@792 | 125 } |
pankso@792 | 126 |
pankso@792 | 127 pre_remove() |
pankso@792 | 128 { |
pankso@792 | 129 /etc/init.d/hald stop |
pankso@792 | 130 deluser haldaemon |
pankso@792 | 131 } |