summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9ddc049b5a2c4f898b2d79f735d34e174dd10008 (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
# Maintainer: Cedric Mamo <vrighter@gmail.com>
pkgname=digisim-git
pkgver=1
pkgrel=5
pkgdesc="A digital logic simulator programmed in lua"
arch=('x86_64')
url=""
license=('unknown')
groups=()
depends=('luajit')
makedepends=('git' 'zig')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
replaces=()
backup=()
options=()
install=
source=('digisim::git+https://github.com/VrIgHtEr/digisim.git')
noextract=()
md5sums=('SKIP')

pkgver() {
	cd "$srcdir/${pkgname%-git}"
    
    val="$(git describe)"
    ver="${val%%-*}"
    if [ "$val" == "$ver" ]; then
        ver="${ver}_0"
    else
        ver="${ver}_$(echo "$val" | awk -F- '{print $2}')"
    fi
    echo $ver
}

prepare() {
	cd "$srcdir/${pkgname%-git}"
}

build() {
	cd "$srcdir/${pkgname%-git}"
	zig build -Doptimize=ReleaseFast
}

check() {
	cd "$srcdir/${pkgname%-git}"
}

package() {
	cd "$srcdir/${pkgname%-git}"
    mv "zig-out" "$pkgdir/usr"
}