wok-next diff 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 diff
     1.1 --- a/pm-utils/receipt	Sun Dec 20 15:13:45 2015 +0100
     1.2 +++ b/pm-utils/receipt	Fri Mar 30 19:31:50 2018 +0300
     1.3 @@ -1,43 +1,28 @@
     1.4 -# SliTaz package receipt.
     1.5 +# SliTaz package receipt v2.
     1.6  
     1.7  PACKAGE="pm-utils"
     1.8  VERSION="1.4.1"
     1.9  CATEGORY="system-tools"
    1.10 -SHORT_DESC="Collection of scripts that handle suspend and resume."
    1.11 +SHORT_DESC="Collection of scripts that handle suspend and resume"
    1.12  MAINTAINER="domcox@slitaz.org"
    1.13  LICENSE="GPL2"
    1.14 +WEB_SITE="http://pm-utils.freedesktop.org/"
    1.15 +
    1.16  TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.17 -WEB_SITE="http://pm-utils.freedesktop.org/"
    1.18  WGET_URL="http://pm-utils.freedesktop.org/releases/$TARBALL"
    1.19 -CONFIG_FILES="/etc/pm"
    1.20 -TAGS="power-management"
    1.21  
    1.22 -DEPENDS="bash kbd"
    1.23 +compile_rules() {
    1.24 +	# workaround grep -x not implemented in busybox
    1.25 +	patch -p1 pm/functions.in $stuff/grep-x.patch
    1.26 +	# remove acoustic management not implemented in busybox
    1.27 +	patch -p1 pm/power.d/harddrive $stuff/harddrive.patch
    1.28  
    1.29 -# Rules to configure and make the package.
    1.30 -compile_rules()
    1.31 -{
    1.32 -	cd $src
    1.33 -	# workaround grep -x not implemented in busybox
    1.34 -	echo -n "Applying grep -x patch.."
    1.35 -	patch -p1 pm/functions.in $stuff/grep-x.patch > /dev/null \
    1.36 -		&& echo done. || echo failed.
    1.37 -	# remove acoustic management not implemented in busybox
    1.38 -	echo -n "Applying harddrive patch.."
    1.39 -	patch -p1 pm/power.d/harddrive $stuff/harddrive.patch > /dev/null \
    1.40 -		&& echo done. || echo failed.
    1.41 -	# build
    1.42 -	./configure \
    1.43 -		--prefix=/usr \
    1.44 -		--sysconfdir=/etc \
    1.45 -		$CONFIGURE_ARGS &&
    1.46 +	./configure $CONFIGURE_ARGS &&
    1.47  	make &&
    1.48  	make DESTDIR=$DESTDIR install
    1.49  }
    1.50  
    1.51 -# Rules to gen a SliTaz package suitable for Tazpkg.
    1.52 -genpkg_rules()
    1.53 -{
    1.54 +genpkg_rules() {
    1.55  	# main
    1.56  	mkdir -p $fs/usr/lib
    1.57  	cp -a $install/usr/bin $fs/usr
    1.58 @@ -49,7 +34,6 @@
    1.59  	cp -a $install/etc/pm $fs/etc
    1.60  
    1.61  	# remove incompatible hooks
    1.62 -	echo "remove incompatible hooks"
    1.63  	# NetworkManager hook
    1.64  	rm -f $fs/usr/lib/pm-utils/sleep.d/55NetworkManager
    1.65  	# grub hook (Redhat specific)
    1.66 @@ -60,20 +44,22 @@
    1.67  	rm -f $fs/usr/lib/pm-utils/power.d/sata_alpm
    1.68  
    1.69  	# add video quirks
    1.70 -	echo -n "Add video quirks"
    1.71  	cp -a $stuff/video-quirks $fs/usr/lib/pm-utils
    1.72 -	status
    1.73 +
    1.74 +	DEPENDS="bash kbd"
    1.75 +	CONFIG_FILES="/etc/pm"
    1.76 +	TAGS="power-management"
    1.77  }
    1.78  
    1.79 -pre_remove()
    1.80 -{
    1.81 +pre_remove() {
    1.82  	[ -s "$1/etc/slim.conf" ] &&
    1.83  	sed -i 's|.*/usr/sbin/pm-suspend|#&|' "$1/etc/slim.conf"
    1.84 +	:
    1.85  }
    1.86  
    1.87 -post_install()
    1.88 -{
    1.89 +post_install() {
    1.90  	[ -s "$1/etc/slim.conf" ] &&
    1.91  	sed -i 's|^#suspend_cmd.*|suspend_cmd         /usr/sbin/pm-suspend|' \
    1.92  		"$1/etc/slim.conf"
    1.93 +	:
    1.94  }