wok-current annotate pm-utils/receipt @ rev 24841

updated libuninameslist and libuninameslist-dev (20190701 -> 20211114)
author Hans-G?nter Theisgen
date Fri Mar 25 09:32:35 2022 +0100 (2022-03-25)
parents 6135577f4d08
children e717a4953b0e
rev   line source
domcox@2655 1 # SliTaz package receipt.
domcox@2655 2
domcox@2655 3 PACKAGE="pm-utils"
domcox@6084 4 VERSION="1.4.1"
domcox@2655 5 CATEGORY="system-tools"
domcox@12202 6 SHORT_DESC="Collection of scripts that handle suspend and resume."
domcox@12202 7 MAINTAINER="domcox@slitaz.org"
pascal@15375 8 LICENSE="GPL2"
domcox@2655 9 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@20679 10 WEB_SITE="https://pm-utils.freedesktop.org/wiki/"
domcox@2655 11 WGET_URL="http://pm-utils.freedesktop.org/releases/$TARBALL"
domcox@12202 12 CONFIG_FILES="/etc/pm"
domcox@6097 13 TAGS="power-management"
domcox@2655 14
pascal@15375 15 DEPENDS="bash kbd"
pascal@15375 16
pascal@24453 17 # What is the latest version available today?
pascal@24453 18 current_version()
pascal@24453 19 {
pascal@24453 20 wget -O - ${WGET_URL%/*}/ 2>/dev/null | \
pascal@24453 21 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q
pascal@24453 22 }
pascal@24453 23
domcox@2655 24 # Rules to configure and make the package.
domcox@2655 25 compile_rules()
domcox@2655 26 {
domcox@2655 27 cd $src
domcox@12209 28 # workaround grep -x not implemented in busybox
domcox@12209 29 echo -n "Applying grep -x patch.."
domcox@12209 30 patch -p1 pm/functions.in $stuff/grep-x.patch > /dev/null \
domcox@12209 31 && echo done. || echo failed.
domcox@12209 32 # remove acoustic management not implemented in busybox
domcox@12209 33 echo -n "Applying harddrive patch.."
domcox@12209 34 patch -p1 pm/power.d/harddrive $stuff/harddrive.patch > /dev/null \
domcox@12209 35 && echo done. || echo failed.
domcox@12209 36 # build
domcox@2655 37 ./configure \
domcox@2655 38 --prefix=/usr \
domcox@12202 39 --sysconfdir=/etc \
domcox@2655 40 $CONFIGURE_ARGS &&
domcox@2655 41 make &&
pascal@15375 42 make DESTDIR=$DESTDIR install
domcox@2655 43 }
domcox@2655 44
domcox@2655 45 # Rules to gen a SliTaz package suitable for Tazpkg.
domcox@2655 46 genpkg_rules()
domcox@2655 47 {
domcox@12209 48 # main
domcox@12202 49 mkdir -p $fs/usr/lib
pascal@15375 50 cp -a $install/usr/bin $fs/usr
pascal@15375 51 cp -a $install/usr/sbin $fs/usr
pascal@15375 52 cp -a $install/usr/lib/pm-utils $fs/usr/lib
domcox@12209 53
domcox@12209 54 # sysconfig
domcox@2655 55 mkdir -p $fs/etc
pascal@15375 56 cp -a $install/etc/pm $fs/etc
domcox@12209 57
domcox@12209 58 # remove incompatible hooks
domcox@12209 59 echo "remove incompatible hooks"
domcox@12209 60 # NetworkManager hook
domcox@12209 61 rm -f $fs/usr/lib/pm-utils/sleep.d/55NetworkManager
domcox@12209 62 # grub hook (Redhat specific)
domcox@12209 63 rm -f $fs/usr/lib/pm-utils/sleep.d/01grub
domcox@12209 64 # readahead hook (not busybox compliant)
domcox@12209 65 rm -f $fs/usr/lib/pm-utils/power.d/readahead
domcox@12209 66 # sata_alpm (causes disk errors on many hardware)
domcox@12209 67 rm -f $fs/usr/lib/pm-utils/power.d/sata_alpm
domcox@12209 68
domcox@12209 69 # add video quirks
domcox@12209 70 echo -n "Add video quirks"
domcox@12209 71 cp -a $stuff/video-quirks $fs/usr/lib/pm-utils
domcox@12209 72 status
domcox@2655 73 }
pascal@17526 74
pascal@17526 75 pre_remove()
pascal@17526 76 {
pascal@18730 77 [ -s "$1/etc/slim.conf" ] &&
pascal@18730 78 sed -i 's|.*/usr/sbin/pm-suspend|#&|' "$1/etc/slim.conf"
pascal@17526 79 }
pascal@17526 80
pascal@17526 81 post_install()
pascal@17526 82 {
pascal@18730 83 [ -s "$1/etc/slim.conf" ] &&
pascal@17526 84 sed -i 's|^#suspend_cmd.*|suspend_cmd /usr/sbin/pm-suspend|' \
pascal@18730 85 "$1/etc/slim.conf"
pascal@17526 86 }