From 40f964daf880fabd12563ab91e86b5d2c07a0416 Mon Sep 17 00:00:00 2001 From: hazen2215 Date: Tue, 15 Nov 2022 10:59:09 +0900 Subject: [PATCH] tlp: add zzz resume/suspend hooks also make it conflict with perl-Unicode-Tussle (/usr/bin/nfc) --- srcpkgs/tlp/files/tlp.resume | 2 ++ srcpkgs/tlp/files/tlp.suspend | 2 ++ srcpkgs/tlp/template | 6 ++++-- 3 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/tlp/files/tlp.resume create mode 100644 srcpkgs/tlp/files/tlp.suspend diff --git a/srcpkgs/tlp/files/tlp.resume b/srcpkgs/tlp/files/tlp.resume new file mode 100644 index 0000000000000..9603650ff55d9 --- /dev/null +++ b/srcpkgs/tlp/files/tlp.resume @@ -0,0 +1,2 @@ +#!/bin/sh +[ -s /var/service/tlp/supervise/pid ] && exec tlp resume diff --git a/srcpkgs/tlp/files/tlp.suspend b/srcpkgs/tlp/files/tlp.suspend new file mode 100644 index 0000000000000..a3758a3c0bdc4 --- /dev/null +++ b/srcpkgs/tlp/files/tlp.suspend @@ -0,0 +1,2 @@ +#!/bin/sh +[ -s /var/service/tlp/supervise/pid ] && exec tlp suspend diff --git a/srcpkgs/tlp/template b/srcpkgs/tlp/template index 2c9433667cf95..e8f6ed94ad4f2 100644 --- a/srcpkgs/tlp/template +++ b/srcpkgs/tlp/template @@ -1,7 +1,7 @@ # Template file for 'tlp' pkgname=tlp version=1.5.0 -revision=2 +revision=3 depends="hdparm bash iw util-linux ethtool perl" short_desc="Advanced power management tool for Linux" maintainer="Alan Brown " @@ -11,7 +11,7 @@ changelog="https://raw.githubusercontent.com/linrunner/TLP/main/changelog" distfiles="https://github.com/linrunner/TLP/archive/${version}.tar.gz" checksum=b5f08f00d535c26abc49b336b4c7264c6e5fb7bc3de8054eaabeebdd00e0760e -conflicts="laptop-mode>=0" +conflicts="laptop-mode>=0 perl-Unicode-Tussle>=0" conf_files="/etc/tlp.conf /etc/tlp.d/*.conf" make_dirs="/var/lib/tlp 0755 root root" @@ -32,6 +32,8 @@ do_install() { rm -f ${DESTDIR}/usr/share/man/man8/*.service.8 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 }