new package: gnunet

Requested in https://github.com/termux/termux-packages/issues/4707.
This commit is contained in:
Leonid Pliushch 2020-01-03 22:42:18 +02:00 committed by GitHub
parent 37d80cc2ce
commit 41c3da3b9c
4 changed files with 110 additions and 0 deletions

32
packages/gnunet/build.sh Normal file
View File

@ -0,0 +1,32 @@
TERMUX_PKG_HOMEPAGE=http://gnunet.org
TERMUX_PKG_DESCRIPTION="A framework for secure peer-to-peer networking"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_VERSION=0.12.1
TERMUX_PKG_DEPENDS="gnurl, libgcrypt, libgmp, libidn, libjansson, libltdl, libmicrohttpd, libsqlite, libunistring"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="ac_cv_have_decl_struct_in6_ifreq=yes"
termux_step_extract_package() {
local CHECKED_OUT_FOLDER=$TERMUX_PKG_CACHEDIR/checkout-$TERMUX_PKG_VERSION
if [ ! -d $CHECKED_OUT_FOLDER ]; then
local TMP_CHECKOUT=$TERMUX_PKG_TMPDIR/tmp-checkout
rm -Rf $TMP_CHECKOUT
mkdir -p $TMP_CHECKOUT
git clone --depth 1 \
--branch v$TERMUX_PKG_VERSION \
https://gnunet.org/git/gnunet.git \
$TMP_CHECKOUT
cd $TMP_CHECKOUT
git submodule update --init # --depth 1
mv $TMP_CHECKOUT $CHECKED_OUT_FOLDER
fi
mkdir $TERMUX_PKG_SRCDIR
cd $TERMUX_PKG_SRCDIR
cp -Rf $CHECKED_OUT_FOLDER/* .
}
termux_step_pre_configure() {
./bootstrap
}

View File

@ -0,0 +1,26 @@
diff --git a/src/exit/gnunet-helper-exit.c b/src/exit/gnunet-helper-exit.c
index d460326..03beecc 100644
--- a/src/exit/gnunet-helper-exit.c
+++ b/src/exit/gnunet-helper-exit.c
@@ -85,7 +85,7 @@ static const char *sbin_sysctl;
static const char *sbin_iptables;
-#if ! defined(_LINUX_IN6_H) && defined(__linux__)
+#if ! defined(_LINUX_IN6_H) && !defined(__ANDROID__)
/**
* This is in linux/include/net/ipv6.h, but not always exported.
*/
diff --git a/src/vpn/gnunet-helper-vpn.c b/src/vpn/gnunet-helper-vpn.c
index 4e35fa2..34eb018 100644
--- a/src/vpn/gnunet-helper-vpn.c
+++ b/src/vpn/gnunet-helper-vpn.c
@@ -59,7 +59,7 @@
*/
#define MAX_SIZE 65536
-#ifndef _LINUX_IN6_H
+#if !defined(_LINUX_IN6_H) && !defined(__ANDROID__)
/**
* This is in linux/include/net/ipv6.h, but not always exported...
*/

View File

@ -0,0 +1,13 @@
diff --git a/src/cadet/Makefile.am b/src/cadet/Makefile.am
index d8d81bf..cfc182b 100644
--- a/src/cadet/Makefile.am
+++ b/src/cadet/Makefile.am
@@ -72,7 +72,7 @@ gnunet_service_cadet_LDADD = \
$(top_builddir)/src/hello/libgnunethello.la \
$(top_builddir)/src/block/libgnunetblock.la
if LINUX
- gnunet_service_cadet_LDFLAGS = -lrt \
+ gnunet_service_cadet_LDFLAGS = \
$(GN_LIBINTL)
endif

39
packages/gnurl/build.sh Normal file
View File

@ -0,0 +1,39 @@
TERMUX_PKG_HOMEPAGE=https://gnunet.org/gnurl
TERMUX_PKG_DESCRIPTION="Fork of libcurl, which is mostly for GNUnet"
TERMUX_PKG_LICENSE="MIT"
TERMUX_PKG_VERSION=7.67.0
TERMUX_PKG_SRCURL=https://ftp.gnu.org/gnu/gnunet/gnurl-$TERMUX_PKG_VERSION.tar.Z
TERMUX_PKG_SHA256=e0982d3226895a2d46a01e92ced1f32ab12e92540ba7ef2edbf28b7cadf8526b
TERMUX_PKG_DEPENDS="libgnutls, libnghttp2"
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
--disable-dict \
--disable-file \
--disable-ftp \
--disable-gopher \
--disable-imap \
--disable-ldap \
--disable-ldaps \
--disable-ntlm-wb \
--disable-pop3 \
--disable-rtsp \
--disable-smb \
--disable-smtp \
--disable-telnet \
--disable-tftp \
--enable-ipv6 \
--enable-manual \
--enable-versioned-symbols \
--enable-threaded-resolver \
--without-gssapi \
--with-gnutls \
--without-libidn \
--without-libpsl \
--without-librtmp \
--without-ssl \
--disable-ftp \
--disable-file \
--with-random=/dev/urandom \
--with-ca-bundle=$TERMUX_PREFIX/etc/tls/cert.pem
--with-ca-path=$TERMUX_PREFIX/etc/tls/certs
"