summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2ac27611c6fd3ab6144eb1cc57728d3a63114592 (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
# Maintainer: Thomas Lam <thomas@lamcw.com>

pkgname=oguri-git
pkgver=r96.518baf2
pkgrel=1
pkgdesc="A very nice animated wallpaper tool for Wayland compositors."
arch=('i686' 'x86_64')
url="https://github.com/vilhalmer/oguri"
license=('MIT')
groups=()
depends=('cairo' 'gdk-pixbuf2' 'wayland')
makedepends=('git' 'meson' 'wayland-protocols')
optdepends=('sway: Wayland compositor to display wallpaper in.')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("${pkgname%-*}::git+https://github.com/vilhalmer/oguri.git")
md5sums=('SKIP')

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

prepare() {
	cd "$srcdir/${pkgname%-git}"
	meson -Dwerror=false --prefix /usr "$srcdir/build"
}

build() {
	cd "$srcdir/${pkgname%-git}"
	ninja -C "$srcdir/build"
}

package() {
	cd "$srcdir/${pkgname%-git}"
	DESTDIR="$pkgdir" ninja -C "$srcdir/build" install
	install -D -m755 contrib/oguri-swaybg $pkgdir/usr/bin/oguri-swaybg
	install -D -m644 LICENSE $pkgdir/usr/share/licenses/${pkgname}/LICENSE
}