wok annotate hal/receipt @ rev 9470

Remove some uneeded strips (thoses ones are handled by Tazwok)
author Antoine Bodin <gokhlayeh@slitaz.org>
date Mon Apr 04 01:29:52 2011 +0200 (2011-04-04)
parents 43ca77c1cfa6
children 74b63eaf8099
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."
gokhlayeh@7969 7 DEPENDS="dbus dbus-glib slitaz-base-files udev util-linux-ng-blkid libusb-compat"
slaxemulator@6818 8 BUILD_DEPENDS="dbus-dev dbus-glib dbus-glib-dev udev-dev pciutils util-linux-ng-blkid-dev expat-dev util-linux-ng-uuid-dev glib-dev pkg-config"
pankso@792 9 MAINTAINER="pankso@slitaz.org"
pankso@792 10 TARBALL="$PACKAGE-$VERSION.tar.gz"
pankso@792 11 WEB_SITE="http://www.freedesktop.org/wiki/Software/hal"
pankso@792 12 WGET_URL="http://hal.freedesktop.org/releases/$TARBALL"
pankso@792 13
pankso@792 14 EXTRA="
pankso@792 15 hald-addon-cpufreq
pankso@792 16 hald-addon-hid-ups
pankso@792 17 hald-addon-imac-backlight
pankso@3106 18 hald-addon-ipw-killswitch
pankso@792 19 hald-probe-video4linux
pankso@792 20 hald-probe-net-bluetooth
pankso@792 21 hald-probe-ieee1394-unit
pankso@792 22 hald-probe-pc-floppy
pankso@3106 23 hald-probe-printer"
pankso@792 24
pankso@792 25 # Rules to configure and make the package.
pankso@792 26 compile_rules()
pankso@792 27 {
pankso@792 28 cd $src
pascal@2081 29 zcat /usr/share/misc/pci.ids.gz > /usr/share/misc/pci.ids &&
gokhlayeh@8615 30 patch -p1 < ../stuff/hal-scripts.u || return 1 &&
gokhlayeh@8615 31 #patch -p1 < ../stuff/hal-udev.patch || return 1 &&
pascal@6113 32 grep -qs 'define u8' hald/linux/probing/linux_dvd_rw_utils.c ||
pascal@6113 33 sed -i 's|#include <scsi/scsi.h>|#define u8 __u8\n&|' \
pascal@6113 34 hald/linux/probing/linux_dvd_rw_utils.c
pankso@792 35 ./configure \
pankso@792 36 --prefix=/usr \
pankso@792 37 --libexecdir=/usr/lib/hal \
pankso@792 38 --sysconfdir=/etc \
pankso@792 39 --localstatedir=/var \
pankso@792 40 --mandir=/usr/share/man \
pankso@792 41 --disable-usb-ids \
pankso@792 42 --disable-policy-kit \
pascal@1536 43 $CONFIGURE_ARGS &&
pascal@1536 44 make &&
pascal@2081 45 rm /usr/share/misc/pci.ids &&
pankso@792 46 make DESTDIR=$PWD/_pkg install
pankso@792 47 }
pankso@792 48
pankso@792 49 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@792 50 genpkg_rules()
pankso@792 51 {
pankso@792 52 mkdir -p $fs/usr/lib $fs/usr/share
pankso@792 53 cp -a $_pkg/etc $fs
pankso@792 54 cp -a $_pkg/var $fs
pankso@792 55 cp -a $_pkg/usr/bin $fs/usr
pankso@792 56 cp -a $_pkg/usr/sbin $fs/usr
pankso@792 57 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
pankso@792 58 cp -a $_pkg/usr/lib/hal $fs/usr/lib
pankso@792 59 cp -a $_pkg/usr/share/hal $fs/usr/share
pankso@792 60 chmod -R +x $fs/usr/lib/hal/scripts/*
pankso@2832 61 # Remove a few run time lib and strip.
pankso@792 62 for lib in $EXTRA
pankso@792 63 do
pankso@792 64 rm $fs/usr/lib/hal/$lib
pankso@792 65 done
pankso@2832 66 strip -s $fs/usr/lib/hal/* 2>/dev/null
pankso@792 67 # Init script
pankso@792 68 cp -a stuff/etc $fs
erjo@4743 69
erjo@4743 70 # Policy for ntfs-3g
erjo@4743 71 cp -a stuff/policy $fs/usr/share/hal/fdi/
pankso@792 72 chown -R root.root $fs
pankso@4114 73
jozee@3326 74 # exclude unwanted fdi files
jozee@3326 75 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-cpufreq.fdi
jozee@3326 76 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-dockstation.fdi
jozee@3326 77 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-imac-backlight.fdi
jozee@3326 78 rm $fs/usr/share/hal/fdi/policy/10osvendor/15-storage-luks.fdi
jozee@3326 79 rm $fs/usr/share/hal/fdi/policy/10osvendor/30-wol.fdi
jozee@5113 80
jozee@5113 81 # change bash to sh in hal scripts
jozee@5113 82 sed -i 's:/bin/bash:/bin/sh:' $fs/usr/lib/hal/scripts/hal*
jozee@5113 83 sed -i 's:/bin/bash:/bin/sh:' $fs/usr/lib/hal/scripts/linux/hal*
jozee@5113 84 # use full-path
jozee@5113 85 sed -i 's:hal-functions:/usr/lib/hal/scripts/hal-functions:' $fs/usr/lib/hal/scripts/hal*
jozee@5113 86 sed -i 's:hal-functions:/usr/lib/hal/scripts/hal-functions:' $fs/usr/lib/hal/scripts/linux/hal*
pankso@792 87 }
pankso@792 88
pankso@792 89 pre_install()
pankso@792 90 {
pankso@792 91 local root
pankso@792 92 root=$1
pankso@792 93 # Go for echoing on configuration files if any haldeamon user
pankso@792 94 # was found.
pankso@811 95 if ! grep -q 'haldaemon' $root/etc/passwd; then
pankso@792 96 echo -n "Adding user: messagebus..."
pankso@792 97 echo 'haldaemon:x:26:26:HAL Daemon User:/dev/null:/bin/false' >> $root/etc/passwd
pankso@792 98 echo 'haldaemon:!:14013:0:99999:7:::' >> $root/etc/shadow
pankso@792 99 echo 'haldaemon:x:26:' >> $root/etc/group
pankso@792 100 echo 'haldaemon:!::' >> $root/etc/gshadow
pankso@792 101 status
pankso@792 102 fi
pankso@792 103 if ! grep -q ^HALD_OPTIONS $root/etc/daemons.conf; then
pankso@792 104 echo -n "Configuring $root/etc/daemons.conf..."
pankso@792 105 cat >> $root/etc/daemons.conf << "EOT"
pankso@792 106 # HAL daemon options.
pankso@792 107 HALD_OPTIONS="--daemon=yes"
pankso@792 108
pankso@792 109 EOT
pankso@792 110 status
pankso@792 111 fi
pankso@792 112 }
pankso@792 113
pankso@792 114 pre_remove()
pankso@792 115 {
pankso@792 116 /etc/init.d/hald stop
pankso@792 117 deluser haldaemon
pankso@792 118 }