wok-next view hal/receipt @ rev 21132
zlib: separate zlib-static from zlib-dev and use it where it required: in optipng (up 0.7.7) and pngquant
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Sun Jan 20 14:42:46 2019 +0200 (2019-01-20) |
parents | d6378d455338 |
children |
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="devel@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://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="$PACKAGE-scripts $PACKAGE-extra $PACKAGE $PACKAGE-dev"
18 compile_rules() {
19 sed -i 's|linux/videodev.h|libv4l1-videodev.h|' \
20 hald/linux/probing/probe-video4linux.c
21 sed -i 's|glib/gmain|glib|' hald/linux/addons/addon-*.c
22 zcat /usr/share/misc/pci.ids.gz > /usr/share/misc/pci.ids
24 grep -qs 'define u8' hald/linux/probing/linux_dvd_rw_utils.c ||
25 sed -i 's|#include <scsi/scsi.h>|#define u8 __u8\n&|' \
26 hald/linux/probing/linux_dvd_rw_utils.c
28 libexecdir='/usr/lib/hal'
29 ./configure \
30 --libexecdir=$libexecdir \
31 --disable-usb-ids \
32 --disable-policy-kit \
33 $CONFIGURE_ARGS &&
34 fix libtool &&
35 make &&
36 rm /usr/share/misc/pci.ids &&
37 make install || return 1
39 chmod -R +x $install$libexecdir/scripts/*
41 # init script
42 install -Dm755 $stuff/hald $install/etc/init.d/hald
43 # and its conf
44 install -Dm644 $stuff/hald.conf $install/etc/daemons.conf.d/hald.conf
46 # policy for ntfs-3g
47 install -Dm644 $stuff/30-ntfs-write.fdi \
48 $install/usr/share/hal/fdi/policy/10osvendor/30-ntfs-write.fdi
50 # change bash to sh in hal scripts; use full-path
51 sed -i \
52 -e 's:/bin/bash:/bin/sh:' \
53 -e "s:hal-functions:$libexecdir/scripts/hal-functions:" \
54 $install/usr/lib/hal/scripts/hal* \
55 $install/usr/lib/hal/scripts/linux/hal*
56 }
58 genpkg_rules() {
59 case $PACKAGE in
60 hal-scripts)
61 copy hal/scripts/
62 CAT="x-window|scripts"
63 DEPENDS="dbus dbus-glib glib hal"
64 ;;
65 hal-extra)
66 copy hald-addon-cpufreq hald-addon-hid-ups \
67 hald-addon-imac-backlight hald-addon-ipw-killswitch \
68 hald-probe-video4linux hald-probe-net-bluetooth \
69 hald-probe-ieee1394-unit hald-probe-pc-floppy hald-probe-printer \
70 10-cpufreq.fdi 10-dockstation.fdi 10-imac-backlight.fdi \
71 15-storage-luks.fdi 30-wol.fdi
72 CAT="x-window|extra lib and fdi files"
73 DEPENDS="dbus dbus-glib glib hal"
74 ;;
75 hal)
76 copy @std @rm
77 DEPENDS="dbus dbus-glib slitaz-base-files eudev \
78 util-linux-blkid libusb-compat"
79 ;;
80 hal-dev)
81 copy @dev
82 DEPENDS="hal dbus-dev"
83 ;;
84 esac
85 }
87 pre_install_hal() {
88 # Go for echoing on configuration files if any haldaemon user
89 # was found.
90 if ! grep -q 'haldaemon' "$1/etc/passwd"; then
91 echo 'haldaemon:x:26:26:HAL Daemon User:/dev/null:/bin/false' >> "$1/etc/passwd"
92 echo 'haldaemon:!:14013:0:99999:7:::' >> "$1/etc/shadow"
93 echo 'haldaemon:x:26:' >> "$1/etc/group"
94 echo 'haldaemon:!::' >> "$1/etc/gshadow"
95 fi
96 if ! grep -q ^HALD_OPTIONS "$1/etc/daemons.conf"; then
97 cat >> "$1/etc/daemons.conf" << "EOT"
98 # HAL daemon options.
99 HALD_OPTIONS="--daemon=yes"
101 EOT
102 fi
103 }
105 pre_remove_hal() {
106 /etc/init.d/hald stop
107 deluser haldaemon
108 }