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