summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorsupdrewin2021-09-24 19:57:22 +0800
committersupdrewin2021-09-24 19:57:22 +0800
commitaedc4bfcca3170e5c20e6e0faf5b56bd73a47b2b (patch)
tree254c0958847141e074a8bfd1ae1324f73f6446f9
downloadaur-batterycm-switcher-git.tar.gz
Thanks for the advice
-rw-r--r--.SRCINFO30
-rw-r--r--.gitignore5
-rw-r--r--PKGBUILD42
-rw-r--r--batterycm.install17
4 files changed, 94 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..8d3ca2ecdba4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,30 @@
+pkgbase = batterycm-switcher-git
+ pkgdesc = An advanced Ideapad Laptops conservation mode adjustment tool
+ pkgver = r22.c5e1610
+ pkgrel = 1
+ url = https://github.com/supdrewin/batterycm-switcher
+ install = batterycm.install
+ arch = any
+ license = GPL3
+ makedepends = git
+ makedepends = gzip
+ makedepends = make
+ makedepends = xz
+ depends = bash
+ depends = coreutils
+ depends = man-db
+ depends = polkit
+ depends = vim
+ optdepends = acpid: For enable use function key to switch mode
+ optdepends = espeak: For enable show status using voice
+ optdepends = systemd: For optional function key backend service
+ provides = batterycm
+ provides = batterycm-switcher
+ provides = batterycm-charger
+ conflicts = batterycm
+ conflicts = batterycm-switcher
+ conflicts = batterycm-charger
+ source = batterycm-switcher::git+https://github.com/supdrewin/batterycm-switcher#branch=testing
+ sha256sums = SKIP
+
+pkgname = batterycm-switcher-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..67af1a256c53
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+pkg/
+src/
+*.tar.gz
+*.pkg*
+batterycm-switcher
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3ef01a657429
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer: Supdrewin <supdrewin at outlook dot com>
+
+pkgname=batterycm-switcher-git
+pkgver=r22.c5e1610
+pkgrel=1
+pkgdesc="An advanced Ideapad Laptops conservation mode adjustment tool"
+arch=('any')
+
+url="https://github.com/supdrewin/batterycm-switcher"
+license=('GPL3')
+
+depends=('bash' 'coreutils' 'man-db' 'polkit' 'vim')
+makedepends=('git' 'gzip' 'make' 'xz')
+optdepends=(
+ 'acpid: For enable use function key to switch mode'
+ 'espeak: For enable show status using voice'
+ 'systemd: For optional function key backend service'
+)
+
+provides=('batterycm' 'batterycm-switcher' 'batterycm-charger')
+conflicts=('batterycm' 'batterycm-switcher' 'batterycm-charger')
+
+install=batterycm.install
+_srcname=batterycm-switcher
+
+source=("$_srcname::git+$url#branch=testing")
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "$_srcname"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ cd "$_srcname"
+ make
+}
+
+package() {
+ cd "$_srcname"
+ make DESTDIR="$pkgdir" install
+}
diff --git a/batterycm.install b/batterycm.install
new file mode 100644
index 000000000000..1bb3d27ac7ff
--- /dev/null
+++ b/batterycm.install
@@ -0,0 +1,17 @@
+pre_upgrade() {
+ echo :: Removing runtime tmp files...
+ rm -f /var/tmp/batterycm-switcher.log
+ rm -f /tmp/batterycm*
+}
+
+pre_remove() {
+ echo :: Removing some systemd services...
+ batterycm-switcher noauto
+ batterycm-switcher disable
+}
+
+post_remove() {
+ echo :: Removing runtime tmp files...
+ rm -f /var/tmp/batterycm-switcher.log
+ rm -f /tmp/batterycm*
+}