wok-4.x view hal/receipt @ rev 2482
h*: update depends
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Mar 15 20:53:26 2009 +0000 (2009-03-15) |
parents | bbe071477efe |
children | fdfadcb4b1d9 |
line source
1 # SliTaz package receipt.
3 PACKAGE="hal"
4 VERSION="0.5.11"
5 CATEGORY="x-window"
6 SHORT_DESC="Hardware Abstraction Layer."
7 DEPENDS="dbus dbus-glib slitaz-base-files udev"
8 BUILD_DEPENDS="dbus-dev dbus-glib-dev udev-dev udev pciutils"
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-probe-video4linux
19 hald-probe-net-bluetooth
20 hald-probe-ieee1394-unit
21 hald-probe-pc-floppy
22 hald-probe-printer
23 hal-ipw-killswitch-linux"
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/*
58 # Remove a few run time lib.
59 for lib in $EXTRA
60 do
61 rm $fs/usr/lib/hal/$lib
62 done
64 # Init script
65 cp -a stuff/etc $fs
66 chown -R root.root $fs
67 }
69 pre_install()
70 {
71 local root
72 root=$1
73 # Go for echoing on configuration files if any haldeamon user
74 # was found.
75 if ! grep -q 'haldaemon' $root/etc/passwd; then
76 echo -n "Adding user: messagebus..."
77 echo 'haldaemon:x:26:26:HAL Daemon User:/dev/null:/bin/false' >> $root/etc/passwd
78 echo 'haldaemon:!:14013:0:99999:7:::' >> $root/etc/shadow
79 echo 'haldaemon:x:26:' >> $root/etc/group
80 echo 'haldaemon:!::' >> $root/etc/gshadow
81 status
82 fi
83 if ! grep -q ^HALD_OPTIONS $root/etc/daemons.conf; then
84 echo -n "Configuring $root/etc/daemons.conf..."
85 cat >> $root/etc/daemons.conf << "EOT"
86 # HAL daemon options.
87 HALD_OPTIONS="--daemon=yes"
89 EOT
90 status
91 fi
92 }
94 pre_remove()
95 {
96 /etc/init.d/hald stop
97 deluser haldaemon
98 }