blob: f8a0b360bd5eb7f769085c950560db42a970a4eb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# 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')
provides=("xsuspender=${pkgver}")
conflicts=('xsuspender')
makedepends=('git' 'cmake' 'make' 'pkgconf')
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
}
check() {
cd "$srcdir/$pkgname"
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"
}
|