summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authortioguda2019-06-05 10:03:46 -0300
committertioguda2019-06-05 10:03:46 -0300
commitc78e7f1ef511faf7a44236f7d2eafd904f46cfde (patch)
treeb799e78105fc043521814249e12f3920fdbbdeec
downloadaur-c78e7f1ef511faf7a44236f7d2eafd904f46cfde.tar.gz
Initial
-rw-r--r--.SRCINFO32
-rw-r--r--PKGBUILD24
-rw-r--r--slimbookbattery.install43
3 files changed, 99 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..568d29a96a2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,32 @@
+pkgbase = slimbookbattery
+ pkgdesc = Slimbook Battery. Is a battery optimization application for portable devices that can increase the battery life by 50%. For this purpose, the third-party software (TLP and others) is used to manage and configure the system resources.
+ pkgver = 3.7beta
+ pkgrel = 1
+ url = http://slimbook.es
+ install = slimbookbattery.install
+ arch = any
+ license = Creative Commons BY-NC-ND 3.0
+ depends = bash-completion
+ depends = desktop-file-utils
+ depends = gdk-pixbuf2
+ depends = glib2
+ depends = gobject-introspection-runtime
+ depends = hicolor-icon-theme
+ depends = libappindicator-gtk2
+ depends = libappindicator-gtk3
+ depends = libnotify
+ depends = python
+ depends = python-dbus
+ depends = python-gobject
+ depends = python-pillow
+ depends = tlp
+ depends = tlp-rdw
+ optdepends = gnome-shell-extension-appindicator: Integrates AppIndicators into GNOME Shell
+ options = !strip
+ options = !emptydirs
+ backup = etc/systemd/system/suspend-sedation.service
+ source = https://launchpad.net/~slimbook/+archive/ubuntu/slimbook/+files/slimbookbattery_3.7beta_all.deb
+ sha512sums = fa7f0b0ccc0de9fb7667b173f33be468cd38cd9f885028eb46a3b782a1fe7594c887fe8d60bb216144000b9fe87311debe2f713e51fc1a49f6eca2a0c4cdb005
+
+pkgname = slimbookbattery
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..dd36f1ee853
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,24 @@
+# Maintainer: tioguda <guda.flavio@gmail.com>
+
+pkgname=slimbookbattery
+pkgver=3.7beta
+pkgrel=1
+pkgdesc="Slimbook Battery. Is a battery optimization application for portable devices that can increase the battery life by 50%. For this purpose, the third-party software (TLP and others) is used to manage and configure the system resources."
+arch=('any')
+url="http://slimbook.es"
+license=('Creative Commons BY-NC-ND 3.0')
+groups=()
+depends=('bash-completion' 'desktop-file-utils' 'gdk-pixbuf2' 'glib2' 'gobject-introspection-runtime' 'hicolor-icon-theme' 'libappindicator-gtk2' 'libappindicator-gtk3' 'libnotify' 'python' 'python-dbus' 'python-gobject' 'python-pillow' 'tlp' 'tlp-rdw')
+optdepends=('gnome-shell-extension-appindicator: Integrates AppIndicators into GNOME Shell')
+backup=('etc/systemd/system/suspend-sedation.service')
+options=('!strip' '!emptydirs')
+install=${pkgname}.install
+source=("https://launchpad.net/~slimbook/+archive/ubuntu/slimbook/+files/${pkgname}_${pkgver}_all.deb")
+sha512sums=('fa7f0b0ccc0de9fb7667b173f33be468cd38cd9f885028eb46a3b782a1fe7594c887fe8d60bb216144000b9fe87311debe2f713e51fc1a49f6eca2a0c4cdb005')
+
+package(){
+ # Extract package data
+ tar xf data.tar.xz -C "${pkgdir}"
+
+ install -D -m644 "${pkgdir}/usr/share/doc/${pkgname}/copyright" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
diff --git a/slimbookbattery.install b/slimbookbattery.install
new file mode 100644
index 00000000000..c3a3e298cc0
--- /dev/null
+++ b/slimbookbattery.install
@@ -0,0 +1,43 @@
+post_install() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+
+
+ python3 -OO -m py_compile /usr/share/slimbookbattery/preferences.py
+ python3 -OO -m py_compile /usr/share/slimbookbattery/slimbookbattery
+ python3 -OO -m py_compile /usr/share/slimbookbattery/slimbookbattery-changemode.py
+ python3 -OO -m py_compile /usr/share/slimbookbattery/slimbookbattery-report.py
+
+ rm /usr/share/slimbookbattery/preferences.py
+ rm /usr/share/slimbookbattery/slimbookbattery
+ rm /usr/share/slimbookbattery/slimbookbattery-changemode.py
+ rm /usr/share/slimbookbattery/slimbookbattery-report.py
+
+ cp /usr/share/slimbookbattery/__pycache__/preferences.cpython-*.pyc /usr/share/slimbookbattery/preferences.pyc
+ cp /usr/share/slimbookbattery/__pycache__/slimbookbatterycpython-*.pyc /usr/share/slimbookbattery/slimbookbattery
+ cp /usr/share/slimbookbattery/__pycache__/slimbookbattery-changemode.cpython-*.pyc /usr/share/slimbookbattery/slimbookbattery-changemode.pyc
+ cp /usr/share/slimbookbattery/__pycache__/slimbookbattery-report.cpython-*.pyc /usr/share/slimbookbattery/slimbookbattery-report.pyc
+
+ rm /usr/share/slimbookbattery/__pycache__/*
+ rmdir /usr/share/slimbookbattery/__pycache__
+
+ echo "Warning."
+ echo "It is highly recommended that you disable any other battery/power management program. For example, the tlpui."
+
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+
+ rm -rf /usr/share/slimbookbattery
+
+ for d in /home/*/ ; do
+ rm -rf $d/.config/slimbookbattery
+ done
+
+ update-desktop-database -q
+}