summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7f3c22151b0f98e8bd181623ffcb653735a56f94 (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
# Maintainer: Caleb Maclennan <caleb@alerque.com>

_pkgname=evo
pkgname=$_pkgname-git
pkgver=r6.8251d06
pkgrel=1
pkgdesc='Version control that works the way you think'
arch=(x86_64)
url="https://github.com/crazywolf132/$_pkgname"
license=('MIT')
makedepends=(go
             git)
provides=("$_pkgname=$pkgver")
conflicts=("$_pkgname")
source=("git+$url.git")
sha256sums=('SKIP')

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

prepare() {
	cd "$_pkgname"
	go mod download
}

build () {
	cd "$_pkgname"
	go build \
		-trimpath \
		-buildmode=pie \
		-mod=readonly \
		-modcacherw \
		-ldflags "-extldflags \"$LDFLAGS\"" \
		./cmd/$_pkgname
}

package() {
	cd "$_pkgname"
	install -Dm0755 -t "$pkgdir/usr/bin/" $_pkgname
}