wok-6.x annotate acpid/receipt @ rev 3002

Add btrfs-progs linux-btrfs
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon May 11 22:07:59 2009 +0200 (2009-05-11)
parents 320b5d1cf5fc
children 2bbc0ef3f1d2
rev   line source
domcox@1379 1 # SliTaz package receipt.
domcox@1379 2
domcox@1379 3 PACKAGE="acpid"
domcox@2853 4 VERSION="1.0.10"
domcox@1379 5 CATEGORY="system-tools"
domcox@1379 6 SHORT_DESC="The ACPI event daemon"
domcox@1379 7 MAINTAINER="domcox@users.sourceforge.net"
domcox@1379 8 DEPENDS=""
domcox@1624 9 BUILD_DEPENDS="linux-headers"
domcox@1379 10 TARBALL="$PACKAGE-$VERSION.tar.gz"
domcox@1379 11 WEB_SITE="http://acpid.sourceforge.net/"
domcox@1379 12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
domcox@1512 13 KEY_FILE="key-constants"
domcox@1379 14
domcox@1379 15 # Rules to configure and make the package.
domcox@1379 16 compile_rules()
domcox@1379 17 {
domcox@1512 18 # Build acpi_fakekey utility
domcox@1512 19 cp -a stuff/acpi_fakekey.c .
domcox@1512 20 gcc -g -Wall -o acpi_fakekey acpi_fakekey.c
domcox@1512 21 # Generate key constants file
domcox@1512 22 INPUT_H="/usr/include/linux/input.h"
domcox@1512 23 echo -n '# Generated from $INPUT dated ' > $KEY_FILE
domcox@1512 24 date -r $INPUT_H >> $KEY_FILE
domcox@1512 25 echo "KEY_RESERVED=0" >> $KEY_FILE
domcox@1512 26 awk '/define KEY_/{if($3 <= 255 && $3 > 0) print $2"="$3}' $INPUT_H | sort -nt'=' -k2 >> $KEY_FILE
domcox@1512 27 echo "KEY_LOCK=\$KEY_COFFEE" >> $KEY_FILE
domcox@1512 28 echo "KEY_LIGHT=\$KEY_F19" >> $KEY_FILE
domcox@1512 29 echo "KEY_VIDEOOUT=\$KEY_F20" >> $KEY_FILE
domcox@1512 30 echo "KEY_ROTATESCREEN=\$KEY_F21" >> $KEY_FILE
domcox@1512 31 echo "KEY_VIDEOMODECYCLE=\$KEY_F22" >> $KEY_FILE
domcox@1512 32 echo "KEY_PRESENTATION=\KEY_F23" >> $KEY_FILE
domcox@1512 33 # Build acpid
domcox@1379 34 cd $src
domcox@1379 35 make clean && make
domcox@1379 36 make INSTPREFIX=$PWD/_pkg install
domcox@1379 37 }
domcox@1379 38
domcox@1379 39 # Rules to gen a SliTaz package suitable for Tazpkg.
domcox@1379 40 genpkg_rules()
domcox@1379 41 {
domcox@1379 42 mkdir -p $fs/usr
domcox@1512 43 # acpid
domcox@1512 44 cp -a $_pkg/usr/sbin $fs/usr
domcox@1512 45 # acpi_listen
domcox@1379 46 cp -a $_pkg/usr/bin $fs/usr
domcox@1512 47 # acpid conf files
domcox@1512 48 mkdir -p $fs/etc
domcox@1512 49 cp -a stuff/init.d $fs/etc/
domcox@1512 50 cp -a stuff/acpi $fs/etc/
domcox@1512 51 # acpi_fakekey
domcox@1512 52 cp -a acpi_fakekey $fs/usr/bin
domcox@1512 53 cp -a $KEY_FILE $fs/etc/acpi/
domcox@1379 54 }
domcox@1379 55
domcox@1379 56 # Pre and post remove commands for Tazpkg
domcox@1379 57
domcox@1379 58 pre_remove()
domcox@1379 59 {
domcox@1379 60 /etc/init.d/acpid stop
domcox@1379 61 }
domcox@1379 62
domcox@1379 63 post_remove()
domcox@1379 64 {
domcox@1379 65 if [ `ls /etc/acpi/events | wc -l` -eq 0 ]; then
domcox@1512 66 echo -n "Removing /etc/acpi/events"
domcox@1512 67 rm -rf /etc/acpi/events
domcox@1512 68 status
domcox@1512 69 fi
domcox@1512 70 if [ `ls /etc/acpi | wc -l` -eq 0 ]; then
domcox@1512 71 echo -n "Removing /etc/acpi"
domcox@1379 72 rm -rf /etc/acpi
domcox@1379 73 status
domcox@1379 74 fi
domcox@1379 75 }