summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8467b1f496273fc54d4cce0691a3a5cb56cb70fe (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: Peter Kaplan <peter@pkap.de>
pkgname=stacktile-git
_pkgname=stacktile
pkgver=r54.3a371f8
pkgrel=1
pkgdesc="Layout generator for the river Wayland compositor"
arch=('x86_64')
url="https://sr.ht/~leon_plickat/stacktile/"
license=('GPL3')
makedepends=('git' 'zig' 'wayland')
conflicts=('stacktile')
provides=('stacktile')
source=(
    "git+https://git.sr.ht/~leon_plickat/stacktile"
    "git+https://github.com/ifreund/zig-wayland.git"
)
sha256sums=(
    'SKIP'
    'SKIP'
)

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

prepare() {
    cd "$_pkgname"
    git submodule init
    git config submodule.externals/vendor/zig-wayland.url "$srcdir/zig-wayland"
    git -c protocol.file.allow=always submodule update
}

package() {
    cd "$_pkgname"
    DESTDIR="$pkgdir" zig build -Drelease-safe --prefix "/usr" install
    install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$_pkgname"
    install -Dm644 README -t "$pkgdir/usr/share/doc/$_pkgname"
}