summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5eaf9d9776969cfc1d59ffaeb1ab065b340f6e63 (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
# Maintainer: Marcel Robitaille mail@marcelrobitaille.me
_pkgname=perspektiv
pkgname="${_pkgname}-git"
pkgver=r24.88d93c1
pkgrel=1
pkgdesc="A daemon for creating popups when you change monitor brightness, volume, etc. "
arch=("i686" "x86_64")
url="https://github.com/he-la/perspektiv"
license=('GPL-3.0')
depends=('ttf-font-awesome-4')
makedepends=('git' 'rust')
source=('perspektiv-git::git+https://github.com/he-la/perspektiv.git')
md5sums=('SKIP')

pkgver() {
	cd "$srcdir/${pkgname}"
	printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
	cd "$srcdir/${pkgname}"
	CARGO_INCREMENTAL=0 cargo build --release --features "x11_backlight alsa_volume"
}

package() {
	cd "$srcdir/${pkgname}"
	mkdir -p "$pkgdir/usr/share/${_pkgname}"
	mkdir -p "$pkgdir/usr/bin"
	cp -r target/release/* "$pkgdir/usr/share/${_pkgname}"
	ln -s "$pkgdir/usr/share/${_pkgname}/${_pkgname}" "${pkgdir}/usr/bin/${_pkgname}"
}