summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 3a92b5e85ed9fcbc453af90fc0dd8916529aa09f (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
# Maintainer: GhostNaN <GhostNaN@protonmail.com>
_gitname=mpvpaper
pkgname="$_gitname-git"
pkgver=r29.94ff0b0
pkgrel=1
pkgdesc="A video wallpaper program for wlroots based wayland compositors."
arch=('i686' 'x86_64')
url="https://github.com/GhostNaN/$_gitname"
license=('GPL3')
depends=('mpv' 'wlroots')
makedepends=('git' 'meson' 'ninja' 'pkgconf')
optdepends=('socat')
provides=('mpvpaper')
source=("https://github.com/GhostNaN/$_gitname")
md5sums=('SKIP')

pkgver() {
	cd "$srcdir/$_gitname"
	echo "r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}

prepare() {
	# clean existing sources if any
	rm -rf "${srcdir}"/$_gitname
	# Clone manually to avoid downloading from the heavy "assets" branch
	git clone --single-branch https://github.com/GhostNaN/$_gitname.git
}

build() {
	cd "$srcdir/$_gitname"
	meson build --prefix=/usr
	ninja -C build
}

package() {
	cd "$srcdir/$_gitname"
	DESTDIR="$pkgdir" ninja -C build install
}