wok-current view hal/receipt @ rev 8676
Up tazwok-experimental 0.0.6.6 (hopefully the last today :D...)
author | Antoine Bodin <gokhlayeh@slitaz.org> |
---|---|
date | Thu Feb 17 00:44:16 2011 +0100 (2011-02-17) |
parents | 43ca77c1cfa6 |
children | 74b63eaf8099 |
line source
1 # SliTaz package receipt.
3 PACKAGE="hal"
4 VERSION="0.5.14"
5 CATEGORY="x-window"
6 SHORT_DESC="Hardware Abstraction Layer."
7 DEPENDS="dbus dbus-glib slitaz-base-files udev util-linux-ng-blkid libusb-compat"
8 BUILD_DEPENDS="dbus-dev dbus-glib dbus-glib-dev udev-dev pciutils util-linux-ng-blkid-dev expat-dev util-linux-ng-uuid-dev glib-dev pkg-config"
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 || return 1 &&
31 #patch -p1 < ../stuff/hal-udev.patch || return 1 &&
32 grep -qs 'define u8' hald/linux/probing/linux_dvd_rw_utils.c ||
33 sed -i 's|#include <scsi/scsi.h>|#define u8 __u8\n&|' \
34 hald/linux/probing/linux_dvd_rw_utils.c
35 ./configure \
36 --prefix=/usr \
37 --libexecdir=/usr/lib/hal \
38 --sysconfdir=/etc \
39 --localstatedir=/var \
40 --mandir=/usr/share/man \
41 --disable-usb-ids \
42 --disable-policy-kit \
43 $CONFIGURE_ARGS &&
44 make &&
45 rm /usr/share/misc/pci.ids &&
46 make DESTDIR=$PWD/_pkg install
47 }
49 # Rules to gen a SliTaz package suitable for Tazpkg.
50 genpkg_rules()
51 {
52 mkdir -p $fs/usr/lib $fs/usr/share
53 cp -a $_pkg/etc $fs
54 cp -a $_pkg/var $fs
55 cp -a $_pkg/usr/bin $fs/usr
56 cp -a $_pkg/usr/sbin $fs/usr
57 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
58 cp -a $_pkg/usr/lib/hal $fs/usr/lib
59 cp -a $_pkg/usr/share/hal $fs/usr/share
60 chmod -R +x $fs/usr/lib/hal/scripts/*
61 # Remove a few run time lib and strip.
62 for lib in $EXTRA
63 do
64 rm $fs/usr/lib/hal/$lib
65 done
66 strip -s $fs/usr/lib/hal/* 2>/dev/null
67 # Init script
68 cp -a stuff/etc $fs
70 # Policy for ntfs-3g
71 cp -a stuff/policy $fs/usr/share/hal/fdi/
72 chown -R root.root $fs
74 # exclude unwanted fdi files
75 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-cpufreq.fdi
76 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-dockstation.fdi
77 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-imac-backlight.fdi
78 rm $fs/usr/share/hal/fdi/policy/10osvendor/15-storage-luks.fdi
79 rm $fs/usr/share/hal/fdi/policy/10osvendor/30-wol.fdi
81 # change bash to sh in hal scripts
82 sed -i 's:/bin/bash:/bin/sh:' $fs/usr/lib/hal/scripts/hal*
83 sed -i 's:/bin/bash:/bin/sh:' $fs/usr/lib/hal/scripts/linux/hal*
84 # use full-path
85 sed -i 's:hal-functions:/usr/lib/hal/scripts/hal-functions:' $fs/usr/lib/hal/scripts/hal*
86 sed -i 's:hal-functions:/usr/lib/hal/scripts/hal-functions:' $fs/usr/lib/hal/scripts/linux/hal*
87 }
89 pre_install()
90 {
91 local root
92 root=$1
93 # Go for echoing on configuration files if any haldeamon user
94 # was found.
95 if ! grep -q 'haldaemon' $root/etc/passwd; then
96 echo -n "Adding user: messagebus..."
97 echo 'haldaemon:x:26:26:HAL Daemon User:/dev/null:/bin/false' >> $root/etc/passwd
98 echo 'haldaemon:!:14013:0:99999:7:::' >> $root/etc/shadow
99 echo 'haldaemon:x:26:' >> $root/etc/group
100 echo 'haldaemon:!::' >> $root/etc/gshadow
101 status
102 fi
103 if ! grep -q ^HALD_OPTIONS $root/etc/daemons.conf; then
104 echo -n "Configuring $root/etc/daemons.conf..."
105 cat >> $root/etc/daemons.conf << "EOT"
106 # HAL daemon options.
107 HALD_OPTIONS="--daemon=yes"
109 EOT
110 status
111 fi
112 }
114 pre_remove()
115 {
116 /etc/init.d/hald stop
117 deluser haldaemon
118 }