[arch-commits] Commit in gocryptfs/trunk (PKGBUILD build_flags.patch)
Maxim Baz
maximbaz at archlinux.org
Sat Dec 1 23:41:22 UTC 2018
Date: Saturday, December 1, 2018 @ 23:41:22
Author: maximbaz
Revision: 410741
upgpkg: gocryptfs 1.6-2
gocryptfs: import from AUR
Added:
gocryptfs/trunk/PKGBUILD
gocryptfs/trunk/build_flags.patch
-------------------+
PKGBUILD | 42 ++++++++++++++++++++++++++++++++++++++++++
build_flags.patch | 15 +++++++++++++++
2 files changed, 57 insertions(+)
Added: PKGBUILD
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2018-12-01 23:41:22 UTC (rev 410741)
@@ -0,0 +1,42 @@
+# Maintainer: Maxim Baz <$pkgname at maximbaz dot com>
+# Contributor: Peter Reschenhofer <peter.reschenhofer at gmail.com>
+
+_pkgauthor=rfjakob
+pkgname=gocryptfs
+pkgver=1.6
+pkgrel=2
+pkgdesc='Encrypted overlay filesystem written in Go.'
+arch=('x86_64')
+url="https://github.com/${_pkgauthor}/${pkgname}"
+license=('MIT')
+depends=('gcc-libs' 'openssl' 'fuse')
+makedepends=('go-pie' 'pandoc' 'man-db')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/${_pkgauthor}/${pkgname}/releases/download/v${pkgver}/${pkgname}_v${pkgver}_src-deps.tar.gz"
+ "${pkgname}-${pkgver}.tar.gz.asc::https://github.com/${_pkgauthor}/${pkgname}/releases/download/v${pkgver}/${pkgname}_v${pkgver}_src-deps.tar.gz.asc"
+ "build_flags.patch")
+sha256sums=('98ff3bc0497ca195f65fa5912ebab33a0f80aa27205b0b35e73908d23dcefbe6'
+ 'SKIP'
+ '0e57cf29854c415cc5527d4cdff670ea566d37502dd00262ca4f1a1a34e75c07')
+validpgpkeys=('FFF3E01444FED7C316A3545A895F5BC123A02740')
+
+prepare() {
+ mkdir -p "${srcdir}/gopath/src/github.com/${_pkgauthor}"
+ ln -rTsf "${srcdir}/${pkgname}_v${pkgver}_src-deps" "${srcdir}/gopath/src/github.com/${_pkgauthor}/${pkgname}"
+
+ cd "${srcdir}/gopath/src/github.com/${_pkgauthor}/${pkgname}"
+ patch -Np1 -i "${srcdir}/build_flags.patch"
+}
+
+build() {
+ export GOPATH="${srcdir}/gopath"
+ cd "${srcdir}/gopath/src/github.com/${_pkgauthor}/${pkgname}"
+ ./build.bash
+ ./Documentation/MANPAGE-render.bash >/dev/null
+}
+
+package() {
+ cd "${srcdir}/gopath/src/github.com/${_pkgauthor}/${pkgname}"
+ install -Dm755 -t "${pkgdir}/usr/bin/" "${pkgname}"
+ install -Dm644 "Documentation/${pkgname}.1" "${pkgdir}/usr/share/man/man1/${pkgname}.1"
+ install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE
+}
Added: build_flags.patch
===================================================================
--- build_flags.patch (rev 0)
+++ build_flags.patch 2018-12-01 23:41:22 UTC (rev 410741)
@@ -0,0 +1,15 @@
+--- a/build.bash
++++ b/build.bash
+@@ -57,8 +57,10 @@ if [[ -z ${BUILDDATE:-} ]] ; then
+ BUILDDATE=$(date +%Y-%m-%d)
+ fi
+
+-LDFLAGS="-X main.GitVersion=$GITVERSION -X main.GitVersionFuse=$GITVERSIONFUSE -X main.BuildDate=$BUILDDATE"
+-go build "-ldflags=$LDFLAGS" "$@"
++GO_GCFLAGS="all=-trimpath=$PWD"
++GO_ASMFLAGS="all=-trimpath=$PWD"
++GO_LDFLAGS="-extldflags=$LDFLAGS -X main.GitVersion=$GITVERSION -X main.GitVersionFuse=$GITVERSIONFUSE -X main.BuildDate=$BUILDDATE"
++go build -ldflags "$GO_LDFLAGS" -gcflags "$GO_GCFLAGS" -asmflags "$GO_ASMFLAGS" "$@"
+
+ (cd gocryptfs-xray; go build "$@")
+
More information about the arch-commits
mailing list