wok-next annotate acpid/receipt @ rev 10341
screen: Add $CONFIGURE_ARGS.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Sun May 22 02:29:02 2011 +0000 (2011-05-22) |
parents | a1644dbcf632 |
children | e20765e81e23 |
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 TARBALL="$PACKAGE-$VERSION.tar.gz" |
domcox@1379 | 9 WEB_SITE="http://acpid.sourceforge.net/" |
domcox@1379 | 10 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" |
domcox@1512 | 11 KEY_FILE="key-constants" |
jozee@3563 | 12 TAGS="power-management" |
domcox@1379 | 13 |
domcox@1379 | 14 # Rules to configure and make the package. |
domcox@1379 | 15 compile_rules() |
domcox@1379 | 16 { |
domcox@1512 | 17 # Build acpi_fakekey utility |
pankso@9697 | 18 cp -a $stuff/acpi_fakekey.c . |
domcox@1512 | 19 gcc -g -Wall -o acpi_fakekey acpi_fakekey.c |
domcox@1512 | 20 # Generate key constants file |
domcox@1512 | 21 INPUT_H="/usr/include/linux/input.h" |
domcox@1512 | 22 echo -n '# Generated from $INPUT dated ' > $KEY_FILE |
domcox@1512 | 23 date -r $INPUT_H >> $KEY_FILE |
domcox@1512 | 24 echo "KEY_RESERVED=0" >> $KEY_FILE |
domcox@1512 | 25 awk '/define KEY_/{if($3 <= 255 && $3 > 0) print $2"="$3}' $INPUT_H | sort -nt'=' -k2 >> $KEY_FILE |
domcox@1512 | 26 echo "KEY_LOCK=\$KEY_COFFEE" >> $KEY_FILE |
domcox@1512 | 27 echo "KEY_LIGHT=\$KEY_F19" >> $KEY_FILE |
domcox@1512 | 28 echo "KEY_VIDEOOUT=\$KEY_F20" >> $KEY_FILE |
domcox@1512 | 29 echo "KEY_ROTATESCREEN=\$KEY_F21" >> $KEY_FILE |
domcox@1512 | 30 echo "KEY_VIDEOMODECYCLE=\$KEY_F22" >> $KEY_FILE |
domcox@1512 | 31 echo "KEY_PRESENTATION=\KEY_F23" >> $KEY_FILE |
domcox@1512 | 32 # Build acpid |
domcox@1379 | 33 cd $src |
domcox@1379 | 34 make clean && make |
domcox@1379 | 35 make INSTPREFIX=$PWD/_pkg install |
domcox@1379 | 36 } |
domcox@1379 | 37 |
domcox@1379 | 38 # Rules to gen a SliTaz package suitable for Tazpkg. |
domcox@1379 | 39 genpkg_rules() |
domcox@1379 | 40 { |
domcox@1379 | 41 mkdir -p $fs/usr |
domcox@1512 | 42 # acpid |
domcox@1512 | 43 cp -a $_pkg/usr/sbin $fs/usr |
domcox@1512 | 44 # acpi_listen |
domcox@1379 | 45 cp -a $_pkg/usr/bin $fs/usr |
domcox@1512 | 46 # acpid conf files |
domcox@1512 | 47 mkdir -p $fs/etc |
pankso@9697 | 48 cp -a $stuff/init.d $fs/etc/ |
pankso@9697 | 49 cp -a $stuff/acpi $fs/etc/ |
domcox@1512 | 50 # acpi_fakekey |
pankso@9799 | 51 cp -a $src/acpi_fakekey $fs/usr/bin |
pankso@9799 | 52 cp -a $src/$KEY_FILE $fs/etc/acpi/ |
domcox@1379 | 53 } |
domcox@1379 | 54 |
domcox@1379 | 55 # Pre and post remove commands for Tazpkg |
domcox@1379 | 56 |
domcox@1379 | 57 pre_remove() |
domcox@1379 | 58 { |
domcox@1379 | 59 /etc/init.d/acpid stop |
domcox@1379 | 60 } |
domcox@1379 | 61 |
domcox@1379 | 62 post_remove() |
domcox@1379 | 63 { |
domcox@1379 | 64 if [ `ls /etc/acpi/events | wc -l` -eq 0 ]; then |
domcox@1512 | 65 echo -n "Removing /etc/acpi/events" |
domcox@1512 | 66 rm -rf /etc/acpi/events |
domcox@1512 | 67 status |
domcox@1512 | 68 fi |
domcox@1512 | 69 if [ `ls /etc/acpi | wc -l` -eq 0 ]; then |
domcox@1512 | 70 echo -n "Removing /etc/acpi" |
domcox@1379 | 71 rm -rf /etc/acpi |
domcox@1379 | 72 status |
domcox@1379 | 73 fi |
jozee@3563 | 74 } |