summaryrefslogtreecommitdiff
path: root/nonsystemd/tlp-openrc
diff options
context:
space:
mode:
authorDavid P <megver83@parabola.nu>2022-07-17 19:16:01 -0400
committerDavid P <megver83@parabola.nu>2022-07-17 19:16:01 -0400
commit959f029eea0b95b133cd9dfd0a7f40f78253da1e (patch)
tree054f59a146235db3a9b309520cb3b252866d2fb9 /nonsystemd/tlp-openrc
parentba9879cc6c2764e323695d6bda3db4d7a8d1bed7 (diff)
downloadabslibre-959f029eea0b95b133cd9dfd0a7f40f78253da1e.tar.gz
abslibre-959f029eea0b95b133cd9dfd0a7f40f78253da1e.tar.bz2
abslibre-959f029eea0b95b133cd9dfd0a7f40f78253da1e.zip
addpkg: nonsystemd/tlp-openrc 20210505-1
Signed-off-by: David P <megver83@parabola.nu>
Diffstat (limited to 'nonsystemd/tlp-openrc')
-rw-r--r--nonsystemd/tlp-openrc/PKGBUILD21
-rw-r--r--nonsystemd/tlp-openrc/tlp.initd25
2 files changed, 46 insertions, 0 deletions
diff --git a/nonsystemd/tlp-openrc/PKGBUILD b/nonsystemd/tlp-openrc/PKGBUILD
new file mode 100644
index 000000000..63887b0a7
--- /dev/null
+++ b/nonsystemd/tlp-openrc/PKGBUILD
@@ -0,0 +1,21 @@
+# Maintainer: Rafli Akmal <rafliakmaltejakusuma@gmail.com>
+# Contributor: artoo <artoo@artixlinux.org>
+# Contributor: Oscar Campos <damnwidget@artixlinux.org>
+
+pkgname=tlp-openrc
+pkgver=20210505
+pkgrel=1
+pkgdesc="OpenRC tlp init script"
+arch=('any')
+url="https://gitea.artixlinux.org/artixlinux/packages-openrc"
+license=('GPL2')
+groups=('openrc-galaxy')
+depends=('openrc' 'tlp')
+provides=('init-tlp')
+conflicts=('init-tlp')
+source=('tlp.initd')
+sha256sums=('4fc771f1ce9423b1f5facc006845d3ab5cbce3bfdf1aa0737b2ed8e7d6f8c3ac')
+
+package() {
+ install -Dm755 "$srcdir/tlp.initd" "$pkgdir/etc/init.d/tlp"
+}
diff --git a/nonsystemd/tlp-openrc/tlp.initd b/nonsystemd/tlp-openrc/tlp.initd
new file mode 100644
index 000000000..827cafdb6
--- /dev/null
+++ b/nonsystemd/tlp-openrc/tlp.initd
@@ -0,0 +1,25 @@
+#!/usr/bin/openrc-run
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+description="TLP start/stop actions"
+
+depend() {
+ after modules
+
+ # sysfs is required (bat thresholds); localmount:/usr
+ need sysfs localmount
+
+ # thinkpad-radiosw (USE=deprecated)
+ use acpid
+
+ after NetworkManager dbus bluetooth
+
+ # run after xdm to avoid bluetooth/wwan/... race-condition with gdm
+ after xdm
+}
+
+start() { /usr/bin/tlp init start; }
+stop() { /usr/bin/tlp init stop; }
+restart() { /usr/bin/tlp init restart; }