summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: c60ad0b39703620bd50a69f308aa5c877206e9f5 (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: GhostNaN <GhostNaN@protonmail.com>
_gitname=mpvpaper
pkgname="$_gitname-git"
pkgver=r107.0069bc2
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' 'wayland-protocols')
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 setup build --prefix=/usr
    ninja -C build
}

package() {
    cd "$srcdir/$_gitname"
    DESTDIR="$pkgdir" ninja -C build install
    install -D -m644 "mpvpaper.man" "$pkgdir/usr/share/man/man1/mpvpaper.1"
}