summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 08b2bda45cf62685a9c2eb1afa7737da6b52f9d8 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

# Maintainer: Andrea Feletto <andrea@andreafeletto.com>

pkgname=river-levee-git
_pkgname=levee
pkgver=0.1.3.r0.g4fa3228
pkgrel=1
pkgdesc='Statusbar for the river wayland compositor'
arch=('x86_64')
url='https://sr.ht/~andreafeletto/levee'
license=('MIT')
depends=('wayland' 'wayland-protocols' 'fcft' 'pixman' 'libpulse')
makedepends=('zig' 'git')
provides=('levee')
conflicts=('river-levee')
source=(
    "git+https://git.sr.ht/~andreafeletto/$_pkgname"
    'git+https://github.com/ifreund/zig-wayland'
    'git+https://github.com/ifreund/zig-pixman'
    'git+https://git.sr.ht/~novakane/zig-fcft'
    'git+https://git.sr.ht/~andreafeletto/zig-udev'
)
sha256sums=(
    'SKIP'
    'SKIP'
    'SKIP'
    'SKIP'
    'SKIP'
)

prepare() {
   cd "$srcdir/$_pkgname"
   git submodule init
   for dep in wayland pixman fcft udev clap; do
       git config "submodule.deps/zig-$dep.url" "$srcdir/zig-$dep"
   done
   git -c protocol.file.allow=always submodule update
}

pkgver() {
    cd "$srcdir/$_pkgname"
    git describe --long | sed 's/v//;s/-/.r/;s/-/./'
}

build() {
    cd "$srcdir/$_pkgname"
    zig build
}


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