summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 85c4f625bb8d22d9f78c1aa455c5deaccea11987 (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
# Maintainer: Abhinav Gupta <mail@abhinavg.net>
pkgname=gitprompt
pkgver=0.8.2
pkgrel=1
pkgdesc='Informative git prompt for zsh and bash'
arch=('x86_64' 'i686' 'armv7h' 'aarch64')
url="https://github.com/abhinav/gitprompt"
license=('MIT')
makedepends=('go')
provides=("$pkgname")
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('cca7b6ff53ae11cda4a5465bdda01fb72add7c170c4a4b419a43a8731b5126e0')

_gopackagepath=github.com/abhinav/gitprompt/cmd/gitprompt

build() {
	cd "$pkgname-$pkgver"
	export CGO_ENABLED=0
	export GOFLAGS="-buildmode=pie -trimpath -modcacherw"
	go build -o "$pkgname" "$_gopackagepath"
}

check() {
	cd "$pkgname-$pkgver"
	"./$pkgname"
}

package() {
	cd "$pkgname-$pkgver"
	install -Dm755 "$pkgname" "$pkgdir/usr/bin/$pkgname"
}