summaryrefslogtreecommitdiff
path: root/package-static.bash
blob: f2dc0d782e654b68085f3db10aa7db92934ac20f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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 --owner=root --group=root -czf $TARGZ gocryptfs gocryptfs.1

echo "Tar created."
echo "Hint for signing: gpg -u 23A02740 --armor --detach-sig $TARGZ"