wok-6.x view hal/receipt @ rev 3694

Update: bzip2 (handle BusyBox symlinks)
author Matthew Sheets <rcx@zoominternet.net>
date Thu Jul 16 09:41:09 2009 +0000 (2009-07-16)
parents 0586a2e564d5
children f67d486cebfd
line source
1 # SliTaz package receipt.
3 PACKAGE="hal"
4 VERSION="0.5.12"
5 CATEGORY="x-window"
6 SHORT_DESC="Hardware Abstraction Layer."
7 DEPENDS="dbus dbus-glib slitaz-base-files udev util-linux-ng-blkid"
8 BUILD_DEPENDS="dbus-dev dbus-glib-dev udev-dev udev pciutils util-linux-ng-blkid-dev"
9 MAINTAINER="pankso@slitaz.org"
10 TARBALL="$PACKAGE-$VERSION.tar.gz"
11 WEB_SITE="http://www.freedesktop.org/wiki/Software/hal"
12 WGET_URL="http://hal.freedesktop.org/releases/$TARBALL"
14 EXTRA="
15 hald-addon-cpufreq
16 hald-addon-hid-ups
17 hald-addon-imac-backlight
18 hald-addon-ipw-killswitch
19 hald-probe-video4linux
20 hald-probe-net-bluetooth
21 hald-probe-ieee1394-unit
22 hald-probe-pc-floppy
23 hald-probe-printer"
25 # Rules to configure and make the package.
26 compile_rules()
27 {
28 cd $src
29 zcat /usr/share/misc/pci.ids.gz > /usr/share/misc/pci.ids &&
30 #patch -p1 < ../stuff/hal-udev.patch || exit 1 &&
31 ./configure \
32 --prefix=/usr \
33 --libexecdir=/usr/lib/hal \
34 --sysconfdir=/etc \
35 --localstatedir=/var \
36 --mandir=/usr/share/man \
37 --disable-usb-ids \
38 --disable-policy-kit \
39 $CONFIGURE_ARGS &&
40 make &&
41 rm /usr/share/misc/pci.ids &&
42 make DESTDIR=$PWD/_pkg install
43 }
45 # Rules to gen a SliTaz package suitable for Tazpkg.
46 genpkg_rules()
47 {
48 mkdir -p $fs/usr/lib $fs/usr/share
49 cp -a $_pkg/etc $fs
50 cp -a $_pkg/var $fs
51 cp -a $_pkg/usr/bin $fs/usr
52 cp -a $_pkg/usr/sbin $fs/usr
53 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
54 cp -a $_pkg/usr/lib/hal $fs/usr/lib
55 cp -a $_pkg/usr/share/hal $fs/usr/share
56 chmod -R +x $fs/usr/lib/hal/scripts/*
57 # Remove a few run time lib and strip.
58 for lib in $EXTRA
59 do
60 rm $fs/usr/lib/hal/$lib
61 done
62 strip -s $fs/usr/lib/hal/* 2>/dev/null
63 # Init script
64 cp -a stuff/etc $fs
65 chown -R root.root $fs
67 # exclude unwanted fdi files
68 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-cpufreq.fdi
69 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-dockstation.fdi
70 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-imac-backlight.fdi
71 rm $fs/usr/share/hal/fdi/policy/10osvendor/15-storage-luks.fdi
72 rm $fs/usr/share/hal/fdi/policy/10osvendor/30-wol.fdi
73 }
75 pre_install()
76 {
77 local root
78 root=$1
79 # Go for echoing on configuration files if any haldeamon user
80 # was found.
81 if ! grep -q 'haldaemon' $root/etc/passwd; then
82 echo -n "Adding user: messagebus..."
83 echo 'haldaemon:x:26:26:HAL Daemon User:/dev/null:/bin/false' >> $root/etc/passwd
84 echo 'haldaemon:!:14013:0:99999:7:::' >> $root/etc/shadow
85 echo 'haldaemon:x:26:' >> $root/etc/group
86 echo 'haldaemon:!::' >> $root/etc/gshadow
87 status
88 fi
89 if ! grep -q ^HALD_OPTIONS $root/etc/daemons.conf; then
90 echo -n "Configuring $root/etc/daemons.conf..."
91 cat >> $root/etc/daemons.conf << "EOT"
92 # HAL daemon options.
93 HALD_OPTIONS="--daemon=yes"
95 EOT
96 status
97 fi
98 }
100 pre_remove()
101 {
102 /etc/init.d/hald stop
103 deluser haldaemon
104 }