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