summaryrefslogtreecommitdiff
path: root/user/tlp
diff options
context:
space:
mode:
Diffstat (limited to 'user/tlp')
-rw-r--r--user/tlp/APKBUILD21
-rw-r--r--user/tlp/tlp.post-upgrade14
2 files changed, 25 insertions, 10 deletions
diff --git a/user/tlp/APKBUILD b/user/tlp/APKBUILD
index 54f478361..ca7208b5e 100644
--- a/user/tlp/APKBUILD
+++ b/user/tlp/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=tlp
_pkgname=TLP
-pkgver=1.1
+pkgver=1.3.1
pkgrel=0
pkgdesc="Linux Advanced Power Management"
url="https://linrunner.de/en/tlp/tlp.html"
@@ -13,30 +13,28 @@ depends="/bin/sh perl"
makedepends=""
subpackages="$pkgname-doc $pkgname-rdw $pkgname-bash-completion:bashcomp
$pkgname-openrc"
+install="$pkgname.post-upgrade"
source="$pkgname-$pkgver.tar.gz::https://github.com/linrunner/$_pkgname/archive/$pkgver.tar.gz
$pkgname.initd"
builddir="$srcdir/$_pkgname-$pkgver"
build() {
- cd "$builddir"
make
}
package() {
- cd "$builddir"
-
- make DESTDIR="$pkgdir" install-tlp install-man
+ make DESTDIR="$pkgdir" TLP_WITH_SYSTEMD=0 install-tlp install-man
install -Dm755 "$srcdir"/tlp.initd "$pkgdir"/etc/init.d/"$pkgname"
# We don't ship systemd
find "$pkgdir"/usr/share/man/man8 -name '*.service*' -delete
+ rm -r "$pkgdir"/lib/elogind
}
rdw() {
pkgdesc="Linux Advanced Power Management - Radio Device Wizard"
depends="tlp"
- cd "$builddir"
- make DESTDIR="$subpkgdir" install-rdw
+ make DESTDIR="$subpkgdir" TLP_WITH_SYSTEMD=0 -C "$builddir" install-rdw
}
bashcomp() {
@@ -44,9 +42,12 @@ bashcomp() {
depends=""
install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
- mkdir -p "$subpkgdir"/usr/share
- mv "$pkgdir"/usr/share/bash-completion "$subpkgdir"/usr/share
+ mkdir -p "$subpkgdir"/usr/share/bash-completion/completions
+ mv "$pkgdir"/usr/share/bash-completion/completions/* \
+ "$subpkgdir"/usr/share/bash-completion/completions
+ mv "$pkgbasedir/$pkgname-rdw"/usr/share/bash-completion/completions/* \
+ "$subpkgdir"/usr/share/bash-completion/completions
}
-sha512sums="3400f2b6c249fd2e1bbbc61f23e3450ff90fabb8dd74f2903ce1f0d07e7ce3d1e61b07295736138d4697235dbee9157d3f32a8d296a649c93f73e03e3555af1e tlp-1.1.tar.gz
+sha512sums="7ebb14ea797ad8aae613c537de51107a3c7430b5c6ee1407e722e2069ed5376f88ab3dac613651fafabd92d219b980452f236bef33e8a655b1abbfed5eded1b1 tlp-1.3.1.tar.gz
e6de216b2540413812711b3304cdc29c8729d527080cfd747ba382db50166dd21c6c27ff467f9f2a967e92007c7a311b00e88262952c34a22f417578c66cf4e7 tlp.initd"
diff --git a/user/tlp/tlp.post-upgrade b/user/tlp/tlp.post-upgrade
new file mode 100644
index 000000000..6adf68850
--- /dev/null
+++ b/user/tlp/tlp.post-upgrade
@@ -0,0 +1,14 @@
+#!/bin/sh
+ver_new="$1"
+ver_old="$2"
+
+if [ "$(apk version -t "$ver_old" "1.3.1")" = "<" ]; then
+ cat >&2 <<-EOF
+ *
+ * tlp has moved its configuration from '/etc/default/tlp'
+ * to '/etc/tlp.conf' and '/etc/tlp.d'. Additionally,
+ * these configuration files are now parsed instead of
+ * executed via the shell, so expansions will no longer work.
+ *
+ EOF
+fi