Add "package-static.bash" helper script

Creates a tar.gz with a static build of gocryptfs and the man page.
This commit is contained in:
Jakob Unterwurzacher 2017-06-04 19:25:08 +02:00
parent d8d7c5c4fa
commit 0ac5e44137
2 changed files with 27 additions and 4 deletions

View File

@ -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

25
package-static.bash Executable file
View File

@ -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"