wok view pm-utils/receipt @ rev 24975

Update some wget_url
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon May 02 16:22:04 2022 +0000 (2022-05-02)
parents 241fb98cab1c
children fcc29e8c0135
line source
1 # SliTaz package receipt.
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 TARBALL="$PACKAGE-$VERSION.tar.gz"
10 WEB_SITE="https://pm-utils.freedesktop.org/wiki/"
11 WGET_URL="https://pm-utils.freedesktop.org/releases/$TARBALL"
12 CONFIG_FILES="/etc/pm"
13 TAGS="power-management"
15 DEPENDS="bash kbd"
17 # What is the latest version available today?
18 current_version()
19 {
20 wget -O - ${WGET_URL%/*}/ 2>/dev/null | \
21 sed "/latest/d;/$PACKAGE-[0-9]/!d;/tar/!d;s|.*$PACKAGE-\\(.*\\).tar.*|\\1|" | sort -Vr | sed q
22 }
24 # Rules to configure and make the package.
25 compile_rules()
26 {
27 cd $src
28 # workaround grep -x not implemented in busybox
29 echo -n "Applying grep -x patch.."
30 patch -p1 pm/functions.in $stuff/grep-x.patch > /dev/null \
31 && echo done. || echo failed.
32 # remove acoustic management not implemented in busybox
33 echo -n "Applying harddrive patch.."
34 patch -p1 pm/power.d/harddrive $stuff/harddrive.patch > /dev/null \
35 && echo done. || echo failed.
36 # build
37 ./configure \
38 --prefix=/usr \
39 --sysconfdir=/etc \
40 $CONFIGURE_ARGS &&
41 make &&
42 make DESTDIR=$DESTDIR install
43 }
45 # Rules to gen a SliTaz package suitable for Tazpkg.
46 genpkg_rules()
47 {
48 # main
49 mkdir -p $fs/usr/lib
50 cp -a $install/usr/bin $fs/usr
51 cp -a $install/usr/sbin $fs/usr
52 cp -a $install/usr/lib/pm-utils $fs/usr/lib
54 # sysconfig
55 mkdir -p $fs/etc
56 cp -a $install/etc/pm $fs/etc
58 # remove incompatible hooks
59 echo "remove incompatible hooks"
60 # NetworkManager hook
61 rm -f $fs/usr/lib/pm-utils/sleep.d/55NetworkManager
62 # grub hook (Redhat specific)
63 rm -f $fs/usr/lib/pm-utils/sleep.d/01grub
64 # readahead hook (not busybox compliant)
65 rm -f $fs/usr/lib/pm-utils/power.d/readahead
66 # sata_alpm (causes disk errors on many hardware)
67 rm -f $fs/usr/lib/pm-utils/power.d/sata_alpm
69 # add video quirks
70 echo -n "Add video quirks"
71 cp -a $stuff/video-quirks $fs/usr/lib/pm-utils
72 status
73 }
75 pre_remove()
76 {
77 [ -s "$1/etc/slim.conf" ] &&
78 sed -i 's|.*/usr/sbin/pm-suspend|#&|' "$1/etc/slim.conf"
79 }
81 post_install()
82 {
83 [ -s "$1/etc/slim.conf" ] &&
84 sed -i 's|^#suspend_cmd.*|suspend_cmd /usr/sbin/pm-suspend|' \
85 "$1/etc/slim.conf"
86 }