diff options
author | crian | 2020-01-09 01:54:37 +0100 |
---|---|---|
committer | crian | 2020-01-09 01:54:37 +0100 |
commit | b680f6751c7a2311d1698c55d5128225ea0f982f (patch) | |
tree | d60c51773bd616f5f2ae7b3253ca7dd83f0818d6 | |
parent | 0c92612adb6c5cd01111232f8178805e3aafaea6 (diff) | |
download | aur-b680f6751c7a2311d1698c55d5128225ea0f982f.tar.gz |
Add install and remove scripts
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 10 | ||||
-rwxr-xr-x | auto-cpufreq-install.sh | 27 | ||||
-rwxr-xr-x | auto-cpufreq-remove.sh | 32 |
4 files changed, 69 insertions, 6 deletions
@@ -1,6 +1,6 @@ pkgbase = auto-cpufreq-git pkgdesc = Automatic CPU speed & power optimizer - pkgver = r57.61f1115 + pkgver = r58.ff2f87c pkgrel = 1 url = https://github.com/AdnanHodzic/auto-cpufreq install = auto-cpufreq-git.install @@ -13,6 +13,10 @@ pkgbase = auto-cpufreq-git provides = auto-cpufreq conflicts = auto-cpufreq source = git+https://github.com/AdnanHodzic/auto-cpufreq.git + source = auto-cpufreq-install.sh + source = auto-cpufreq-remove.sh + sha256sums = SKIP + sha256sums = SKIP sha256sums = SKIP pkgname = auto-cpufreq-git @@ -1,7 +1,7 @@ # Maintainer: crian <crian84 at gmail dot com> pkgname=auto-cpufreq-git -pkgver=r57.61f1115 +pkgver=r58.ff2f87c pkgrel=1 pkgdesc='Automatic CPU speed & power optimizer' arch=('any') @@ -12,8 +12,8 @@ makedepends=('git') provides=('auto-cpufreq') conflicts=('auto-cpufreq') install=auto-cpufreq-git.install -source=("git+${url}.git") -sha256sums=('SKIP') +source=("git+${url}.git" "auto-cpufreq-install.sh" "auto-cpufreq-remove.sh") +sha256sums=('SKIP' 'SKIP' 'SKIP') pkgver() { cd "$srcdir/auto-cpufreq" @@ -21,13 +21,13 @@ pkgver() { } package() { + install -Dm755 auto-cpufreq-install.sh "$pkgdir/usr/bin/auto-cpufreq-install" + install -Dm755 auto-cpufreq-remove.sh "$pkgdir/usr/bin/auto-cpufreq-remove" cd "$srcdir/auto-cpufreq" install -Dm755 auto-cpufreq.py "$pkgdir/usr/bin/auto-cpufreq" install -Dm644 LICENSE "$pkgdir/usr/share/licenses/${pkgname}/LICENSE.md" install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md" cd "$srcdir/auto-cpufreq/scripts" - install -Dm755 auto-cpufreq-install.sh "$pkgdir/usr/bin/auto-cpufreq-install" - install -Dm755 auto-cpufreq-remove.sh "$pkgdir/usr/bin/auto-cpufreq-remove" install -Dm755 cpufreqctl.sh "$pkgdir/usr/bin/cpufreqctl" install -Dm644 auto-cpufreq.service "$pkgdir/etc/systemd/system/auto-cpufreq.service" } diff --git a/auto-cpufreq-install.sh b/auto-cpufreq-install.sh new file mode 100755 index 000000000000..1d5641a87ba5 --- /dev/null +++ b/auto-cpufreq-install.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# +# auto-cpufreq daemon install script +# reference: https://github.com/AdnanHodzic/auto-cpufreq + +echo -e "\n------------------ Running auto-cpufreq daemon install script ------------------" + +# this is needed on SELinux enabled systems (see also ConditionPathExists in .service) +touch /var/log/auto-cpufreq.log + +echo -e "\n* Reloading systemd manager configuration" +systemctl daemon-reload + +echo -e "\n* Stopping auto-cpufreq daemon (systemd) service" +systemctl stop auto-cpufreq + +echo -e "\n* Starting auto-cpufreq daemon (systemd) service" +systemctl start auto-cpufreq + +echo -e "\n* Enabling auto-cpufreq daemon (systemd) service at boot" +systemctl enable auto-cpufreq + +echo -e "\n------------------ auto-cpufreq daemon installed and running -----------------\n" + +echo -e "To view live log, run:\nauto-cpufreq --log" + +echo -e "\n-------------------------------------------------------------------------------\n" diff --git a/auto-cpufreq-remove.sh b/auto-cpufreq-remove.sh new file mode 100755 index 000000000000..3aac7643fce1 --- /dev/null +++ b/auto-cpufreq-remove.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +# +# auto-cpufreq daemon removal script +# reference: https://github.com/AdnanHodzic/auto-cpufreq + +echo -e "\n------------------ Running auto-cpufreq daemon removal script ------------------" + +echo -e "\n* Stopping auto-cpufreq daemon (systemd) service" +systemctl stop auto-cpufreq + +echo -e "\n* Disabling auto-cpufreq daemon (systemd) at boot" +systemctl disable auto-cpufreq + +echo -e "\n* Removing auto-cpufreq daemon (systemd) unit file" +rm /etc/systemd/system/auto-cpufreq.service + +echo -e "\n* Reloading systemd manager configuration" +systemctl daemon-reload + +echo -e "reset failed" +systemctl reset-failed + +echo -e "\n* Removing auto-cpufreq daemon install script" +rm /usr/bin/auto-cpufreq-install + +echo -e "\n* Removing auto-cpufreq binary" +rm /usr/bin/auto-cpufreq + +echo -e "\n* Removing auto-cpufreq log file" +rm /var/log/auto-cpufreq.log + +echo -e "\n-------------------------------------------------------------------------------\n" |