wok view hal/receipt @ rev 23445
updated powertop again (2.0 -> 2.11)
author | Hans-G?nter Theisgen |
---|---|
date | Thu Apr 02 16:17:16 2020 +0100 (2020-04-02) |
parents | 9e01bc6321ea |
children | af8d823a3077 |
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 # 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 mkdir -p $fs/usr/lib $fs/usr/share
61 cp -a $install/etc $fs
62 cp -a $install/var $fs
63 cp -a $install/usr/bin $fs/usr
64 cp -a $install/usr/sbin $fs/usr
65 cp -a $install/usr/lib/*.so* $fs/usr/lib
66 cp -a $install/usr/lib/hal $fs/usr/lib
67 cp -a $install/usr/share/hal $fs/usr/share
68 chmod -R +x $fs/usr/lib/hal/scripts/*
69 # Remove a few run time lib and strip.
70 for lib in $EXTRA
71 do
72 rm $fs/usr/lib/hal/$lib
73 done
74 strip -s $fs/usr/lib/hal/* 2>/dev/null
75 # Init script
76 cp -a stuff/etc $fs
78 # Policy for ntfs-3g
79 cp -a stuff/policy $fs/usr/share/hal/fdi/
80 chown -R root.root $fs
82 # exclude unwanted fdi files
83 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-cpufreq.fdi
84 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-dockstation.fdi
85 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-imac-backlight.fdi
86 rm $fs/usr/share/hal/fdi/policy/10osvendor/15-storage-luks.fdi
87 rm $fs/usr/share/hal/fdi/policy/10osvendor/30-wol.fdi
89 # change bash to sh in hal scripts
90 sed -i 's:/bin/bash:/bin/sh:' $fs/usr/lib/hal/scripts/hal*
91 sed -i 's:/bin/bash:/bin/sh:' $fs/usr/lib/hal/scripts/linux/hal*
92 # use full-path
93 sed -i 's:hal-functions:/usr/lib/hal/scripts/hal-functions:' $fs/usr/lib/hal/scripts/hal*
94 sed -i 's:hal-functions:/usr/lib/hal/scripts/hal-functions:' $fs/usr/lib/hal/scripts/linux/hal*
95 }
97 pre_install()
98 {
99 # Go for echoing on configuration files if any haldaemon user
100 # was found.
101 if ! grep -q 'haldaemon' "$1/etc/passwd"; then
102 echo -n "Adding user: messagebus..."
103 echo 'haldaemon:x:26:26:HAL Daemon User:/dev/null:/bin/false' >> "$1/etc/passwd"
104 echo 'haldaemon:!:14013:0:99999:7:::' >> "$1/etc/shadow"
105 echo 'haldaemon:x:26:' >> "$1/etc/group"
106 echo 'haldaemon:!::' >> "$1/etc/gshadow"
107 status
108 fi
109 if ! grep -q ^HALD_OPTIONS "$1/etc/daemons.conf"; then
110 echo -n "Configuring /etc/daemons.conf..."
111 cat >> "$1/etc/daemons.conf" << "EOT"
112 # HAL daemon options.
113 HALD_OPTIONS="--daemon=yes"
115 EOT
116 status
117 fi
118 }
120 pre_remove()
121 {
122 /etc/init.d/hald stop
123 deluser haldaemon
124 }