tlp: add zzz resume/suspend hooks

also make it conflict with perl-Unicode-Tussle (/usr/bin/nfc)
This commit is contained in:
hazen2215 2022-11-15 10:59:09 +09:00 committed by Đoàn Trần Công Danh
parent 32478e2c7c
commit 3d40bdf62a
3 changed files with 8 additions and 2 deletions

View file

@ -0,0 +1,2 @@
#!/bin/sh
[ -s /var/service/tlp/supervise/pid ] && exec tlp resume

View file

@ -0,0 +1,2 @@
#!/bin/sh
[ -s /var/service/tlp/supervise/pid ] && exec tlp suspend

View file

@ -1,7 +1,7 @@
# Template file for 'tlp' # Template file for 'tlp'
pkgname=tlp pkgname=tlp
version=1.5.0 version=1.5.0
revision=2 revision=3
depends="hdparm bash iw util-linux ethtool perl" depends="hdparm bash iw util-linux ethtool perl"
short_desc="Advanced power management tool for Linux" short_desc="Advanced power management tool for Linux"
maintainer="Alan Brown <adbrown@rocketmail.com>" maintainer="Alan Brown <adbrown@rocketmail.com>"
@ -11,7 +11,7 @@ changelog="https://raw.githubusercontent.com/linrunner/TLP/main/changelog"
distfiles="https://github.com/linrunner/TLP/archive/${version}.tar.gz" distfiles="https://github.com/linrunner/TLP/archive/${version}.tar.gz"
checksum=b5f08f00d535c26abc49b336b4c7264c6e5fb7bc3de8054eaabeebdd00e0760e checksum=b5f08f00d535c26abc49b336b4c7264c6e5fb7bc3de8054eaabeebdd00e0760e
conflicts="laptop-mode>=0" conflicts="laptop-mode>=0 perl-Unicode-Tussle>=0"
conf_files="/etc/tlp.conf /etc/tlp.d/*.conf" conf_files="/etc/tlp.conf /etc/tlp.d/*.conf"
make_dirs="/var/lib/tlp 0755 root root" make_dirs="/var/lib/tlp 0755 root root"
@ -32,6 +32,8 @@ do_install() {
rm -f ${DESTDIR}/usr/share/man/man8/*.service.8 rm -f ${DESTDIR}/usr/share/man/man8/*.service.8
vsv tlp vsv tlp
vinstall ${FILESDIR}/tlp.resume 755 etc/zzz.d/resume 50-tlp.sh
vinstall ${FILESDIR}/tlp.suspend 755 etc/zzz.d/suspend 50-tlp.sh
rm -rf ${DESTDIR}/etc/init.d rm -rf ${DESTDIR}/etc/init.d
} }