summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorStewart Borle2020-10-21 00:28:15 +0200
committerStewart Borle2020-10-21 00:28:42 +0200
commit2ebb3eebe40f9420b56e0ebe5f549c55fa2ebfbd (patch)
treee4529df88d05f1f3f22854ff1144f52372af60eb /PKGBUILD
downloadaur-2ebb3eebe40f9420b56e0ebe5f549c55fa2ebfbd.tar.gz
Initial Commit
PKGBUILD and .SRCINFO added. The packaged xsuspender.desktop file contains the line 'Hidden=true' which stops it from functioning. It may be desirable to remove it, and this has been mentioned upstream. The result is user intervention is required for xsuspender to run on DE start. Configuration must also be made in ~/.config/xsuspender.conf (example provided), but since this is user configuration and varies wildly for different systems/users it is outside the scope of a PKGBUILD.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD39
1 files changed, 39 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3444a3a9a751
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,39 @@
+# PKGBUILD
+# Maintainer: Stewart Borle <stewi014@gmail.com> (https://github.com/stewi1014)
+
+# Upstream
+# Maintainer: Kernec (https://github.com/kernc)
+
+pkgname=xsuspender-git
+pkgver=0.0.0
+pkgrel=1
+pkgdesc="Automatically suspend inactive X11 applications"
+arch=('x86_64')
+url="https://github.com/kernc/xsuspender"
+license=('custom:WTFPL')
+depends=('glib2' 'libwnck3')
+makedepends=('git' 'cmake' 'make')
+source=("$pkgname"::'git+https://github.com/kernc/xsuspender.git#branch=master')
+md5sums=('SKIP')
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+ git describe --long --tags | sed -E 's/([^-]*-g)/r\1/;s/-/./g'
+}
+
+build() {
+ cd "$srcdir/$pkgname"
+ cmake -DCMAKE_INSTALL_PREFIX=/usr .
+ make
+ make test
+}
+
+package() {
+ cd "$srcdir/$pkgname"
+ make DESTDIR="$pkgdir/" install
+ install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ mkdir -p "$pkgdir/etc/xdg/autostart/"
+ mv "$pkgdir/usr/etc/xdg/autostart/xsuspender.desktop" "$pkgdir/etc/xdg/autostart/xsuspender.desktop"
+ rm -rf "$pkgdir/usr/etc"
+}