wok-next view hal/receipt @ rev 20634
oxine: update bdeps
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Apr 27 12:51:30 2018 +0200 (2018-04-27) |
parents | 10df65db91ad |
children | d6378d455338 |
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
25 patch -p1 < $stuff/hal-scripts.u || return 1
26 #patch -p1 < $stuff/hal-udev.patch || return 1
28 grep -qs 'define u8' hald/linux/probing/linux_dvd_rw_utils.c ||
29 sed -i 's|#include <scsi/scsi.h>|#define u8 __u8\n&|' \
30 hald/linux/probing/linux_dvd_rw_utils.c
32 libexecdir='/usr/lib/hal'
33 ./configure \
34 --libexecdir=$libexecdir \
35 --disable-usb-ids \
36 --disable-policy-kit \
37 $CONFIGURE_ARGS &&
38 fix libtool &&
39 make &&
40 rm /usr/share/misc/pci.ids &&
41 make install || return 1
43 chmod -R +x $install$libexecdir/scripts/*
45 # init script
46 cp -a $stuff/etc $install
47 # policy for ntfs-3g
48 cp -a $stuff/policy $install/usr/share/hal/fdi/
49 # change bash to sh in hal scripts; use full-path
50 sed -i \
51 -e 's:/bin/bash:/bin/sh:' \
52 -e "s:hal-functions:$libexecdir/scripts/hal-functions:" \
53 $install/usr/lib/hal/scripts/hal* \
54 $install/usr/lib/hal/scripts/linux/hal*
55 }
57 genpkg_rules() {
58 case $PACKAGE in
59 hal-scripts)
60 copy hal/scripts/
61 CAT="x-window|scripts"
62 DEPENDS="dbus dbus-glib glib hal"
63 ;;
64 hal-extra)
65 copy hald-addon-cpufreq hald-addon-hid-ups \
66 hald-addon-imac-backlight hald-addon-ipw-killswitch \
67 hald-probe-video4linux hald-probe-net-bluetooth \
68 hald-probe-ieee1394-unit hald-probe-pc-floppy hald-probe-printer \
69 10-cpufreq.fdi 10-dockstation.fdi 10-imac-backlight.fdi \
70 15-storage-luks.fdi 30-wol.fdi
71 CAT="x-window|extra lib and fdi files"
72 DEPENDS="dbus dbus-glib glib hal"
73 ;;
74 hal)
75 copy @std @rm
76 DEPENDS="dbus dbus-glib slitaz-base-files eudev \
77 util-linux-blkid libusb-compat"
78 ;;
79 hal-dev)
80 copy @dev
81 DEPENDS="hal dbus-dev"
82 ;;
83 esac
84 }
86 pre_install_hal() {
87 # Go for echoing on configuration files if any haldaemon user
88 # was found.
89 if ! grep -q 'haldaemon' "$1/etc/passwd"; then
90 echo 'haldaemon:x:26:26:HAL Daemon User:/dev/null:/bin/false' >> "$1/etc/passwd"
91 echo 'haldaemon:!:14013:0:99999:7:::' >> "$1/etc/shadow"
92 echo 'haldaemon:x:26:' >> "$1/etc/group"
93 echo 'haldaemon:!::' >> "$1/etc/gshadow"
94 fi
95 if ! grep -q ^HALD_OPTIONS "$1/etc/daemons.conf"; then
96 cat >> "$1/etc/daemons.conf" << "EOT"
97 # HAL daemon options.
98 HALD_OPTIONS="--daemon=yes"
100 EOT
101 fi
102 }
104 pre_remove_hal() {
105 /etc/init.d/hald stop
106 deluser haldaemon
107 }