wok view hal/receipt @ rev 24807

Add fast-lzma2
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Mar 22 15:17:43 2022 +0000 (2022-03-22)
parents ff5fd8788cd9
children 45673422e44e
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 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 DEPENDS="dbus dbus-glib slitaz-base-files udev util-linux-blkid libusb-compat"
15 BUILD_DEPENDS="dbus-dev dbus-glib dbus-glib-dev udev-dev pciutils \
16 util-linux-blkid-dev expat-dev util-linux-uuid-dev glib-dev pkg-config \
17 libv4l-dev"
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 # What is the latest version available today?
31 current_version()
32 {
33 wget -O - ${WGET_URL%/*} 2>/dev/null | \
34 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q
35 }
37 # Rules to configure and make the package.
38 compile_rules()
39 {
40 cd $src
41 sed -i 's|linux/videodev.h|libv4l1-videodev.h|' \
42 hald/linux/probing/probe-video4linux.c
43 sed -i 's|glib/gmain|glib|' hald/linux/addons/addon-*.c
44 zcat /usr/share/misc/pci.ids.gz > /usr/share/misc/pci.ids &&
45 patch -p1 < $stuff/hal-scripts.u || return 1 &&
46 #patch -p1 < $stuff/hal-udev.patch || return 1 &&
47 grep -qs 'define u8' hald/linux/probing/linux_dvd_rw_utils.c ||
48 sed -i 's|#include <scsi/scsi.h>|#define u8 __u8\n&|' \
49 hald/linux/probing/linux_dvd_rw_utils.c
50 ./configure \
51 --prefix=/usr \
52 --libexecdir=/usr/lib/hal \
53 --sysconfdir=/etc \
54 --localstatedir=/var \
55 --disable-usb-ids \
56 --disable-policy-kit \
57 --build=$HOST_SYSTEM \
58 --host=$HOST_SYSTEM &&
59 make &&
60 rm /usr/share/misc/pci.ids &&
61 make install
62 }
64 # Rules to gen a SliTaz package suitable for Tazpkg.
65 genpkg_rules()
66 {
67 mkdir -p $fs/usr/lib $fs/usr/share
68 cp -a $install/etc $fs
69 cp -a $install/var $fs
70 cp -a $install/usr/bin $fs/usr
71 cp -a $install/usr/sbin $fs/usr
72 cp -a $install/usr/lib/*.so* $fs/usr/lib
73 cp -a $install/usr/lib/hal $fs/usr/lib
74 cp -a $install/usr/share/hal $fs/usr/share
75 chmod -R +x $fs/usr/lib/hal/scripts/*
76 # Remove a few run time lib and strip.
77 for lib in $EXTRA
78 do
79 rm $fs/usr/lib/hal/$lib
80 done
81 strip -s $fs/usr/lib/hal/* 2>/dev/null
82 # Init script
83 cp -a stuff/etc $fs
85 # Policy for ntfs-3g
86 cp -a stuff/policy $fs/usr/share/hal/fdi/
87 chown -R root.root $fs
89 # exclude unwanted fdi files
90 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-cpufreq.fdi
91 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-dockstation.fdi
92 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-imac-backlight.fdi
93 rm $fs/usr/share/hal/fdi/policy/10osvendor/15-storage-luks.fdi
94 rm $fs/usr/share/hal/fdi/policy/10osvendor/30-wol.fdi
96 # change bash to sh in hal scripts
97 sed -i 's:/bin/bash:/bin/sh:' $fs/usr/lib/hal/scripts/hal*
98 sed -i 's:/bin/bash:/bin/sh:' $fs/usr/lib/hal/scripts/linux/hal*
99 # use full-path
100 sed -i 's:hal-functions:/usr/lib/hal/scripts/hal-functions:' $fs/usr/lib/hal/scripts/hal*
101 sed -i 's:hal-functions:/usr/lib/hal/scripts/hal-functions:' $fs/usr/lib/hal/scripts/linux/hal*
102 }
104 pre_install()
105 {
106 # Go for echoing on configuration files if any haldaemon user
107 # was found.
108 if ! grep -q 'haldaemon' "$1/etc/passwd"; then
109 echo -n "Adding user: messagebus..."
110 echo 'haldaemon:x:26:26:HAL Daemon User:/dev/null:/bin/false' >> "$1/etc/passwd"
111 echo 'haldaemon:!:14013:0:99999:7:::' >> "$1/etc/shadow"
112 echo 'haldaemon:x:26:' >> "$1/etc/group"
113 echo 'haldaemon:!::' >> "$1/etc/gshadow"
114 status
115 fi
116 if ! grep -q ^HALD_OPTIONS "$1/etc/daemons.conf"; then
117 echo -n "Configuring /etc/daemons.conf..."
118 cat >> "$1/etc/daemons.conf" << "EOT"
119 # HAL daemon options.
120 HALD_OPTIONS="--daemon=yes"
122 EOT
123 status
124 fi
125 }
127 pre_remove()
128 {
129 /etc/init.d/hald stop
130 deluser haldaemon
131 }