--- /dev/null
+#!/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
--- /dev/null
+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