wok annotate hal/receipt @ rev 13482

syslinux/c32box: explain boot menu a bit
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Oct 11 21:39:29 2012 +0200 (2012-10-11)
parents f66acd3122e3
children 7896f0694ef6
rev   line source
pankso@792 1 # SliTaz package receipt.
pankso@792 2
pankso@792 3 PACKAGE="hal"
slaxemulator@6818 4 VERSION="0.5.14"
pankso@792 5 CATEGORY="x-window"
pankso@792 6 SHORT_DESC="Hardware Abstraction Layer."
pankso@792 7 MAINTAINER="pankso@slitaz.org"
pankso@792 8 TARBALL="$PACKAGE-$VERSION.tar.gz"
pankso@792 9 WEB_SITE="http://www.freedesktop.org/wiki/Software/hal"
pankso@792 10 WGET_URL="http://hal.freedesktop.org/releases/$TARBALL"
pankso@10389 11 CROSS="error: cannot check for file existence when cross compiling"
pankso@792 12
pankso@12481 13 DEPENDS="dbus dbus-glib slitaz-base-files udev util-linux-blkid libusb-compat"
pankso@9696 14 BUILD_DEPENDS="dbus-dev dbus-glib dbus-glib-dev udev-dev pciutils \
pascal@12979 15 util-linux-blkid-dev expat-dev util-linux-uuid-dev glib-dev pkg-config \
pascal@12979 16 libv4l-dev"
pankso@9696 17
pankso@792 18 EXTRA="
pankso@792 19 hald-addon-cpufreq
pankso@792 20 hald-addon-hid-ups
pankso@792 21 hald-addon-imac-backlight
pankso@3106 22 hald-addon-ipw-killswitch
pankso@792 23 hald-probe-video4linux
pankso@792 24 hald-probe-net-bluetooth
pankso@792 25 hald-probe-ieee1394-unit
pankso@792 26 hald-probe-pc-floppy
pankso@3106 27 hald-probe-printer"
pankso@792 28
pankso@792 29 # Rules to configure and make the package.
pankso@792 30 compile_rules()
pankso@792 31 {
pankso@792 32 cd $src
pascal@12979 33 sed -i 's|linux/videodev.h|libv4l1-videodev.h|' \
pascal@12979 34 hald/linux/probing/probe-video4linux.c
pascal@12979 35 sed -i 's|glib/gmain|glib|' hald/linux/addons/addon-*.c
pascal@2081 36 zcat /usr/share/misc/pci.ids.gz > /usr/share/misc/pci.ids &&
pankso@9696 37 patch -p1 < $stuff/hal-scripts.u || return 1 &&
pankso@9696 38 #patch -p1 < $stuff/hal-udev.patch || return 1 &&
pascal@6113 39 grep -qs 'define u8' hald/linux/probing/linux_dvd_rw_utils.c ||
pascal@6113 40 sed -i 's|#include <scsi/scsi.h>|#define u8 __u8\n&|' \
pascal@6113 41 hald/linux/probing/linux_dvd_rw_utils.c
pankso@792 42 ./configure \
pankso@792 43 --prefix=/usr \
pankso@792 44 --libexecdir=/usr/lib/hal \
pankso@792 45 --sysconfdir=/etc \
pankso@792 46 --localstatedir=/var \
pankso@792 47 --disable-usb-ids \
pankso@792 48 --disable-policy-kit \
pankso@10389 49 --build=$HOST_SYSTEM \
pankso@10389 50 --host=$HOST_SYSTEM &&
pascal@1536 51 make &&
pascal@2081 52 rm /usr/share/misc/pci.ids &&
pankso@10389 53 make install
pankso@792 54 }
pankso@792 55
pankso@792 56 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@792 57 genpkg_rules()
pankso@792 58 {
pankso@792 59 mkdir -p $fs/usr/lib $fs/usr/share
pankso@792 60 cp -a $_pkg/etc $fs
pankso@792 61 cp -a $_pkg/var $fs
pankso@792 62 cp -a $_pkg/usr/bin $fs/usr
pankso@792 63 cp -a $_pkg/usr/sbin $fs/usr
pankso@792 64 cp -a $_pkg/usr/lib/*.so* $fs/usr/lib
pankso@792 65 cp -a $_pkg/usr/lib/hal $fs/usr/lib
pankso@792 66 cp -a $_pkg/usr/share/hal $fs/usr/share
pankso@792 67 chmod -R +x $fs/usr/lib/hal/scripts/*
pankso@2832 68 # Remove a few run time lib and strip.
pankso@792 69 for lib in $EXTRA
pankso@792 70 do
pankso@792 71 rm $fs/usr/lib/hal/$lib
pankso@792 72 done
pankso@2832 73 strip -s $fs/usr/lib/hal/* 2>/dev/null
pankso@792 74 # Init script
pankso@792 75 cp -a stuff/etc $fs
erjo@4743 76
erjo@4743 77 # Policy for ntfs-3g
erjo@4743 78 cp -a stuff/policy $fs/usr/share/hal/fdi/
pankso@792 79 chown -R root.root $fs
pankso@4114 80
jozee@3326 81 # exclude unwanted fdi files
jozee@3326 82 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-cpufreq.fdi
jozee@3326 83 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-dockstation.fdi
jozee@3326 84 rm $fs/usr/share/hal/fdi/policy/10osvendor/10-imac-backlight.fdi
jozee@3326 85 rm $fs/usr/share/hal/fdi/policy/10osvendor/15-storage-luks.fdi
jozee@3326 86 rm $fs/usr/share/hal/fdi/policy/10osvendor/30-wol.fdi
jozee@5113 87
jozee@5113 88 # change bash to sh in hal scripts
jozee@5113 89 sed -i 's:/bin/bash:/bin/sh:' $fs/usr/lib/hal/scripts/hal*
jozee@5113 90 sed -i 's:/bin/bash:/bin/sh:' $fs/usr/lib/hal/scripts/linux/hal*
jozee@5113 91 # use full-path
jozee@5113 92 sed -i 's:hal-functions:/usr/lib/hal/scripts/hal-functions:' $fs/usr/lib/hal/scripts/hal*
jozee@5113 93 sed -i 's:hal-functions:/usr/lib/hal/scripts/hal-functions:' $fs/usr/lib/hal/scripts/linux/hal*
pankso@792 94 }
pankso@792 95
pankso@792 96 pre_install()
pankso@792 97 {
pankso@792 98 local root
pankso@792 99 root=$1
pankso@792 100 # Go for echoing on configuration files if any haldeamon user
pankso@792 101 # was found.
pankso@811 102 if ! grep -q 'haldaemon' $root/etc/passwd; then
pankso@792 103 echo -n "Adding user: messagebus..."
pankso@792 104 echo 'haldaemon:x:26:26:HAL Daemon User:/dev/null:/bin/false' >> $root/etc/passwd
pankso@792 105 echo 'haldaemon:!:14013:0:99999:7:::' >> $root/etc/shadow
pankso@792 106 echo 'haldaemon:x:26:' >> $root/etc/group
pankso@792 107 echo 'haldaemon:!::' >> $root/etc/gshadow
pankso@792 108 status
pankso@792 109 fi
pankso@792 110 if ! grep -q ^HALD_OPTIONS $root/etc/daemons.conf; then
pankso@792 111 echo -n "Configuring $root/etc/daemons.conf..."
pankso@792 112 cat >> $root/etc/daemons.conf << "EOT"
pankso@792 113 # HAL daemon options.
pankso@792 114 HALD_OPTIONS="--daemon=yes"
pankso@792 115
pankso@792 116 EOT
pankso@792 117 status
pankso@792 118 fi
pankso@792 119 }
pankso@792 120
pankso@792 121 pre_remove()
pankso@792 122 {
pankso@792 123 /etc/init.d/hald stop
pankso@792 124 deluser haldaemon
pankso@792 125 }