wok-next view hal/receipt @ rev 20661

Unification of the patch system
author Aleksej Bobylev <al.bobylev@gmail.com>
date Thu May 10 21:12:00 2018 +0300 (2018-05-10)
parents 5c189fc65a98
children d5aab818505e
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 WEB_SITE="http://www.freedesktop.org/wiki/Software/hal"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="http://hal.freedesktop.org/releases/$TARBALL"
14 BUILD_DEPENDS="dbus-dev dbus-glib dbus-glib-dev eudev-dev pciutils \
15 util-linux-blkid-dev expat-dev util-linux-uuid-dev glib-dev v4l-utils-dev"
16 SPLIT="hal-scripts hal-extra hal hal-dev"
18 CROSS="error: cannot check for file existence when cross compiling"
20 compile_rules() {
21 sed -i 's|linux/videodev.h|libv4l1-videodev.h|' \
22 hald/linux/probing/probe-video4linux.c
23 sed -i 's|glib/gmain|glib|' hald/linux/addons/addon-*.c
24 zcat /usr/share/misc/pci.ids.gz > /usr/share/misc/pci.ids
26 grep -qs 'define u8' hald/linux/probing/linux_dvd_rw_utils.c ||
27 sed -i 's|#include <scsi/scsi.h>|#define u8 __u8\n&|' \
28 hald/linux/probing/linux_dvd_rw_utils.c
30 libexecdir='/usr/lib/hal'
31 ./configure \
32 --libexecdir=$libexecdir \
33 --disable-usb-ids \
34 --disable-policy-kit \
35 $CONFIGURE_ARGS &&
36 fix libtool &&
37 make &&
38 rm /usr/share/misc/pci.ids &&
39 make install || return 1
41 chmod -R +x $install$libexecdir/scripts/*
43 # init script
44 cp -a $stuff/etc $install
45 # policy for ntfs-3g
46 cp -a $stuff/policy $install/usr/share/hal/fdi/
47 # change bash to sh in hal scripts; use full-path
48 sed -i \
49 -e 's:/bin/bash:/bin/sh:' \
50 -e "s:hal-functions:$libexecdir/scripts/hal-functions:" \
51 $install/usr/lib/hal/scripts/hal* \
52 $install/usr/lib/hal/scripts/linux/hal*
53 }
55 genpkg_rules() {
56 case $PACKAGE in
57 hal-scripts)
58 copy hal/scripts/
59 CAT="x-window|scripts"
60 DEPENDS="dbus dbus-glib glib hal"
61 ;;
62 hal-extra)
63 copy hald-addon-cpufreq hald-addon-hid-ups \
64 hald-addon-imac-backlight hald-addon-ipw-killswitch \
65 hald-probe-video4linux hald-probe-net-bluetooth \
66 hald-probe-ieee1394-unit hald-probe-pc-floppy hald-probe-printer \
67 10-cpufreq.fdi 10-dockstation.fdi 10-imac-backlight.fdi \
68 15-storage-luks.fdi 30-wol.fdi
69 CAT="x-window|extra lib and fdi files"
70 DEPENDS="dbus dbus-glib glib hal"
71 ;;
72 hal)
73 copy @std @rm
74 DEPENDS="dbus dbus-glib slitaz-base-files eudev \
75 util-linux-blkid libusb-compat"
76 ;;
77 hal-dev)
78 copy @dev
79 DEPENDS="hal dbus-dev"
80 ;;
81 esac
82 }
84 pre_install_hal() {
85 # Go for echoing on configuration files if any haldaemon user
86 # was found.
87 if ! grep -q 'haldaemon' "$1/etc/passwd"; then
88 echo 'haldaemon:x:26:26:HAL Daemon User:/dev/null:/bin/false' >> "$1/etc/passwd"
89 echo 'haldaemon:!:14013:0:99999:7:::' >> "$1/etc/shadow"
90 echo 'haldaemon:x:26:' >> "$1/etc/group"
91 echo 'haldaemon:!::' >> "$1/etc/gshadow"
92 fi
93 if ! grep -q ^HALD_OPTIONS "$1/etc/daemons.conf"; then
94 cat >> "$1/etc/daemons.conf" << "EOT"
95 # HAL daemon options.
96 HALD_OPTIONS="--daemon=yes"
98 EOT
99 fi
100 }
102 pre_remove_hal() {
103 /etc/init.d/hald stop
104 deluser haldaemon
105 }