blob: 97f0b50c4886f2bd3c55ea56ca31004bfa9008b4 (
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
53
54
55
56
57
58
59
|
# Maintainer: Jaime Martínez Rincón <jaime(at)jamezrin(dot)name>
pkgname=bit-git
pkgver=0.6.5.r1.g2a3262e
pkgrel=1
pkgdesc="Bit is a modern Git CLI"
arch=("x86_64")
url="https://github.com/chriswalz/bit"
license=('Apache 2.0')
depends=(git)
makedepends=(go)
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
_pkgrepo="https://github.com/chriswalz/bit"
source=("${pkgname}::git+${_pkgrepo}.git")
md5sums=('SKIP')
noextract=()
validpgpkeys=()
pkgver() {
cd "$pkgname"
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
export GOPATH="$srcdir/gopath"
go clean -modcache
}
build() {
cd "$srcdir/$pkgname"
export GO111MODULE=on
export CGO_CPPFLAGS="${CPPFLAGS}"
export CGO_CFLAGS="${CFLAGS}"
export CGO_CXXFLAGS="${CXXFLAGS}"
export CGO_LDFLAGS="${LDFLAGS}"
export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
go build .
go build -o bitcomplete/bitcomplete
go clean -modcache
}
package() {
install -d "${pkgdir}/usr/bin"
install -d "${pkgdir}/usr/share/licenses"
install -Dm755 "${srcdir}/${pkgname}/bit" "${pkgdir}/usr/bin/bit"
install -Dm755 "${srcdir}/${pkgname}/bitcomplete/bitcomplete" "${pkgdir}/usr/bin/bitcomplete"
install -Dm644 "${srcdir}/${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
|