From 0ac5e44137e457dad2a7f5408fb475bf69c642fa Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sun, 4 Jun 2017 19:25:08 +0200 Subject: Add "package-static.bash" helper script Creates a tar.gz with a static build of gocryptfs and the man page. --- build-without-openssl.bash | 6 ++---- package-static.bash | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) create mode 100755 package-static.bash diff --git a/build-without-openssl.bash b/build-without-openssl.bash index 7c62511..e965951 100755 --- a/build-without-openssl.bash +++ b/build-without-openssl.bash @@ -1,7 +1,5 @@ -#!/bin/bash - -set -eu +#!/bin/bash -eu cd "$(dirname "$0")" -CGO_ENABLED=0 ./build.bash -tags without_openssl +CGO_ENABLED=0 source ./build.bash -tags without_openssl diff --git a/package-static.bash b/package-static.bash new file mode 100755 index 0000000..a30d649 --- /dev/null +++ b/package-static.bash @@ -0,0 +1,25 @@ +#!/bin/bash -eu + +cd $(dirname "$0") + +# Compiles the gocryptfs binary and sets $GITVERSION +source build-without-openssl.bash + +if ldd gocryptfs > /dev/null ; then + echo "error: compiled binary is not static" + exit 1 +fi + +# Build gocryptfs.1 man page +./Documentation/MANPAGE-render.bash > /dev/null +cp -a ./Documentation/gocryptfs.1 . + +ARCH=$(go env GOARCH) +OS=$(go env GOOS) + +TARGZ=gocryptfs_${GITVERSION}_${OS}-static_${ARCH}.tar.gz + +tar czf $TARGZ gocryptfs gocryptfs.1 + +echo "Tar created." +echo "Hint for signing: gpg -u 23A02740 --armor --detach-sig $TARGZ" -- cgit v1.2.3