summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD33
1 files changed, 21 insertions, 12 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 00e354448d62..816485772f9c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,30 +1,38 @@
-# Maintainer: KingofToasters <dev at sgregoratto dot me>
+# Maintainer: Stephen Gregoratto <dev@sgregoratto.me>
pkgname=age-git
-pkgver=r5.0940f18
-pkgrel=2
-pkgdesc="A simple and secure encryption based on UNIX-style composability."
+pkgver=v1.0.0.beta2.r35.gc9a35c0
+pkgrel=1
+pkgdesc="A simple, modern and secure file encryption tool"
url="https://github.com/FiloSottile/age"
license=('custom: BSD')
provides=('age')
arch=('i686' 'x86_64' 'armv6h' 'armv7h')
+depends=('glibc')
makedepends=('go-pie' 'git')
source=("${pkgname%-git}::git+$url")
sha256sums=('SKIP')
+prepare(){
+ cd "${pkgname%-git}"
+ mkdir -p build/
+}
+
pkgver() {
cd "${pkgname%-git}"
( set -o pipefail
- git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
)
}
build() {
- cd "${pkgname%-git}/cmd/age"
- go build \
- -trimpath \
- -ldflags "-extldflags $LDFLAGS" \
- -o "${pkgname%-git}" .
+ cd "${pkgname%-git}"
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw"
+ go build -o build ./cmd/...
}
check() {
@@ -33,6 +41,7 @@ check() {
}
package() {
- install -Dm755 "${pkgname%-git}/cmd/age/age" "${pkgdir}/usr/bin/${pkgname%-git}"
- install -Dm644 "${pkgname%-git}/LICENSE" "$pkgdir/usr/share/licenses/${pkgname}/LICENCE"
+ install -Dm755 "${pkgname%-git}/build/age" "$pkgdir/usr/bin/age"
+ install -Dm755 "${pkgname%-git}/build/age-keygen" "$pkgdir/usr/bin/age-keygen"
+ install -Dm644 "${pkgname%-git}/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENCE"
}