PKGBUILDs/community/glide/PKGBUILD

46 lines
1.2 KiB
Bash
Raw Normal View History

2018-10-01 13:14:20 +00:00
# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
2018-05-10 23:45:26 +00:00
# Contributor: fanningert <thomas@fanninger.at>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - build with go instead of gcc-go
pkgname=glide
2018-10-01 13:14:20 +00:00
pkgver=0.13.2
2019-06-18 12:54:17 +00:00
pkgrel=2
2018-05-10 23:45:26 +00:00
pkgdesc='Dependency management and vendoring for Go projects'
arch=('x86_64')
url='https://github.com/Masterminds/glide'
license=('MIT')
2019-06-18 12:54:17 +00:00
depends=('gcc-libs')
2018-10-01 13:14:20 +00:00
makedepends=('go' 'git')
2018-05-10 23:45:26 +00:00
options=('!strip' '!emptydirs')
source=("git+$url#tag=v$pkgver")
md5sums=('SKIP')
prepare() {
mkdir -p build/go && cd build/go
for f in "/usr/lib/go/"*; do ln -s "$f"; done
rm pkg && mkdir pkg && cd pkg
for f in "/usr/lib/go/pkg/"*; do ln -s "$f"; done
export GOPATH="$srcdir/build"
export GOROOT="$GOPATH/go"
mkdir -p "$GOPATH/src/${url#https://}"
mv "$srcdir/$pkgname"/* "$GOPATH/src/${url#https://}"
}
build() {
cd "$GOPATH/src/${url#https://}"
go build -o glide -ldflags "-X main.version=$pkgver" glide.go
}
package() {
cd "$GOPATH/src/${url#https://}"
install -Dm755 $pkgname "$pkgdir/usr/bin/$pkgname"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
# getver: github.com/Masterminds/glide
# vim: ts=2 sw=2 et: