wok-stable diff acpid/receipt @ rev 1522
libgnomeprintw: fix compile_rules
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Oct 08 17:01:36 2008 +0000 (2008-10-08) |
parents | 0259fc542832 |
children | b19e50dd80d8 |
line diff
1.1 --- a/acpid/receipt Fri Sep 12 10:50:43 2008 +0200 1.2 +++ b/acpid/receipt Wed Oct 08 17:01:36 2008 +0000 1.3 @@ -9,10 +9,27 @@ 1.4 TARBALL="$PACKAGE-$VERSION.tar.gz" 1.5 WEB_SITE="http://acpid.sourceforge.net/" 1.6 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" 1.7 +KEY_FILE="key-constants" 1.8 1.9 # Rules to configure and make the package. 1.10 compile_rules() 1.11 { 1.12 + # Build acpi_fakekey utility 1.13 + cp -a stuff/acpi_fakekey.c . 1.14 + gcc -g -Wall -o acpi_fakekey acpi_fakekey.c 1.15 + # Generate key constants file 1.16 + INPUT_H="/usr/include/linux/input.h" 1.17 + echo -n '# Generated from $INPUT dated ' > $KEY_FILE 1.18 + date -r $INPUT_H >> $KEY_FILE 1.19 + echo "KEY_RESERVED=0" >> $KEY_FILE 1.20 + awk '/define KEY_/{if($3 <= 255 && $3 > 0) print $2"="$3}' $INPUT_H | sort -nt'=' -k2 >> $KEY_FILE 1.21 + echo "KEY_LOCK=\$KEY_COFFEE" >> $KEY_FILE 1.22 + echo "KEY_LIGHT=\$KEY_F19" >> $KEY_FILE 1.23 + echo "KEY_VIDEOOUT=\$KEY_F20" >> $KEY_FILE 1.24 + echo "KEY_ROTATESCREEN=\$KEY_F21" >> $KEY_FILE 1.25 + echo "KEY_VIDEOMODECYCLE=\$KEY_F22" >> $KEY_FILE 1.26 + echo "KEY_PRESENTATION=\KEY_F23" >> $KEY_FILE 1.27 + # Build acpid 1.28 cd $src 1.29 make clean && make 1.30 make INSTPREFIX=$PWD/_pkg install 1.31 @@ -22,13 +39,19 @@ 1.32 genpkg_rules() 1.33 { 1.34 mkdir -p $fs/usr 1.35 + # acpid 1.36 + cp -a $_pkg/usr/sbin $fs/usr 1.37 + # acpi_listen 1.38 cp -a $_pkg/usr/bin $fs/usr 1.39 - cp -a $_pkg/usr/sbin $fs/usr 1.40 - mkdir -p $fs/etc/init.d 1.41 - cp -a stuff/acpid $fs/etc/init.d 1.42 - mkdir -p $fs/etc/acpi/events 1.43 - cp -a stuff/power $fs/etc/acpi/events 1.44 + # acpid conf files 1.45 + mkdir -p $fs/etc 1.46 + cp -a stuff/init.d $fs/etc/ 1.47 + cp -a stuff/acpi $fs/etc/ 1.48 + mkdir -p $fs/var/log/ 1.49 touch $fs/var/log/acpid.log && chmod 700 $fs/var/log/acpid.log 1.50 + # acpi_fakekey 1.51 + cp -a acpi_fakekey $fs/usr/bin 1.52 + cp -a $KEY_FILE $fs/etc/acpi/ 1.53 } 1.54 1.55 # Pre and post remove commands for Tazpkg 1.56 @@ -41,7 +64,12 @@ 1.57 post_remove() 1.58 { 1.59 if [ `ls /etc/acpi/events | wc -l` -eq 0 ]; then 1.60 - echo -n "Removing /etc/acpi..." 1.61 + echo -n "Removing /etc/acpi/events" 1.62 + rm -rf /etc/acpi/events 1.63 + status 1.64 + fi 1.65 + if [ `ls /etc/acpi | wc -l` -eq 0 ]; then 1.66 + echo -n "Removing /etc/acpi" 1.67 rm -rf /etc/acpi 1.68 status 1.69 fi