forked from cernekee/ocproxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
release.sh
executable file
·45 lines (36 loc) · 877 Bytes
/
release.sh
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
gpgkey="BC0B0D65"
set -ex
set -o pipefail
# autotools will search .:..:../.. for support files
# let's make sure it can't search our repo, so we know it is getting all
# required files from the release tarball
builddir=tmp.build/a/b/c/d
reldir=tmp.build/w/x/y/z
repodir=`pwd`
rm -rf tmp.build ocproxy-*.tar.gz ocproxy-*.tar.gz.asc
mkdir -p $reldir
git clone . $reldir
pushd $reldir
./autogen.sh
./configure
fakeroot make dist
tarball=$(ls -1 ocproxy-*.tar.gz)
mv $tarball $repodir
popd
mkdir -p $builddir
pushd $builddir
tar -zxf $repodir/$tarball --strip 1
./configure --enable-vpnns
make
make distclean
./configure --enable-vpnns --prefix=/ CFLAGS="-Werror"
make
make install DESTDIR=`pwd`/pfx
make clean
popd
rm -rf tmp.build
if gpg --list-secret-keys $gpgkey >& /dev/null; then
gpg --yes --armor --detach-sign --default-key $gpgkey $tarball
fi
exit 0