summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Wagie2020-05-12 13:44:24 -0600
committerMark Wagie2020-05-12 13:44:24 -0600
commit19682cd0d6b2dade4565e784fcb55531fd288d5c (patch)
tree59e9d8a384781ab2feb4d26b55c4c59dd963a1ee
parent58edc8bc93f9f5e29ff034edceee3c31bdda91a2 (diff)
downloadaur-19682cd0d6b2dade4565e784fcb55531fd288d5c.tar.gz
PKGBUILD rewrite
-rw-r--r--.SRCINFO19
-rw-r--r--.gitignore12
-rw-r--r--PKGBUILD57
-rw-r--r--tlpui.desktop7
4 files changed, 47 insertions, 48 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b032504e0749..cb69eaf64c40 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,20 @@
pkgbase = tlpui-git
- pkgdesc = A GTK-UI to change TLP configuration files easily. It has the aim to protect users from setting bad configuration and to deliver a basic overview of all the valid configuration values.
- pkgver = 0.r88.ab1183a
- pkgrel = 3
+ pkgdesc = A GTK user interface for TLP written in Python
+ pkgver = 1.2.r8.g668ec8d
+ pkgrel = 1
url = https://github.com/d4nj1/TLPUI
arch = any
- license = GPLv2
+ license = GPL2
makedepends = git
+ makedepends = python-setuptools
depends = tlp
- depends = python
depends = python-gobject
provides = tlpui
- source = git+https://github.com/d4nj1/TLPUI.git
- source = tlpui.sh
+ conflicts = tlpui
+ source = tlpui::git+https://github.com/d4nj1/TLPUI.git
source = tlpui.desktop
- md5sums = SKIP
- md5sums = 9f23dcf973bac1089280be1255dfe34d
- md5sums = ac5c088895666e9cdf095023acea5163
+ sha256sums = SKIP
+ sha256sums = a8f7a4a3d1c66c27383f75b092fa71c3e7cd72b8240a06ed00ad56be3b5338ea
pkgname = tlpui-git
diff --git a/.gitignore b/.gitignore
index 0eb1dc462c5d..63f5c67588b5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,8 @@
-src
-pkg
-TLPUI
-*.xz
+# Ignore everything
+*
+
+# But not these files...
+!.gitignore
+!PKGBUILD
+!.SRCINFO
+!tlpui.desktop
diff --git a/PKGBUILD b/PKGBUILD
index 4a74610c9986..7ccb21bfe1aa 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,42 +1,35 @@
-# Maintainer: slact
-#author: Daniel Christophis
+# Maintainer: Mark Wagie <mark dot wagie at tutanota dot com>
+# Contributor: slact
pkgname=tlpui-git
-pkgver=0.r88.ab1183a
-pkgrel=3
-epoch=
-pkgdesc="A GTK-UI to change TLP configuration files easily. It has the aim to protect users from setting bad configuration and to deliver a basic overview of all the valid configuration values."
+pkgver=1.2.r8.g668ec8d
+pkgrel=1
+pkgdesc="A GTK user interface for TLP written in Python"
arch=('any')
url="https://github.com/d4nj1/TLPUI"
-license=('GPLv2')
-groups=()
-depends=("tlp" "python" "python-gobject")
-makedepends=('git')
-provides=('tlpui')
-conflicts=()
-install=
-source=(git+https://github.com/d4nj1/TLPUI.git
- tlpui.sh
- tlpui.desktop)
-md5sums=('SKIP'
- '9f23dcf973bac1089280be1255dfe34d'
- 'ac5c088895666e9cdf095023acea5163')
+license=('GPL2')
+depends=('tlp' 'python-gobject')
+makedepends=('git' 'python-setuptools')
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+source=("${pkgname%-git}::git+https://github.com/d4nj1/TLPUI.git"
+ "${pkgname%-git}.desktop")
+sha256sums=('SKIP'
+ 'a8f7a4a3d1c66c27383f75b092fa71c3e7cd72b8240a06ed00ad56be3b5338ea')
pkgver() {
- cd "TLPUI"
- printf "0.r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ cd "$srcdir/${pkgname%-git}"
+ git describe --long --tags | sed 's/^tlp.//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
-package() {
- cd "$srcdir/TLPUI"
- mkdir -p "$pkgdir"/opt/tlpui
- cp -dpr --no-preserve=ownership ./ "$pkgdir"/opt/tlpui/
- rm -Rf "$pkgdir"/opt/tlpui/tlpui/__pycache__
- rm -Rf "$pkgdir"/opt/tlpui/tlpui/ui_config_objects/__pycache__
-
- install -Dm644 "$srcdir"/tlpui.desktop "$pkgdir"/usr/share/applications/tlpui.desktop
- install -Dm755 "$srcdir"/tlpui.sh "$pkgdir"/usr/bin/tlpui
+build() {
+ cd "$srcdir/${pkgname%-git}"
+ python setup.py build
+}
+package() {
+ cd "$srcdir/${pkgname%-git}"
+ python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
+ install -Dm644 "$srcdir/${pkgname%-git}.desktop" -t \
+ "$pkgdir/usr/share/applications"
}
-
-# vim:set ts=2 sw=2 et:
diff --git a/tlpui.desktop b/tlpui.desktop
index 175adf2c7426..47010e2013ab 100644
--- a/tlpui.desktop
+++ b/tlpui.desktop
@@ -2,8 +2,11 @@
Encoding=UTF-8
Name=TLPUI
Comment=A GTK user interface for TLP
-Keywords=TLP TLP-UI
+Keywords=tlp;power;
Exec=tlpui
Terminal=false
+X-MultipleArgs=false
Type=Application
-Categories=Settings;HardwareSettings
+Icon=preferences-system-power-management
+Categories=Application;Utility;
+StartupNotify=true