wok-current view hal/receipt @ rev 17982

pavucontrol: remove patch
author Richard Dunbar <mojo@slitaz.org>
date Sun Apr 19 16:50:55 2015 -0400 (2015-04-19)
parents 7896f0694ef6
children 9e01bc6321ea
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 local root
100 root=$1
101 # Go for echoing on configuration files if any haldeamon user
102 # was found.
103 if ! grep -q 'haldaemon' $root/etc/passwd; then
104 echo -n "Adding user: messagebus..."
105 echo 'haldaemon:x:26:26:HAL Daemon User:/dev/null:/bin/false' >> $root/etc/passwd
106 echo 'haldaemon:!:14013:0:99999:7:::' >> $root/etc/shadow
107 echo 'haldaemon:x:26:' >> $root/etc/group
108 echo 'haldaemon:!::' >> $root/etc/gshadow
109 status
110 fi
111 if ! grep -q ^HALD_OPTIONS $root/etc/daemons.conf; then
112 echo -n "Configuring $root/etc/daemons.conf..."
113 cat >> $root/etc/daemons.conf << "EOT"
114 # HAL daemon options.
115 HALD_OPTIONS="--daemon=yes"
117 EOT
118 status
119 fi
120 }
122 pre_remove()
123 {
124 /etc/init.d/hald stop
125 deluser haldaemon
126 }