blob: b0ef71e81ddc71a79068230cffa4ac4a324d0477 (
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
|
# Maintainer: Tony Lambiris <tony@libpcap.net>
pkgname=vendorlint-git
pkgver=r13.08816a4
pkgrel=3
pkgdesc="Tool to ensure all dependents are properly vendored"
url="https://github.com/mephux/vendorlint"
arch=('x86_64' 'i686')
license=('Apache')
makedepends=('go' 'go-bindata')
source=("${pkgname}::git+https://github.com/mephux/vendorlint.git")
md5sums=('SKIP')
pkgver() {
cd "${srcdir}/${pkgname}"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
prepare() {
cd "${srcdir}/${pkgname}"
mkdir -p "${srcdir}/go/src/github.com/mephux"
ln -sf "${srcdir}/${pkgname}" "${srcdir}/go/src/github.com/mephux/vendorlint"
export GOROOT="/usr/lib/go" GOPATH="${srcdir}/go"
export PATH="$PATH:$GOPATH/bin"
go get -v -d ./...
}
build() {
cd "${srcdir}/go/src/github.com/mephux/vendorlint"
export GOROOT="/usr/lib/go" GOPATH="${srcdir}/go"
export PATH="$PATH:$GOPATH/bin"
make
}
package() {
cd "${srcdir}/go/src/github.com/mephux/vendorlint"
export GOROOT="/usr/lib/go" GOPATH="${srcdir}/go"
export PATH="$PATH:$GOPATH/bin"
install -Dm755 "bin/vendorlint" "${pkgdir}/usr/bin/vendorlint"
}
|