blob: 3a71178ee5513604239936ca18b2e7185d8d3aeb (
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
|
# Maintainer: HRKings <hrkings@***.com>
pkgname=gitgudcli-git
_pkgname=gitgud-cli
pkgver=2.2.2.r0.ge041976
pkgrel=1
pkgdesc="An easy to use CLI for the GitGud modular Git model."
arch=(any)
url="https://github.com/HRKings/gitgud-cli.git"
license=('unknown')
makedepends=('git' 'go')
provides=(gitgudcli)
source=("git+${url}#branch=stable")
md5sums=('SKIP')
pkgver() {
cd "${_pkgname}"
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}
build() {
cd "${_pkgname}"
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
go build -o ${_pkgname} -ldflags "-extldflags ${LDFLAGS} -s -w -X main.version=${pkgver}" main.go
}
package() {
# Install the README
install -Dm644 ${_pkgname}/README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
# Install the CLI
install -Dm755 ${_pkgname}/gitgud-cli "${pkgdir}"/usr/bin/gitgud
}
|