diff options
author | Stephen Gregoratto | 2020-05-23 00:27:57 +1000 |
---|---|---|
committer | Stephen Gregoratto | 2020-05-23 00:27:57 +1000 |
commit | 569ce6fc8d32b021adc01518ce33f42d5fbce1b6 (patch) | |
tree | f396ec21133c970282eeeba8cef64fa123b9692c | |
parent | 568d24d082d4f2b6298ba8c610b18c116b772fd7 (diff) | |
download | aur-569ce6fc8d32b021adc01518ce33f42d5fbce1b6.tar.gz |
sync PKGBUILD with go package guidelines
- Add age-keygen binary, fix pkgver detection (from caleb).
- Add .gitignore
-rw-r--r-- | .SRCINFO | 7 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 33 |
3 files changed, 29 insertions, 15 deletions
@@ -1,7 +1,7 @@ pkgbase = age-git - pkgdesc = A simple and secure encryption based on UNIX-style composability. - pkgver = r5.0940f18 - pkgrel = 2 + pkgdesc = A simple, modern and secure file encryption tool + pkgver = v1.0.0.beta2.r35.gc9a35c0 + pkgrel = 1 url = https://github.com/FiloSottile/age arch = i686 arch = x86_64 @@ -10,6 +10,7 @@ pkgbase = age-git license = custom: BSD makedepends = go-pie makedepends = git + depends = glibc provides = age source = age::git+https://github.com/FiloSottile/age sha256sums = SKIP diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..e4f9ba3007cf --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +* +!.SRCINFO +!PKGBUILD +!.gitignore @@ -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" } |