wok-next view acpid/receipt @ rev 1537

midori, webkit-r: update BUILD_DEPENDS
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Oct 09 21:05:08 2008 +0000 (2008-10-09)
parents 0259fc542832
children b19e50dd80d8
line source
1 # SliTaz package receipt.
3 PACKAGE="acpid"
4 VERSION="1.0.6"
5 CATEGORY="system-tools"
6 SHORT_DESC="The ACPI event daemon"
7 MAINTAINER="domcox@users.sourceforge.net"
8 DEPENDS=""
9 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="http://acpid.sourceforge.net/"
11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
12 KEY_FILE="key-constants"
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 mkdir -p $fs/var/log/
51 touch $fs/var/log/acpid.log && chmod 700 $fs/var/log/acpid.log
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 }