gnunet: add new package
authorDaniel Golle <daniel@makrotopia.org>
Sat, 30 May 2015 21:09:47 +0000 (23:09 +0200)
committerDaniel Golle <daniel@makrotopia.org>
Sat, 30 May 2015 21:28:42 +0000 (23:28 +0200)
The single 'gnunet' package built should be further split up,
meta-packages for common use-cases should be added.
However, it's not too big to run on devices with 8MB of flash or more,
even in the current monolithic package.
Integration with procd and netifd is not yet implemented.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
net/gnunet/Makefile [new file with mode: 0644]
net/gnunet/patches/010-cross-compile-fixes.patch [new file with mode: 0644]
net/gnunet/patches/011-no-fpu-includes.patch [new file with mode: 0644]

diff --git a/net/gnunet/Makefile b/net/gnunet/Makefile
new file mode 100644 (file)
index 0000000..3fc933d
--- /dev/null
@@ -0,0 +1,78 @@
+#
+# Copyright (C) 2015 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gnunet
+PKG_SOURCE_VERSION:=35839
+PKG_VERSION:=0.10.1-svn$(PKG_SOURCE_VERSION)
+PKG_RELEASE:=1
+
+# ToDo:
+#  - split into small packages
+#  - create meta-packages for common setups
+#  - allow building with mysql or postgresql
+#  - package gnurl (?)
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE_URL:=https://gnunet.org/svn/gnunet/
+PKG_SOURCE_PROTO:=svn
+
+PKG_LICENSE:=GPL-3.0
+PKG_LICENSE_FILES:=COPYING
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
+
+PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+CONFIGURE_ARGS+= \
+       --disable-rpath \
+       --with-libunistring-prefix \
+       --without-postgresql \
+       --without-mysql
+
+define Package/gnunet
+  SECTION:=net
+  CATEGORY:=Network
+  TITLE:=GNUnet peer-to-peer framework focusing on security
+  DEPENDS:=+libextractor +libidn +libmicrohttpd +libunistring +libgnutls +libsqlite3 +kmod-tun
+  URL:=https://www.gnunet.org/
+endef
+
+define Package/gnunet/description
+ GNUnet is peer-to-peer framework focusing on security.  The first and
+ primary application for GNUnet is anonymous file-sharing.  GNUnet is
+ currently developed by a worldwide group of independent free software
+ developers.  GNUnet is a GNU package (http://www.gnu.org/).
+
+ This is an ALPHA release.  There are known and significant bugs as
+ well as many missing features in this release.
+endef
+
+define Package/gnunet/install
+       $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/gnunet/libexec
+       $(INSTALL_DIR) $(1)/usr/share/gnunet/config.d $(1)/usr/share/gnunet/hellos
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/*.so $(1)/usr/lib/gnunet
+       $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libexec/* $(1)/usr/lib/gnunet/libexec
+       $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/hellos/* $(1)/usr/share/gnunet/hellos
+       $(INSTALL_CONF) $(PKG_INSTALL_DIR)/usr/share/gnunet/config.d/* $(1)/usr/share/gnunet/config.d
+endef
+
+define Build/InstallDev
+       $(INSTALL_DIR) $(1)/usr/include/gnunet $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{la,so}* $(1)/usr/lib/
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
+       $(CP) $(PKG_INSTALL_DIR)/usr/include/gnunet/*.h $(1)/usr/include/gnunet
+endef
+
+$(eval $(call BuildPackage,gnunet))
diff --git a/net/gnunet/patches/010-cross-compile-fixes.patch b/net/gnunet/patches/010-cross-compile-fixes.patch
new file mode 100644 (file)
index 0000000..8206927
--- /dev/null
@@ -0,0 +1,13 @@
+Index: gnunet-0.10.1/configure.ac
+===================================================================
+--- gnunet-0.10.1.orig/configure.ac
++++ gnunet-0.10.1/configure.ac
+@@ -194,7 +194,7 @@ AM_CONDITIONAL(GNU, test "$build_target"
+ AC_MSG_RESULT([$build_target])
+ AC_SUBST(build_target)
+ AM_CONDITIONAL([am__fastdepOBJC], false)
+-AC_UNALIGNED_64_ACCESS
++# AC_UNALIGNED_64_ACCESS
+ # some other checks for standard libs
+ AC_SEARCH_LIBS([gethostbyname], [nsl ws2_32])
diff --git a/net/gnunet/patches/011-no-fpu-includes.patch b/net/gnunet/patches/011-no-fpu-includes.patch
new file mode 100644 (file)
index 0000000..cb07e32
--- /dev/null
@@ -0,0 +1,36 @@
+Index: gnunet-0.10.1/src/dht/gnunet-service-dht_neighbours.c
+===================================================================
+--- gnunet-0.10.1.orig/src/dht/gnunet-service-dht_neighbours.c
++++ gnunet-0.10.1/src/dht/gnunet-service-dht_neighbours.c
+@@ -45,7 +45,6 @@
+ #include "gnunet-service-dht_neighbours.h"
+ #include "gnunet-service-dht_nse.h"
+ #include "gnunet-service-dht_routing.h"
+-#include <fenv.h>
+ #include "dht.h"
+ #define LOG_TRAFFIC(kind,...) GNUNET_log_from (kind, "dht-traffic",__VA_ARGS__)
+Index: gnunet-0.10.1/src/dht/gnunet-service-wdht_neighbours.c
+===================================================================
+--- gnunet-0.10.1.orig/src/dht/gnunet-service-wdht_neighbours.c
++++ gnunet-0.10.1/src/dht/gnunet-service-wdht_neighbours.c
+@@ -44,7 +44,6 @@
+ #include "gnunet-service-wdht_datacache.h"
+ #include "gnunet-service-wdht_neighbours.h"
+ #include "gnunet-service-wdht_nse.h"
+-#include <fenv.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include "dht.h"
+Index: gnunet-0.10.1/src/dht/gnunet-service-xdht_neighbours.c
+===================================================================
+--- gnunet-0.10.1.orig/src/dht/gnunet-service-xdht_neighbours.c
++++ gnunet-0.10.1/src/dht/gnunet-service-xdht_neighbours.c
+@@ -41,7 +41,6 @@
+ #include "gnunet-service-xdht_datacache.h"
+ #include "gnunet-service-xdht_neighbours.h"
+ #include "gnunet-service-xdht_routing.h"
+-#include <fenv.h>
+ #include "dht.h"
+ /**