summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorJames Callahan2021-02-19 10:03:04 +1100
committerJames Callahan2021-02-19 10:05:02 +1100
commit6d78291913d7f5df1ca8799b1efc2455e032f4d2 (patch)
tree1bdcd7d07bd5af14ea19d344dd58dd6b76984efa /PKGBUILD
downloadaur-aws-auth-git.tar.gz
initial commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD41
1 files changed, 41 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..daf816d2576b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+pkgname=aws-auth-git
+pkgver=v0.0.0.r16.g93e4593
+pkgrel=1
+pkgdesc='Manage AWS credential for a range of workflows'
+arch=('x86_64')
+url="https://github.com/joshdk/aws-auth"
+license=('MIT')
+makedepends=('go')
+source=('git+https://github.com/joshdk/aws-auth')
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "aws-auth"
+ git describe --long | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare(){
+ cd "aws-auth"
+ mkdir -p build/
+}
+
+build() {
+ cd "aws-auth"
+ 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"
+ go build -o build .
+}
+
+check() {
+ cd "aws-auth"
+ go test ./...
+}
+
+package() {
+ cd "aws-auth"
+ install -Dm755 build/aws-auth "$pkgdir"/usr/bin/aws-auth
+ install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}