wok view hal/receipt @ rev 802

hal: --enable-parted (installed by default, so use it)
author Christophe Lincoln <pankso@slitaz.org>
date Thu May 15 23:24:57 2008 +0200 (2008-05-15)
parents 274ea51cd553
children f3f004163c13
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 parted"
8 BUILD_DEPENDS="dbus-dev dbus-glib-dev parted-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-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 ./configure \
30 --prefix=/usr \
31 --libexecdir=/usr/lib/hal \
32 --sysconfdir=/etc \
33 --localstatedir=/var \
34 --mandir=/usr/share/man \
35 --disable-usb-ids \
36 --disable-policy-kit \
37 --enable-parted \
38 $CONFIGURE_ARGS
39 make
40 make DESTDIR=$PWD/_pkg install
41 }
43 # Rules to gen a SliTaz package suitable for Tazpkg.
44 genpkg_rules()
45 {
46 mkdir -p $fs/usr/lib $fs/usr/share
47 cp -a $_pkg/etc $fs
48 cp -a $_pkg/var $fs
49 cp -a $_pkg/usr/bin $fs/usr
50 cp -a $_pkg/usr/sbin $fs/usr
51 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
52 cp -a $_pkg/usr/lib/hal $fs/usr/lib
53 cp -a $_pkg/usr/share/hal $fs/usr/share
54 chmod -R +x $fs/usr/lib/hal/scripts/*
56 # Remove a few run time lib.
57 for lib in $EXTRA
58 do
59 rm $fs/usr/lib/hal/$lib
60 done
62 # Init script
63 cp -a stuff/etc $fs
64 chown -R root.root $fs
65 }
67 pre_install()
68 {
69 local root
70 root=$1
71 # Go for echoing on configuration files if any haldeamon user
72 # was found.
73 if ! grep -q 'messagebus' $root/etc/passwd; then
74 echo -n "Adding user: messagebus..."
75 echo 'haldaemon:x:26:26:HAL Daemon User:/dev/null:/bin/false' >> $root/etc/passwd
76 echo 'haldaemon:!:14013:0:99999:7:::' >> $root/etc/shadow
77 echo 'haldaemon:x:26:' >> $root/etc/group
78 echo 'haldaemon:!::' >> $root/etc/gshadow
79 status
80 fi
81 if ! grep -q ^HALD_OPTIONS $root/etc/daemons.conf; then
82 echo -n "Configuring $root/etc/daemons.conf..."
83 cat >> $root/etc/daemons.conf << "EOT"
84 # HAL daemon options.
85 HALD_OPTIONS="--daemon=yes"
87 EOT
88 status
89 fi
90 }
92 pre_remove()
93 {
94 /etc/init.d/hald stop
95 deluser haldaemon
96 }