]> git.armaanb.net Git - asd-repo.git/commitdiff
tlp: new package at 1.3.1
authorArmaan Bhojwani <me@armaanb.net>
Tue, 22 Jun 2021 16:38:44 +0000 (12:38 -0400)
committerArmaan Bhojwani <me@armaanb.net>
Mon, 28 Jun 2021 23:15:12 +0000 (19:15 -0400)
tlp/build [new file with mode: 0755]
tlp/checksums [new file with mode: 0644]
tlp/depends [new file with mode: 0644]
tlp/patches/tlp-no-flock-wait.patch [new file with mode: 0644]
tlp/sources [new file with mode: 0644]
tlp/version [new file with mode: 0644]

diff --git a/tlp/build b/tlp/build
new file mode 100755 (executable)
index 0000000..ca9a77d
--- /dev/null
+++ b/tlp/build
@@ -0,0 +1,19 @@
+#!/bin/sh -e
+
+# This is needed since tlp uses the non posix compliant -w flag of flock.
+patch -p1 < tlp-no-flock-wait.patch
+
+export DESTDIR="$1"
+export TLP_BIN=/usr/bin
+export TLP_SBIN=/usr/bin
+export TLP_ULIB=/usr/lib/udev
+export TLP_WITH_ELOGIND=0
+export TLP_WITH_SYSTEMD=0
+export TLP_NO_BASHCOMP=1
+export TLP_NO_INIT=1
+export TLP_NO_TPACPI=1
+export TLP_NMDSP=/dev/null
+
+make
+make install
+make install-man
diff --git a/tlp/checksums b/tlp/checksums
new file mode 100644 (file)
index 0000000..7d4c7c6
--- /dev/null
@@ -0,0 +1,2 @@
+4c783606ca6e98a3ddb3dc911785b4d7a73fec4ebb9decfca4ca15e315ece768  1.3.1.tar.gz
+b0f51f8d69073401952c3f18d5552d69f9d15abbe16d18ad3464614bf9838d41  tlp-no-flock-wait.patch
diff --git a/tlp/depends b/tlp/depends
new file mode 100644 (file)
index 0000000..37f08bf
--- /dev/null
@@ -0,0 +1,3 @@
+eudev
+util-linux
+perl
diff --git a/tlp/patches/tlp-no-flock-wait.patch b/tlp/patches/tlp-no-flock-wait.patch
new file mode 100644 (file)
index 0000000..d366ff4
--- /dev/null
@@ -0,0 +1,25 @@
+diff --git a/../TLP-1.3.1/tlp-func-base.in b/./tlp-func-base.in
+index 1bbc9c8..1cdff49 100644
+--- a/../TLP-1.3.1/tlp-func-base.in
++++ b/./tlp-func-base.in
+@@ -31,7 +31,6 @@ readonly TPACPIBAT=@TPACPIBAT@
+ readonly UDEVADM=udevadm
+ readonly LOCKFILE=$RUNDIR/lock
+-readonly LOCKTIMEOUT=2
+ readonly PWRRUNFILE=$RUNDIR/last_pwr
+ readonly MANUALMODEFILE=$RUNDIR/manual_mode
+@@ -236,8 +235,7 @@ lock_tlp () { # get exclusive lock: blocking with timeout
+     create_rundir
+     # open file for writing and attach fd 9
+     # when successful lock fd 9 exclusive and blocking
+-    # wait $LOCKTIMEOUT secs to obtain the lock
+-    if { exec 9> ${LOCKFILE}_${1:-tlp} ; } 2> /dev/null && $FLOCK -x -w $LOCKTIMEOUT 9 ; then
++    if { exec 9> ${LOCKFILE}_${1:-tlp} ; } 2> /dev/null && $FLOCK -x 9 ; then
+         echo_debug "lock" "lock_tlp($1).success"
+         return 0
+     else
+diff --git a/./tlp-no-flock-wait.diff b/./tlp-no-flock-wait.diff
+new file mode 100644
+index 0000000..e69de29
diff --git a/tlp/sources b/tlp/sources
new file mode 100644 (file)
index 0000000..228e150
--- /dev/null
@@ -0,0 +1,2 @@
+https://github.com/linrunner/TLP/archive/1.3.1.tar.gz
+patches/tlp-no-flock-wait.patch
diff --git a/tlp/version b/tlp/version
new file mode 100644 (file)
index 0000000..f750a80
--- /dev/null
@@ -0,0 +1 @@
+1.3.1 2