summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b47031a69af099515c3cce5ad7a3c2f0beaa2fc8 (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
# Maintainer: JinZhongjia <mail @ nvimer.org>

pkgname='zig-zvm-git'
pkgver=0.4.5.r0.gba2e28b5
pkgrel=1
pkgdesc='Fast and simple zig version manager'
arch=('x86_64')
url='https://github.com/hendriknielaender/zvm'
license=('MIT')
makedepends=('zig' 'git')
provides=("zvm" "zig-zvm")
conflicts=('zig-zvm-bin' 'zvm' 'zig-zvm' 'zig')
source=("git+https://github.com/hendriknielaender/zvm.git")
md5sums=('SKIP')


function pkgver(){
	cd "$srcdir/zvm"
	git describe --long --tags --abbrev=8 | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    cd "$srcdir/zvm"
    zig build release
}

package() {
    cd "$srcdir/zvm"
    install -Dm755 zig-out/$CARCH-linux-zvm "$pkgdir/usr/bin/zvm"
    ln -s "/usr/bin/zvm" "$pkgdir/usr/bin/zig"
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}