wok annotate acpid/receipt @ rev 19875
linld: fix chdirname
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Mar 31 12:51:11 2017 +0200 (2017-03-31) |
parents | 45507bfb2b0d |
children | 35974beb0c49 |
rev | line source |
---|---|
domcox@1379 | 1 # SliTaz package receipt. |
domcox@1379 | 2 |
domcox@1379 | 3 PACKAGE="acpid" |
slaxemulator@12866 | 4 VERSION="2.0.16" |
domcox@1379 | 5 CATEGORY="system-tools" |
domcox@12208 | 6 SHORT_DESC="The ACPI event daemon with netlink" |
domcox@12208 | 7 MAINTAINER="domcox@slitaz.org" |
pascal@15001 | 8 LICENSE="GPL2" |
al@19275 | 9 WEB_SITE="https://sourceforge.net/projects/acpid2/" |
slaxemulator@12866 | 10 TARBALL="$PACKAGE-$VERSION.tar.xz" |
al@18997 | 11 WGET_URL="$SF_MIRROR/acpid2/$TARBALL" |
domcox@1512 | 12 KEY_FILE="key-constants" |
jozee@3563 | 13 TAGS="power-management" |
domcox@12208 | 14 SUGGESTED="pm-utils" |
domcox@1379 | 15 |
domcox@1379 | 16 # Rules to configure and make the package. |
domcox@1379 | 17 compile_rules() |
domcox@1379 | 18 { |
slaxemulator@12866 | 19 ./configure --prefix=/usr $CONFIGURE_ARGS && |
slaxemulator@12866 | 20 make && |
slaxemulator@11171 | 21 make DESTDIR=$DESTDIR install |
domcox@1379 | 22 } |
domcox@1379 | 23 |
domcox@1379 | 24 # Rules to gen a SliTaz package suitable for Tazpkg. |
domcox@1379 | 25 genpkg_rules() |
domcox@1379 | 26 { |
domcox@1379 | 27 mkdir -p $fs/usr |
domcox@1512 | 28 # acpid |
pascal@15001 | 29 cp -a $install/usr/sbin $fs/usr |
domcox@1512 | 30 # acpi_listen |
pascal@15001 | 31 cp -a $install/usr/bin $fs/usr |
domcox@1512 | 32 # acpid conf files |
domcox@1512 | 33 mkdir -p $fs/etc |
pankso@9697 | 34 cp -a $stuff/init.d $fs/etc/ |
pankso@9697 | 35 cp -a $stuff/acpi $fs/etc/ |
domcox@12208 | 36 chmod go-rwx $fs/etc/acpi/*.sh |
domcox@12208 | 37 chmod go-rwx $fs/etc/acpi/events/* |
domcox@1379 | 38 } |
domcox@1379 | 39 |
domcox@12208 | 40 # Pre and post remove commands for Tazpkg |
domcox@12208 | 41 post_install() |
domcox@12208 | 42 { |
al@18667 | 43 if [ -z "$1" ]; then |
domcox@12208 | 44 /etc/init.d/acpid start || continue |
domcox@12208 | 45 fi |
al@18667 | 46 if ! grep -q ^ACPID_OPTIONS "$1/etc/daemons.conf"; then |
al@18667 | 47 echo '# ACPI daemon options.' >> "$1/etc/daemons.conf" |
al@18667 | 48 echo 'ACPID_OPTIONS=""' >> "$1/etc/daemons.conf" |
al@18667 | 49 echo '' >> "$1/etc/daemons.conf" |
domcox@12208 | 50 fi |
domcox@12208 | 51 } |
domcox@1379 | 52 |
domcox@1379 | 53 pre_remove() |
domcox@1379 | 54 { |
slaxemulator@12866 | 55 if [ -z "$1" ]; then |
slaxemulator@12866 | 56 /etc/init.d/acpid stop |
slaxemulator@12866 | 57 fi |
domcox@1379 | 58 } |