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

Add perl-gd
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Feb 16 21:18:50 2010 +0100 (2010-02-16)
parents 175595bba021
children 8d3f3ded1725
line source
1 # SliTaz package receipt.
3 PACKAGE="hal"
4 VERSION="0.5.13"
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 expat-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-scripts.u || exit 1 &&
31 #patch -p1 < ../stuff/hal-udev.patch || exit 1 &&
32 ./configure \
33 --prefix=/usr \
34 --libexecdir=/usr/lib/hal \
35 --sysconfdir=/etc \
36 --localstatedir=/var \
37 --mandir=/usr/share/man \
38 --disable-usb-ids \
39 --disable-policy-kit \
40 $CONFIGURE_ARGS &&
41 make &&
42 rm /usr/share/misc/pci.ids &&
43 make DESTDIR=$PWD/_pkg install
44 }
46 # Rules to gen a SliTaz package suitable for Tazpkg.
47 genpkg_rules()
48 {
49 mkdir -p $fs/usr/lib $fs/usr/share
50 cp -a $_pkg/etc $fs
51 cp -a $_pkg/var $fs
52 cp -a $_pkg/usr/bin $fs/usr
53 cp -a $_pkg/usr/sbin $fs/usr
54 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
55 cp -a $_pkg/usr/lib/hal $fs/usr/lib
56 cp -a $_pkg/usr/share/hal $fs/usr/share
57 chmod -R +x $fs/usr/lib/hal/scripts/*
58 # Remove a few run time lib and strip.
59 for lib in $EXTRA
60 do
61 rm $fs/usr/lib/hal/$lib
62 done
63 strip -s $fs/usr/lib/hal/* 2>/dev/null
64 # Init script
65 cp -a stuff/etc $fs
67 # Policy for ntfs-3g
68 cp -a stuff/policy $fs/usr/share/hal/fdi/
69 chown -R root.root $fs
71 # exclude unwanted fdi files
72 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-cpufreq.fdi
73 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-dockstation.fdi
74 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-imac-backlight.fdi
75 rm $fs/usr/share/hal/fdi/policy/10osvendor/15-storage-luks.fdi
76 rm $fs/usr/share/hal/fdi/policy/10osvendor/30-wol.fdi
77 }
79 pre_install()
80 {
81 local root
82 root=$1
83 # Go for echoing on configuration files if any haldeamon user
84 # was found.
85 if ! grep -q 'haldaemon' $root/etc/passwd; then
86 echo -n "Adding user: messagebus..."
87 echo 'haldaemon:x:26:26:HAL Daemon User:/dev/null:/bin/false' >> $root/etc/passwd
88 echo 'haldaemon:!:14013:0:99999:7:::' >> $root/etc/shadow
89 echo 'haldaemon:x:26:' >> $root/etc/group
90 echo 'haldaemon:!::' >> $root/etc/gshadow
91 status
92 fi
93 if ! grep -q ^HALD_OPTIONS $root/etc/daemons.conf; then
94 echo -n "Configuring $root/etc/daemons.conf..."
95 cat >> $root/etc/daemons.conf << "EOT"
96 # HAL daemon options.
97 HALD_OPTIONS="--daemon=yes"
99 EOT
100 status
101 fi
102 }
104 pre_remove()
105 {
106 /etc/init.d/hald stop
107 deluser haldaemon
108 }