summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorDevan Carpenter <git@dvn.me>2020-01-03 17:01:36 +0100
committerDevan Carpenter <git@dvn.me>2020-01-03 17:01:36 +0100
commit9b33cb121ded68247bc7a9388bf41e46063cd812 (patch)
tree13b3fba5762a49919430b4cda08fced1bd082248 /contrib
parent90440fa6d289fa51273a3b2c4786fc453c28b298 (diff)
add build/install script for Debian 10 to contrib
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/scripts/build-install-gnunet-debian10.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/contrib/scripts/build-install-gnunet-debian10.sh b/contrib/scripts/build-install-gnunet-debian10.sh
new file mode 100755
index 000000000..863ed5e2d
--- /dev/null
+++ b/contrib/scripts/build-install-gnunet-debian10.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+set -exo
+set -u pipefail
+
+if test -z "$USER" = "root"; then
+ export SUDO_CMD=""
+else
+ SUDO_CMD="sudo"
+fi
+
+$SUDO_CMD apt update && $SUDO_CMD apt install -y git libtool autoconf \
+autopoint libmicrohttpd-dev build-essential libgcrypt-dev \
+libidn11-dev zlib1g-dev libunistring-dev libglpk-dev miniupnpc \
+libextractor-dev libjansson-dev libcurl4-gnutls-dev gnutls-bin \
+libsqlite3-dev openssl libnss3-tools libopus-dev libpulse-dev libogg-dev
+
+mkdir ~/gnunet_installation || true
+
+cd ~/gnunet_installation
+
+git clone --depth 1 https://gnunet.org/git/gnunet.git || true
+
+cd ~/gnunet_installation/gnunet
+
+./bootstrap
+
+export GNUNET_PREFIX=/usr/local
+export CFLAGS="-g -Wall -O0"
+
+./configure --prefix=$GNUNET_PREFIX --enable-logging=verbose --disable-documentation
+
+$SUDO_CMD addgroup gnunet || true
+
+$SUDO_CMD usermod -aG gnunet $USER || true
+
+make -j$(nproc || echo -n 1)
+
+$SUDO_CMD make install