yochananmarqos

Untitled

Oct 12th, 2020
105
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pkgname=bit
  2. pkgver=0.5.10
  3. pkgrel=1
  4. pkgdesc='A modern Git CLI'
  5. arch=('x86_64')
  6. url="https://github.com/chriswalz/bit"
  7. license=('Apache')
  8. makedepends=('go')
  9. depends=('git')
  10. conflicts=('bit-git')
  11. source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
  12. install="$pkgname.install"
  13. sha256sums=('62a72fc3b668c2ff4b9b7e47ec0e8c889acce6ff9e141a47f400314e93415581')
  14.  
  15. prepare() {
  16.   export GOPATH="$srcdir/gopath"
  17.   go clean -modcache
  18. }
  19.  
  20. build() {
  21.   cd "$pkgname-$pkgver"
  22.   export GO111MODULE=on
  23.   export CGO_CPPFLAGS="${CPPFLAGS}"
  24.   export CGO_CFLAGS="${CFLAGS}"
  25.   export CGO_CXXFLAGS="${CXXFLAGS}"
  26.   export CGO_LDFLAGS="${LDFLAGS}"
  27.   export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
  28.   go build -v .
  29.   go build -v -o bitcomplete/bitcomplete
  30.  
  31.   # Clean mod cache for makepkg -C
  32.   go clean -modcache
  33. }
  34.  
  35. package() {
  36.   cd "$pkgname-$pkgver"
  37.   install -Dm755 "$pkgname" bitcomplete/bitcomplete -t "$pkgdir/usr/bin"
  38. }
RAW Paste Data