Преглед изворни кода

gnunet: add new package

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>
Daniel Golle пре 9 година
родитељ
комит
98a821a93a

+ 78
- 0
net/gnunet/Makefile Прегледај датотеку

@@ -0,0 +1,78 @@
1
+#
2
+# Copyright (C) 2015 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=gnunet
11
+PKG_SOURCE_VERSION:=35839
12
+PKG_VERSION:=0.10.1-svn$(PKG_SOURCE_VERSION)
13
+PKG_RELEASE:=1
14
+
15
+# ToDo:
16
+#  - split into small packages
17
+#  - create meta-packages for common setups
18
+#  - allow building with mysql or postgresql
19
+#  - package gnurl (?)
20
+
21
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
22
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
23
+PKG_SOURCE_URL:=https://gnunet.org/svn/gnunet/
24
+PKG_SOURCE_PROTO:=svn
25
+
26
+PKG_LICENSE:=GPL-3.0
27
+PKG_LICENSE_FILES:=COPYING
28
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
29
+
30
+PKG_BUILD_PARALLEL:=1
31
+PKG_FIXUP:=autoreconf
32
+PKG_INSTALL:=1
33
+
34
+include $(INCLUDE_DIR)/package.mk
35
+
36
+CONFIGURE_ARGS+= \
37
+	--disable-rpath \
38
+	--with-libunistring-prefix \
39
+	--without-postgresql \
40
+	--without-mysql
41
+
42
+define Package/gnunet
43
+  SECTION:=net
44
+  CATEGORY:=Network
45
+  TITLE:=GNUnet peer-to-peer framework focusing on security
46
+  DEPENDS:=+libextractor +libidn +libmicrohttpd +libunistring +libgnutls +libsqlite3 +kmod-tun
47
+  URL:=https://www.gnunet.org/
48
+endef
49
+
50
+define Package/gnunet/description
51
+ GNUnet is peer-to-peer framework focusing on security.  The first and
52
+ primary application for GNUnet is anonymous file-sharing.  GNUnet is
53
+ currently developed by a worldwide group of independent free software
54
+ developers.  GNUnet is a GNU package (http://www.gnu.org/).
55
+
56
+ This is an ALPHA release.  There are known and significant bugs as
57
+ well as many missing features in this release.
58
+endef
59
+
60
+define Package/gnunet/install
61
+	$(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/gnunet/libexec
62
+	$(INSTALL_DIR) $(1)/usr/share/gnunet/config.d $(1)/usr/share/gnunet/hellos
63
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
64
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib/
65
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/*.so $(1)/usr/lib/gnunet
66
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libexec/* $(1)/usr/lib/gnunet/libexec
67
+	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/hellos/* $(1)/usr/share/gnunet/hellos
68
+	$(INSTALL_CONF) $(PKG_INSTALL_DIR)/usr/share/gnunet/config.d/* $(1)/usr/share/gnunet/config.d
69
+endef
70
+
71
+define Build/InstallDev
72
+	$(INSTALL_DIR) $(1)/usr/include/gnunet $(1)/usr/lib/pkgconfig
73
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{la,so}* $(1)/usr/lib/
74
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
75
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/gnunet/*.h $(1)/usr/include/gnunet
76
+endef
77
+
78
+$(eval $(call BuildPackage,gnunet))

+ 13
- 0
net/gnunet/patches/010-cross-compile-fixes.patch Прегледај датотеку

@@ -0,0 +1,13 @@
1
+Index: gnunet-0.10.1/configure.ac
2
+===================================================================
3
+--- gnunet-0.10.1.orig/configure.ac
4
++++ gnunet-0.10.1/configure.ac
5
+@@ -194,7 +194,7 @@ AM_CONDITIONAL(GNU, test "$build_target"
6
+ AC_MSG_RESULT([$build_target])
7
+ AC_SUBST(build_target)
8
+ AM_CONDITIONAL([am__fastdepOBJC], false)
9
+-AC_UNALIGNED_64_ACCESS
10
++# AC_UNALIGNED_64_ACCESS
11
+ 
12
+ # some other checks for standard libs
13
+ AC_SEARCH_LIBS([gethostbyname], [nsl ws2_32])

+ 36
- 0
net/gnunet/patches/011-no-fpu-includes.patch Прегледај датотеку

@@ -0,0 +1,36 @@
1
+Index: gnunet-0.10.1/src/dht/gnunet-service-dht_neighbours.c
2
+===================================================================
3
+--- gnunet-0.10.1.orig/src/dht/gnunet-service-dht_neighbours.c
4
++++ gnunet-0.10.1/src/dht/gnunet-service-dht_neighbours.c
5
+@@ -45,7 +45,6 @@
6
+ #include "gnunet-service-dht_neighbours.h"
7
+ #include "gnunet-service-dht_nse.h"
8
+ #include "gnunet-service-dht_routing.h"
9
+-#include <fenv.h>
10
+ #include "dht.h"
11
+ 
12
+ #define LOG_TRAFFIC(kind,...) GNUNET_log_from (kind, "dht-traffic",__VA_ARGS__)
13
+Index: gnunet-0.10.1/src/dht/gnunet-service-wdht_neighbours.c
14
+===================================================================
15
+--- gnunet-0.10.1.orig/src/dht/gnunet-service-wdht_neighbours.c
16
++++ gnunet-0.10.1/src/dht/gnunet-service-wdht_neighbours.c
17
+@@ -44,7 +44,6 @@
18
+ #include "gnunet-service-wdht_datacache.h"
19
+ #include "gnunet-service-wdht_neighbours.h"
20
+ #include "gnunet-service-wdht_nse.h"
21
+-#include <fenv.h>
22
+ #include <stdlib.h>
23
+ #include <string.h>
24
+ #include "dht.h"
25
+Index: gnunet-0.10.1/src/dht/gnunet-service-xdht_neighbours.c
26
+===================================================================
27
+--- gnunet-0.10.1.orig/src/dht/gnunet-service-xdht_neighbours.c
28
++++ gnunet-0.10.1/src/dht/gnunet-service-xdht_neighbours.c
29
+@@ -41,7 +41,6 @@
30
+ #include "gnunet-service-xdht_datacache.h"
31
+ #include "gnunet-service-xdht_neighbours.h"
32
+ #include "gnunet-service-xdht_routing.h"
33
+-#include <fenv.h>
34
+ #include "dht.h"
35
+ 
36
+ /**