summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorDimitris Kiziridis2020-07-06 05:00:29 +0300
committerDimitris Kiziridis2020-07-06 05:00:29 +0300
commit5b9dcc8efcd06208fb108f3f02278f28536b2eb2 (patch)
tree584c9e330048a0eca297e791e3a5a5e7be424e58 /PKGBUILD
parent65ecd43d1dfe913f3e87d54809f56283d988ea2a (diff)
downloadaur-calicoctl.tar.gz
Update to 3.15.0
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD46
1 files changed, 21 insertions, 25 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 340ec4848a8..798793e7e80 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,40 +1,36 @@
-# Maintainer: Roman Lisagor <rlisagor at gmail dot com>
+# Maintainer: Dimitris Kiziridis <ragouel at outlook dot com>
+# Contributor: Roman Lisagor <rlisagor at gmail dot com>
pkgname=calicoctl
-pkgver=1.6.3
-pkgrel=2
+pkgver=3.15.0
+pkgrel=1
pkgdesc="Calico CLI tool"
arch=('x86_64')
url="https://github.com/projectcalico/calicoctl"
license=("Apache")
-makedepends=('go' 'glide')
depends=('glibc')
-source=("https://github.com/projectcalico/${pkgname}/archive/v${pkgver}.tar.gz"
- "no-install-during-build.patch")
-sha512sums=('d08c38972d0cbe54320366463d60ae6633f687fea6dc94cfe677c8cda178d4637ea6a16875c7d9b0acea4839fa8a630325d489a549d2f3a03fdfc79abb3b3a98'
- '328016b77923eb06a1e816b5065bdac7cf583979098e82709936f2bdc3af9900698d3e056d5a16f49f7a445113cd75f04f751b99ab1d6ca62770c66fbec08962')
-
+makedepends=('go')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/projectcalico/${pkgname}/archive/v${pkgver}.tar.gz")
+sha256sums=('605c9879b3e0414a2aef68a603045a5b13cc27153244cf67474ed0639ca06040')
prepare() {
- rm -rf ${srcdir}/gopath
- mkdir -p ${srcdir}/gopath/{src,bin,pkg}
- mkdir -p ${srcdir}/gopath/src/github.com/projectcalico/
-
- mv calicoctl-${pkgver} ${srcdir}/gopath/src/github.com/projectcalico/calicoctl
-
- cd ${srcdir}/gopath/src/github.com/projectcalico/calicoctl
- patch -Np1 -i "${srcdir}/no-install-during-build.patch"
+ cd "${pkgname}-${pkgver}"
+ mkdir -p build/
}
build() {
- cd ${srcdir}/gopath/src/github.com/projectcalico/calicoctl
- export GOPATH=${srcdir}/gopath
- glide install -strip-vendor
- make binary CALICOCTL_VERSION=v${pkgver}
+ cd "${pkgname}-${pkgver}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export GOPATH="${srcdir}"/go
+ export PATH=$PATH:$GOPATH/bin
+ export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
+ go build -v -o build ./...
}
package() {
- install -Dm755 \
- ${srcdir}/gopath/src/github.com/projectcalico/calicoctl/dist/calicoctl-linux-amd64 \
- ${pkgdir}/usr/bin/calicoctl
-}
+ cd "${pkgname}-${pkgver}"
+ install -Dm755 build/calicoctl "${pkgdir}/usr/bin/calicoctl"
+} \ No newline at end of file