wok-6.x view hal/receipt @ rev 5695
Up: p7zip (9.13)
author | Alexander Medvedev <devl547@gmail.com> |
---|---|
date | Wed Jun 16 19:53:27 2010 +0000 (2010-06-16) |
parents | ca2e9a95d244 |
children | 964f5d384827 |
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 libusb"
8 BUILD_DEPENDS="dbus-dev dbus-glib-dev udev-dev udev pciutils util-linux-ng-blkid-dev expat-dev util-linux-ng-uuid-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
78 # change bash to sh in hal scripts
79 sed -i 's:/bin/bash:/bin/sh:' $fs/usr/lib/hal/scripts/hal*
80 sed -i 's:/bin/bash:/bin/sh:' $fs/usr/lib/hal/scripts/linux/hal*
81 # use full-path
82 sed -i 's:hal-functions:/usr/lib/hal/scripts/hal-functions:' $fs/usr/lib/hal/scripts/hal*
83 sed -i 's:hal-functions:/usr/lib/hal/scripts/hal-functions:' $fs/usr/lib/hal/scripts/linux/hal*
84 }
86 pre_install()
87 {
88 local root
89 root=$1
90 # Go for echoing on configuration files if any haldeamon user
91 # was found.
92 if ! grep -q 'haldaemon' $root/etc/passwd; then
93 echo -n "Adding user: messagebus..."
94 echo 'haldaemon:x:26:26:HAL Daemon User:/dev/null:/bin/false' >> $root/etc/passwd
95 echo 'haldaemon:!:14013:0:99999:7:::' >> $root/etc/shadow
96 echo 'haldaemon:x:26:' >> $root/etc/group
97 echo 'haldaemon:!::' >> $root/etc/gshadow
98 status
99 fi
100 if ! grep -q ^HALD_OPTIONS $root/etc/daemons.conf; then
101 echo -n "Configuring $root/etc/daemons.conf..."
102 cat >> $root/etc/daemons.conf << "EOT"
103 # HAL daemon options.
104 HALD_OPTIONS="--daemon=yes"
106 EOT
107 status
108 fi
109 }
111 pre_remove()
112 {
113 /etc/init.d/hald stop
114 deluser haldaemon
115 }