wok-current view acpid/receipt @ rev 2310

Imagemagick: update depends
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Feb 25 12:22:31 2009 +0000 (2009-02-25)
parents fd13f7f143da
children 320b5d1cf5fc
line source
1 # SliTaz package receipt.
3 PACKAGE="acpid"
4 VERSION="1.0.6"
5 EXTRAVERSION="-3"
6 CATEGORY="system-tools"
7 SHORT_DESC="The ACPI event daemon"
8 MAINTAINER="domcox@users.sourceforge.net"
9 DEPENDS=""
10 BUILD_DEPENDS="linux-headers"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WEB_SITE="http://acpid.sourceforge.net/"
13 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
14 KEY_FILE="key-constants"
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 }