From 4ad474574ec602e46ed145dee8d4f9da49ed0975 Mon Sep 17 00:00:00 2001 From: Divya Jain Date: Fri, 6 Feb 2026 23:21:32 +0530 Subject: [PATCH] Initial upload: saml2aws-git --- .SRCINFO | 20 ++++++++++++++++++++ PKGBUILD | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 .SRCINFO create mode 100644 PKGBUILD diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..0e0d4db6fee5 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,20 @@ +pkgbase = saml2aws-git + pkgdesc = CLI tool which enables you to login and retrieve AWS temporary credentials using a SAML IDP (git version) + pkgver = 2.36.19.r0.g1234567 + pkgrel = 1 + url = https://github.com/Versent/saml2aws + arch = x86_64 + arch = armv7h + arch = aarch64 + license = MIT + makedepends = git + makedepends = go + depends = gcc-libs + depends = systemd-libs + provides = saml2aws + conflicts = saml2aws + conflicts = saml2aws-bin + source = saml2aws-git::git+https://github.com/Versent/saml2aws.git + sha256sums = SKIP + +pkgname = saml2aws-git diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..21acd3cf18d5 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,46 @@ +# Maintainer: Divya Jain +# Based on saml2aws PKGBUILD by JP Roemer + +pkgname=saml2aws-git +pkgver=2.36.19.r8.g65195ee +pkgrel=1 +pkgdesc='CLI tool which enables you to login and retrieve AWS temporary credentials using a SAML IDP (git version)' +arch=('x86_64' 'armv7h' 'aarch64') +url="https://github.com/Versent/saml2aws" +license=('MIT') +depends=('gcc-libs' 'systemd-libs') +makedepends=('git' 'go') +provides=("saml2aws") +conflicts=("saml2aws" "saml2aws-bin") +source=("${pkgname}::git+${url}.git") +sha256sums=('SKIP') + +export CGO_ENABLED="1" +export CGO_CPPFLAGS="${CPPFLAGS}" +export CGO_CFLAGS="${CFLAGS}" +export CGO_CXXFLAGS="${CXXFLAGS}" +export CGO_LDFLAGS="${LDFLAGS}" +export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw -tags=hidraw" + +pkgver() { + cd "${pkgname}" + git describe --long --tags | sed 's/^v//;s/-/.r/;s/-/./g' +} + +build() { + local _commit _flags + _commit=$(git -C "${pkgname}" rev-parse HEAD) + _flags=( + -X=main.Version="${pkgver}" + -X=main.commit="${_commit::7}" + -X=main.date="$(date -u -d "@${SOURCE_DATE_EPOCH}" +'%FT%TZ')" + -linkmode=external + ) + cd "${pkgname}" + go build -o "saml2aws" -ldflags="-s -w ${_flags[*]}" "./cmd/saml2aws" +} + +package() { + cd "${pkgname}" + install -Dm 755 "saml2aws" -t "${pkgdir}/usr/bin" +}