wok-current annotate acpid/receipt @ rev 25109
Up perl-date-manip (6.88)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Jun 25 09:21:55 2022 +0000 (2022-06-25) |
parents | 959dc0a66148 |
children | ad0bc3efbf37 |
rev | line source |
---|---|
domcox@1379 | 1 # SliTaz package receipt. |
domcox@1379 | 2 |
domcox@1379 | 3 PACKAGE="acpid" |
Hans-G?nter@22465 | 4 VERSION="2.0.32" |
domcox@1379 | 5 CATEGORY="system-tools" |
Hans-G?nter@22465 | 6 TAGS="power-management" |
Hans-G?nter@22465 | 7 SHORT_DESC="The ACPI event daemon with netlink." |
domcox@12208 | 8 MAINTAINER="domcox@slitaz.org" |
pascal@15001 | 9 LICENSE="GPL2" |
al@19275 | 10 WEB_SITE="https://sourceforge.net/projects/acpid2/" |
Hans-G?nter@22465 | 11 |
slaxemulator@12866 | 12 TARBALL="$PACKAGE-$VERSION.tar.xz" |
al@18997 | 13 WGET_URL="$SF_MIRROR/acpid2/$TARBALL" |
Hans-G?nter@22465 | 14 |
domcox@1512 | 15 KEY_FILE="key-constants" |
domcox@12208 | 16 SUGGESTED="pm-utils" |
domcox@1379 | 17 |
pascal@24340 | 18 # What is the latest version available today? |
pascal@24340 | 19 current_version() |
pascal@24340 | 20 { |
pascal@24340 | 21 wget -O - https://sourceforge.net/projects/acpid2/files/ 2>/dev/null | \ |
pascal@24340 | 22 sed '/scope="row/!d;s|.*/acpid-||;s|.tar.*||;q' |
pascal@24340 | 23 } |
pascal@24340 | 24 |
domcox@1379 | 25 # Rules to configure and make the package. |
domcox@1379 | 26 compile_rules() |
domcox@1379 | 27 { |
slaxemulator@12866 | 28 ./configure --prefix=/usr $CONFIGURE_ARGS && |
slaxemulator@12866 | 29 make && |
slaxemulator@11171 | 30 make DESTDIR=$DESTDIR install |
domcox@1379 | 31 } |
domcox@1379 | 32 |
domcox@1379 | 33 # Rules to gen a SliTaz package suitable for Tazpkg. |
domcox@1379 | 34 genpkg_rules() |
domcox@1379 | 35 { |
domcox@1379 | 36 mkdir -p $fs/usr |
Hans-G?nter@22465 | 37 |
domcox@1512 | 38 # acpid |
Hans-G?nter@22465 | 39 cp -a $install/usr/sbin $fs/usr |
Hans-G?nter@22465 | 40 |
domcox@1512 | 41 # acpi_listen |
Hans-G?nter@22465 | 42 cp -a $install/usr/bin $fs/usr |
Hans-G?nter@22465 | 43 |
domcox@1512 | 44 # acpid conf files |
domcox@1512 | 45 mkdir -p $fs/etc |
Hans-G?nter@22465 | 46 |
Hans-G?nter@22465 | 47 cp -a $stuff/init.d $fs/etc/ |
Hans-G?nter@22465 | 48 cp -a $stuff/acpi $fs/etc/ |
domcox@12208 | 49 chmod go-rwx $fs/etc/acpi/*.sh |
domcox@12208 | 50 chmod go-rwx $fs/etc/acpi/events/* |
domcox@1379 | 51 } |
domcox@1379 | 52 |
domcox@12208 | 53 # Pre and post remove commands for Tazpkg |
domcox@12208 | 54 post_install() |
domcox@12208 | 55 { |
Hans-G?nter@22465 | 56 if [ -z "$1" ] |
Hans-G?nter@22465 | 57 then |
domcox@12208 | 58 /etc/init.d/acpid start || continue |
domcox@12208 | 59 fi |
Hans-G?nter@22465 | 60 if ! grep -q ^ACPID_OPTIONS "$1/etc/daemons.conf" |
Hans-G?nter@22465 | 61 then |
al@18667 | 62 echo '# ACPI daemon options.' >> "$1/etc/daemons.conf" |
al@18667 | 63 echo 'ACPID_OPTIONS=""' >> "$1/etc/daemons.conf" |
al@18667 | 64 echo '' >> "$1/etc/daemons.conf" |
domcox@12208 | 65 fi |
Hans-G?nter@22465 | 66 } |
domcox@1379 | 67 |
domcox@1379 | 68 pre_remove() |
domcox@1379 | 69 { |
Hans-G?nter@22465 | 70 if [ -z "$1" ] |
Hans-G?nter@22465 | 71 then |
slaxemulator@12866 | 72 /etc/init.d/acpid stop |
slaxemulator@12866 | 73 fi |
domcox@1379 | 74 } |