summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f940598e9a7a175926bf6a0d6c4aca37fce9f029 (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
# Maintainer: Matrix <thysupremematrix at tuta dot io>
pkgname=gnome-shell-extension-soft-brightness-git
pkgver=35.r10.gb77e711
pkgrel=1
pkgdesc='Gnome-shell extension to manage your display brightness via an alpha overlay (instead of the backlight).'
url='https://github.com/jkitching/soft-brightness-plus'
license=('GPL')
arch=('any')
conflicts=(${pkgname%-git})
provides=(${pkgname%-git})
depends=('gnome-shell>=45')
makedepends=('git' 'meson>=0.50' 'm4')
optdepends=()
source=("${pkgname}::git+${url}.git" "build.patch")
sha512sums=('SKIP'
            '788256f8dedd706452de8a0fe712290b75a0f81c933e59f62c5dd7d8ac5ed6a19072ce2165123e86e00a27f19b580abe9e49c5a72ba3c806cb652f80343d824e')
_uuid="soft-brightness-plus@joelkitching.com"
_schema="org.gnome.shell.extensions.soft-brightness-plus.gschema.xml"
prepare(){
	cd "${srcdir}/${pkgname}"
	patch -Np1 -i ../build.patch
	meson-gse/meson-gse
}

pkgver() {
	cd "${pkgname}"
	git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
	arch-meson "${pkgname}" build
}

check(){
	meson test -C build --print-errorlogs
}

package() {
	meson install -C build --destdir="${pkgdir}"
	install -Dm644 $pkgdir/usr/share/gnome-shell/extensions/$_uuid/schemas/$_schema -t \
		"$pkgdir/usr/share/glib-2.0/schemas"
	rm -rf "$pkgdir/usr/share/gnome-shell/extensions/$_uuid/schemas/"
}