summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD46
1 files changed, 26 insertions, 20 deletions
diff --git a/PKGBUILD b/PKGBUILD
index a29da0481fc2..ff9f13033083 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,31 +2,37 @@
pkgname=vultr
pkgver=2.0.3
-pkgrel=1
+pkgrel=2
pkgdesc="A CLI and API client library for Vultr.com cloud environment"
arch=('x86_64' 'i686' 'aarch64')
-url="https://jamesclonk.github.io/vultr/"
+url="http://blog.jamesclonk.io/vultr/"
license=('MIT')
-options=('!strip')
-_arch=
-sha512sums=('be9678ade50900b3bfc39b392a64019f0cdceb77f08ae62e4599b558e585a6b1eb1c18d9d827d022b3d39d780721e10fb283a084e82d4ba40f06cc99d492e097')
+makedepends=('go')
+source=("https://github.com/JamesClonk/vultr/archive/refs/tags/v${pkgver}.tar.gz")
+sha512sums=('d0258980a57ba48042515378ff1c8dc9646f104ec99ebdfe54c637477401f3b1088183b1c4b74a60c8a8f5fe634ef5e452da4c052f7e358c6d4d661ba147f925')
-case $CARCH in
- x86_64)
- _arch=64bit
- ;;
- i686)
- _arch=32bit
- ;;
- aarch64)
- _arch=ARM64
- ;;
-esac
+prepare(){
+ cd "$pkgname-$pkgver"
+ mkdir -p build/
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+ 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"
+ echo $PWD
+ go build -o build
+}
-source=("https://github.com/JamesClonk/${pkgname}/releases/download/v${pkgver}/${pkgname}_${pkgver}_Linux-${_arch}.tar.gz")
+check() {
+ cd "$pkgname-$pkgver"
+ go test
+}
package() {
- cd "$srcdir"
- install -Dm755 $pkgname $pkgdir/usr/bin/$pkgname
- install -Dm644 LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
+ cd "$pkgname-$pkgver"
+ install -Dm755 build/$pkgname "$pkgdir"/usr/bin/$pkgname
}