wok-next view hal/receipt @ rev 20332
Up exosip, httpfs-fuse, libvncserver, upx; add upx391 (for httpfs-fuse)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Wed Nov 15 14:21:32 2017 +0200 (2017-11-15) |
parents | ff5fd8788cd9 |
children | d43bf7aae921 |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="hal"
4 VERSION="0.5.14"
5 CATEGORY="x-window"
6 SHORT_DESC="Hardware Abstraction Layer."
7 MAINTAINER="pankso@slitaz.org"
8 LICENSE="GPL2"
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://www.freedesktop.org/wiki/Software/hal"
11 WGET_URL="http://hal.freedesktop.org/releases/$TARBALL"
12 CROSS="error: cannot check for file existence when cross compiling"
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"
17 SPLIT="hal hal-dev hal-extra hal-scripts"
19 EXTRA="
20 hald-addon-cpufreq
21 hald-addon-hid-ups
22 hald-addon-imac-backlight
23 hald-addon-ipw-killswitch
24 hald-probe-video4linux
25 hald-probe-net-bluetooth
26 hald-probe-ieee1394-unit
27 hald-probe-pc-floppy
28 hald-probe-printer"
30 # Rules to configure and make the package.
31 compile_rules()
32 {
33 cd $src
34 sed -i 's|linux/videodev.h|libv4l1-videodev.h|' \
35 hald/linux/probing/probe-video4linux.c
36 sed -i 's|glib/gmain|glib|' hald/linux/addons/addon-*.c
37 zcat /usr/share/misc/pci.ids.gz > /usr/share/misc/pci.ids &&
38 patch -p1 < $stuff/hal-scripts.u || return 1 &&
39 #patch -p1 < $stuff/hal-udev.patch || return 1 &&
40 grep -qs 'define u8' hald/linux/probing/linux_dvd_rw_utils.c ||
41 sed -i 's|#include <scsi/scsi.h>|#define u8 __u8\n&|' \
42 hald/linux/probing/linux_dvd_rw_utils.c
43 ./configure \
44 --prefix=/usr \
45 --libexecdir=/usr/lib/hal \
46 --sysconfdir=/etc \
47 --localstatedir=/var \
48 --disable-usb-ids \
49 --disable-policy-kit \
50 --build=$HOST_SYSTEM \
51 --host=$HOST_SYSTEM &&
52 make &&
53 rm /usr/share/misc/pci.ids &&
54 make install
55 }
57 # Rules to gen a SliTaz package suitable for Tazpkg.
58 genpkg_rules()
59 {
60 case $PACKAGE in
61 hal)
62 DEPENDS="dbus dbus-glib slitaz-base-files udev \
63 util-linux-blkid libusb-compat"
64 mkdir -p $fs/usr/lib $fs/usr/share
65 cp -a $install/etc $fs
66 cp -a $install/var $fs
67 cp -a $install/usr/bin $fs/usr
68 cp -a $install/usr/sbin $fs/usr
69 cp -a $install/usr/lib/*.so* $fs/usr/lib
70 cp -a $install/usr/lib/hal $fs/usr/lib
71 cp -a $install/usr/share/hal $fs/usr/share
72 chmod -R +x $fs/usr/lib/hal/scripts/*
73 # Remove a few run time lib and strip.
74 for lib in $EXTRA
75 do
76 rm $fs/usr/lib/hal/$lib
77 done
78 strip -s $fs/usr/lib/hal/* 2>/dev/null
79 # Init script
80 cp -a stuff/etc $fs
82 # Policy for ntfs-3g
83 cp -a stuff/policy $fs/usr/share/hal/fdi/
84 chown -R root.root $fs
86 # exclude unwanted fdi files
87 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-cpufreq.fdi
88 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-dockstation.fdi
89 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-imac-backlight.fdi
90 rm $fs/usr/share/hal/fdi/policy/10osvendor/15-storage-luks.fdi
91 rm $fs/usr/share/hal/fdi/policy/10osvendor/30-wol.fdi
93 # change bash to sh in hal scripts
94 sed -i 's:/bin/bash:/bin/sh:' $fs/usr/lib/hal/scripts/hal*
95 sed -i 's:/bin/bash:/bin/sh:' $fs/usr/lib/hal/scripts/linux/hal*
96 # use full-path
97 sed -i 's:hal-functions:/usr/lib/hal/scripts/hal-functions:' $fs/usr/lib/hal/scripts/hal*
98 sed -i 's:hal-functions:/usr/lib/hal/scripts/hal-functions:' $fs/usr/lib/hal/scripts/linux/hal*
99 ;;
100 hal-dev)
101 CAT="development|Hal devel files."
102 DEPENDS="hal dbus-dev pkg-config"
103 mkdir -p $fs/usr/lib
104 cp -a $install/usr/include $fs/usr
105 cp -a $install/usr/lib/*.*a $fs/usr/lib
106 cp -a $install/usr/lib/pkgconfig $fs/usr/lib
107 ;;
108 hal-extra)
109 CAT="x-window|Hal extra lib and fdi files."
110 DEPENDS="dbus dbus-glib glib hal"
111 mkdir -p $fs/usr/lib/hal $fs/usr/share/hal/fdi/policy/10osvendor
112 for lib in $EXTRA
113 do
114 cp $install/usr/lib/hal/$lib $fs/usr/lib/hal
115 done
117 # copy some excluded files from hal
118 cp -a $install/usr/share/hal/fdi/policy/10osvendor/10-cpufreq.fdi $fs/usr/share/hal/fdi/policy/10osvendor
119 cp -a $install/usr/share/hal/fdi/policy/10osvendor/10-dockstation.fdi $fs/usr/share/hal/fdi/policy/10osvendor
120 cp -a $install/usr/share/hal/fdi/policy/10osvendor/10-imac-backlight.fdi $fs/usr/share/hal/fdi/policy/10osvendor
121 cp -a $install/usr/share/hal/fdi/policy/10osvendor/15-storage-luks.fdi $fs/usr/share/hal/fdi/policy/10osvendor
122 cp -a $install/usr/share/hal/fdi/policy/10osvendor/30-wol.fdi $fs/usr/share/hal/fdi/policy/10osvendor
123 ;;
124 hal-scripts)
125 CAT="x-window|Hal scripts files."
126 DEPENDS="dbus dbus-glib glib hal"
127 mkdir -p $fs/usr/lib/hal
128 cp -a $install/usr/lib/hal/scripts $fs/usr/lib/hal
129 ;;
130 esac
131 }
133 pre_install_hal()
134 {
135 # Go for echoing on configuration files if any haldaemon user
136 # was found.
137 if ! grep -q 'haldaemon' "$1/etc/passwd"; then
138 echo -n "Adding user: messagebus..."
139 echo 'haldaemon:x:26:26:HAL Daemon User:/dev/null:/bin/false' >> "$1/etc/passwd"
140 echo 'haldaemon:!:14013:0:99999:7:::' >> "$1/etc/shadow"
141 echo 'haldaemon:x:26:' >> "$1/etc/group"
142 echo 'haldaemon:!::' >> "$1/etc/gshadow"
143 status
144 fi
145 if ! grep -q ^HALD_OPTIONS "$1/etc/daemons.conf"; then
146 echo -n "Configuring /etc/daemons.conf..."
147 cat >> "$1/etc/daemons.conf" << "EOT"
148 # HAL daemon options.
149 HALD_OPTIONS="--daemon=yes"
151 EOT
152 status
153 fi
154 }
156 pre_remove_hal()
157 {
158 /etc/init.d/hald stop
159 deluser haldaemon
160 }