wok-next view pm-utils/receipt @ rev 20534

Clean default configure options when site script used.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Mar 30 19:31:50 2018 +0300 (2018-03-30)
parents 9e01bc6321ea
children f431dfa51f83
line source
1 # SliTaz package receipt v2.
3 PACKAGE="pm-utils"
4 VERSION="1.4.1"
5 CATEGORY="system-tools"
6 SHORT_DESC="Collection of scripts that handle suspend and resume"
7 MAINTAINER="domcox@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="http://pm-utils.freedesktop.org/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="http://pm-utils.freedesktop.org/releases/$TARBALL"
14 compile_rules() {
15 # workaround grep -x not implemented in busybox
16 patch -p1 pm/functions.in $stuff/grep-x.patch
17 # remove acoustic management not implemented in busybox
18 patch -p1 pm/power.d/harddrive $stuff/harddrive.patch
20 ./configure $CONFIGURE_ARGS &&
21 make &&
22 make DESTDIR=$DESTDIR install
23 }
25 genpkg_rules() {
26 # main
27 mkdir -p $fs/usr/lib
28 cp -a $install/usr/bin $fs/usr
29 cp -a $install/usr/sbin $fs/usr
30 cp -a $install/usr/lib/pm-utils $fs/usr/lib
32 # sysconfig
33 mkdir -p $fs/etc
34 cp -a $install/etc/pm $fs/etc
36 # remove incompatible hooks
37 # NetworkManager hook
38 rm -f $fs/usr/lib/pm-utils/sleep.d/55NetworkManager
39 # grub hook (Redhat specific)
40 rm -f $fs/usr/lib/pm-utils/sleep.d/01grub
41 # readahead hook (not busybox compliant)
42 rm -f $fs/usr/lib/pm-utils/power.d/readahead
43 # sata_alpm (causes disk errors on many hardware)
44 rm -f $fs/usr/lib/pm-utils/power.d/sata_alpm
46 # add video quirks
47 cp -a $stuff/video-quirks $fs/usr/lib/pm-utils
49 DEPENDS="bash kbd"
50 CONFIG_FILES="/etc/pm"
51 TAGS="power-management"
52 }
54 pre_remove() {
55 [ -s "$1/etc/slim.conf" ] &&
56 sed -i 's|.*/usr/sbin/pm-suspend|#&|' "$1/etc/slim.conf"
57 :
58 }
60 post_install() {
61 [ -s "$1/etc/slim.conf" ] &&
62 sed -i 's|^#suspend_cmd.*|suspend_cmd /usr/sbin/pm-suspend|' \
63 "$1/etc/slim.conf"
64 :
65 }