summaryrefslogtreecommitdiff
path: root/packaging/ng/buildscripts/build-gnunet.sh
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/ng/buildscripts/build-gnunet.sh')
-rw-r--r--packaging/ng/buildscripts/build-gnunet.sh41
1 files changed, 41 insertions, 0 deletions
diff --git a/packaging/ng/buildscripts/build-gnunet.sh b/packaging/ng/buildscripts/build-gnunet.sh
new file mode 100644
index 0000000..70fb1a8
--- /dev/null
+++ b/packaging/ng/buildscripts/build-gnunet.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+# This file is in the public domain.
+# Helper script to build the latest DEB packages in the container.
+
+set -eu
+unset LD_LIBRARY_PATH
+
+cd /pkgdir
+dpkg-scanpackages . /dev/null | gzip -9c > /pkgdir/Packages.gz
+echo "deb [trusted=yes] file:/pkgdir ./" >/etc/apt/sources.list.d/taler-packaging-local.list
+apt-get update
+
+
+mkdir -p /build
+cd /build
+
+TAG=${1:-master}
+
+git clone --depth=1 git://git.gnunet.org/gnunet
+cd gnunet
+git checkout $TAG
+
+# Get current version from debian/control file.
+DEB_VERSION=$(dpkg-parsechangelog -S Version)
+
+apt-cache show gnunet | grep "Version: $DEB_VERSION" >/dev/null && found=true || found=false
+if [ $found = true ]; then
+ echo "gnunet version $DEB_VERSION already built, skipping"
+ exit 0
+fi
+
+# Install build-time dependencies.
+mk-build-deps --install --tool='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends --yes' debian/control
+
+# We do a sparse checkout, so we need to hint
+# the version to the build system.
+echo $DEB_VERSION > .version
+./bootstrap
+dpkg-buildpackage -rfakeroot -b -uc -us
+
+cp /build/*.deb /pkgdir/