wok view hal/receipt @ rev 13786

Up mesa (9.0.1)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Jan 04 21:06:24 2013 +0100 (2013-01-04)
parents f66acd3122e3
children 7896f0694ef6
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 MAINTAINER="pankso@slitaz.org"
8 TARBALL="$PACKAGE-$VERSION.tar.gz"
9 WEB_SITE="http://www.freedesktop.org/wiki/Software/hal"
10 WGET_URL="http://hal.freedesktop.org/releases/$TARBALL"
11 CROSS="error: cannot check for file existence when cross compiling"
13 DEPENDS="dbus dbus-glib slitaz-base-files udev util-linux-blkid libusb-compat"
14 BUILD_DEPENDS="dbus-dev dbus-glib dbus-glib-dev udev-dev pciutils \
15 util-linux-blkid-dev expat-dev util-linux-uuid-dev glib-dev pkg-config \
16 libv4l-dev"
18 EXTRA="
19 hald-addon-cpufreq
20 hald-addon-hid-ups
21 hald-addon-imac-backlight
22 hald-addon-ipw-killswitch
23 hald-probe-video4linux
24 hald-probe-net-bluetooth
25 hald-probe-ieee1394-unit
26 hald-probe-pc-floppy
27 hald-probe-printer"
29 # Rules to configure and make the package.
30 compile_rules()
31 {
32 cd $src
33 sed -i 's|linux/videodev.h|libv4l1-videodev.h|' \
34 hald/linux/probing/probe-video4linux.c
35 sed -i 's|glib/gmain|glib|' hald/linux/addons/addon-*.c
36 zcat /usr/share/misc/pci.ids.gz > /usr/share/misc/pci.ids &&
37 patch -p1 < $stuff/hal-scripts.u || return 1 &&
38 #patch -p1 < $stuff/hal-udev.patch || return 1 &&
39 grep -qs 'define u8' hald/linux/probing/linux_dvd_rw_utils.c ||
40 sed -i 's|#include <scsi/scsi.h>|#define u8 __u8\n&|' \
41 hald/linux/probing/linux_dvd_rw_utils.c
42 ./configure \
43 --prefix=/usr \
44 --libexecdir=/usr/lib/hal \
45 --sysconfdir=/etc \
46 --localstatedir=/var \
47 --disable-usb-ids \
48 --disable-policy-kit \
49 --build=$HOST_SYSTEM \
50 --host=$HOST_SYSTEM &&
51 make &&
52 rm /usr/share/misc/pci.ids &&
53 make install
54 }
56 # Rules to gen a SliTaz package suitable for Tazpkg.
57 genpkg_rules()
58 {
59 mkdir -p $fs/usr/lib $fs/usr/share
60 cp -a $_pkg/etc $fs
61 cp -a $_pkg/var $fs
62 cp -a $_pkg/usr/bin $fs/usr
63 cp -a $_pkg/usr/sbin $fs/usr
64 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
65 cp -a $_pkg/usr/lib/hal $fs/usr/lib
66 cp -a $_pkg/usr/share/hal $fs/usr/share
67 chmod -R +x $fs/usr/lib/hal/scripts/*
68 # Remove a few run time lib and strip.
69 for lib in $EXTRA
70 do
71 rm $fs/usr/lib/hal/$lib
72 done
73 strip -s $fs/usr/lib/hal/* 2>/dev/null
74 # Init script
75 cp -a stuff/etc $fs
77 # Policy for ntfs-3g
78 cp -a stuff/policy $fs/usr/share/hal/fdi/
79 chown -R root.root $fs
81 # exclude unwanted fdi files
82 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-cpufreq.fdi
83 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-dockstation.fdi
84 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-imac-backlight.fdi
85 rm $fs/usr/share/hal/fdi/policy/10osvendor/15-storage-luks.fdi
86 rm $fs/usr/share/hal/fdi/policy/10osvendor/30-wol.fdi
88 # change bash to sh in hal scripts
89 sed -i 's:/bin/bash:/bin/sh:' $fs/usr/lib/hal/scripts/hal*
90 sed -i 's:/bin/bash:/bin/sh:' $fs/usr/lib/hal/scripts/linux/hal*
91 # use full-path
92 sed -i 's:hal-functions:/usr/lib/hal/scripts/hal-functions:' $fs/usr/lib/hal/scripts/hal*
93 sed -i 's:hal-functions:/usr/lib/hal/scripts/hal-functions:' $fs/usr/lib/hal/scripts/linux/hal*
94 }
96 pre_install()
97 {
98 local root
99 root=$1
100 # Go for echoing on configuration files if any haldeamon user
101 # was found.
102 if ! grep -q 'haldaemon' $root/etc/passwd; then
103 echo -n "Adding user: messagebus..."
104 echo 'haldaemon:x:26:26:HAL Daemon User:/dev/null:/bin/false' >> $root/etc/passwd
105 echo 'haldaemon:!:14013:0:99999:7:::' >> $root/etc/shadow
106 echo 'haldaemon:x:26:' >> $root/etc/group
107 echo 'haldaemon:!::' >> $root/etc/gshadow
108 status
109 fi
110 if ! grep -q ^HALD_OPTIONS $root/etc/daemons.conf; then
111 echo -n "Configuring $root/etc/daemons.conf..."
112 cat >> $root/etc/daemons.conf << "EOT"
113 # HAL daemon options.
114 HALD_OPTIONS="--daemon=yes"
116 EOT
117 status
118 fi
119 }
121 pre_remove()
122 {
123 /etc/init.d/hald stop
124 deluser haldaemon
125 }