diff options
author | Jake Mannens | 2019-08-10 09:19:16 +1000 |
---|---|---|
committer | Jake Mannens | 2019-08-10 09:19:16 +1000 |
commit | 076eb88a993e60d217a611c01532efc249a194dd (patch) | |
tree | 70921352899dac55218fa022a651076438c0ab72 | |
download | aur-076eb88a993e60d217a611c01532efc249a194dd.tar.gz |
Initial release
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | PKGBUILD | 23 | ||||
-rw-r--r-- | powertool.install | 11 |
3 files changed, 52 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..826e15862edd --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = powertool + pkgdesc = A simple power management script + pkgver = 0.1 + pkgrel = 1 + url = https://gitlab.com/plasmicplexus/powertool + install = powertool.install + arch = any + license = GPL3 + depends = sudo + optdepends = brightnessctl: brightness control + optdepends = cpupower: CPU frequency control + optdepends = networkmanager: WiFi control + optdepends = tpacpi-bat: battery charge thresholds + source = https://gitlab.com/plasmicplexus/powertool/-/archive/0.1/powertool-0.1.tar.gz + md5sums = d9015fecbf5a803323db745fd6a2bcd9 + +pkgname = powertool + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..736defa1eb14 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,23 @@ +# Contributor: Jake Mannens <jakem_5@hotmail.com> +pkgname=powertool +pkgver=0.1 +pkgrel=1 +pkgdesc="A simple power management script" +arch=('any') +url="https://gitlab.com/plasmicplexus/powertool" +license=('GPL3') +install=$pkgname.install +depends=('sudo') +optdepends=('brightnessctl: brightness control' + 'cpupower: CPU frequency control' + 'networkmanager: WiFi control' + 'tpacpi-bat: battery charge thresholds') +source=("https://gitlab.com/plasmicplexus/powertool/-/archive/$pkgver/powertool-$pkgver.tar.gz") +md5sums=('d9015fecbf5a803323db745fd6a2bcd9') + +package() { + cd "$pkgname-$pkgver" + make PREFIX=/usr DESTDIR="$pkgdir" install +} + +# vim: ts=4 sts=4 sw=4 et diff --git a/powertool.install b/powertool.install new file mode 100644 index 000000000000..32f004776bf2 --- /dev/null +++ b/powertool.install @@ -0,0 +1,11 @@ +post_install() { + if ! grep /usr/bin/powertool /etc/sudoers 2>&1 > /dev/null; then + printf "\n%%sudo ALL=(ALL) NOPASSWD: /usr/bin/powertool\n" >> /etc/sudoers + fi +} + +post_remove() { + sed -i '/[
]\?%sudo ALL=(ALL) NOPASSWD: \/usr\/bin\/powertool/d' /etc/sudoers +} + +# vim: ts=4 sts=4 sw=4 et |