wok-current view hal/receipt @ rev 25634
Mass update, new toolchain gcc 8.3.0, glibc 2.28.0
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Sun Jan 14 08:12:37 2024 +0000 (9 months ago) |
parents | 45673422e44e |
children |
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="https://www.freedesktop.org/wiki/Software/hal"
11 WGET_URL="https://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 # Patch to be build with glibc 2.28
51 patch -p1 < $stuff/glibc-2.28-build.patch
52 ./configure \
53 --prefix=/usr \
54 --libexecdir=/usr/lib/hal \
55 --sysconfdir=/etc \
56 --localstatedir=/var \
57 --disable-usb-ids \
58 --disable-policy-kit \
59 --build=$HOST_SYSTEM \
60 --host=$HOST_SYSTEM &&
61 make &&
62 rm /usr/share/misc/pci.ids &&
63 make install
64 }
66 # Rules to gen a SliTaz package suitable for Tazpkg.
67 genpkg_rules()
68 {
69 mkdir -p $fs/usr/lib $fs/usr/share
70 cp -a $install/etc $fs
71 cp -a $install/var $fs
72 cp -a $install/usr/bin $fs/usr
73 cp -a $install/usr/sbin $fs/usr
74 cp -a $install/usr/lib/*.so* $fs/usr/lib
75 cp -a $install/usr/lib/hal $fs/usr/lib
76 cp -a $install/usr/share/hal $fs/usr/share
77 chmod -R +x $fs/usr/lib/hal/scripts/*
78 # Remove a few run time lib and strip.
79 for lib in $EXTRA
80 do
81 rm $fs/usr/lib/hal/$lib
82 done
83 strip -s $fs/usr/lib/hal/* 2>/dev/null
84 # Init script
85 cp -a stuff/etc $fs
87 # Policy for ntfs-3g
88 cp -a stuff/policy $fs/usr/share/hal/fdi/
89 chown -R root.root $fs
91 # exclude unwanted fdi files
92 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-cpufreq.fdi
93 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-dockstation.fdi
94 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-imac-backlight.fdi
95 rm $fs/usr/share/hal/fdi/policy/10osvendor/15-storage-luks.fdi
96 rm $fs/usr/share/hal/fdi/policy/10osvendor/30-wol.fdi
98 # change bash to sh in hal scripts
99 sed -i 's:/bin/bash:/bin/sh:' $fs/usr/lib/hal/scripts/hal*
100 sed -i 's:/bin/bash:/bin/sh:' $fs/usr/lib/hal/scripts/linux/hal*
101 # use full-path
102 sed -i 's:hal-functions:/usr/lib/hal/scripts/hal-functions:' $fs/usr/lib/hal/scripts/hal*
103 sed -i 's:hal-functions:/usr/lib/hal/scripts/hal-functions:' $fs/usr/lib/hal/scripts/linux/hal*
104 }
106 pre_install()
107 {
108 # Go for echoing on configuration files if any haldaemon user
109 # was found.
110 if ! grep -q 'haldaemon' "$1/etc/passwd"; then
111 echo -n "Adding user: messagebus..."
112 echo 'haldaemon:x:26:26:HAL Daemon User:/dev/null:/bin/false' >> "$1/etc/passwd"
113 echo 'haldaemon:!:14013:0:99999:7:::' >> "$1/etc/shadow"
114 echo 'haldaemon:x:26:' >> "$1/etc/group"
115 echo 'haldaemon:!::' >> "$1/etc/gshadow"
116 status
117 fi
118 if ! grep -q ^HALD_OPTIONS "$1/etc/daemons.conf"; then
119 echo -n "Configuring /etc/daemons.conf..."
120 cat >> "$1/etc/daemons.conf" << "EOT"
121 # HAL daemon options.
122 HALD_OPTIONS="--daemon=yes"
124 EOT
125 status
126 fi
127 }
129 pre_remove()
130 {
131 /etc/init.d/hald stop
132 deluser haldaemon
133 }