2 # Copyright (C) 2015 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
11 PKG_SOURCE_VERSION
:=36713
12 PKG_VERSION
:=0.10.1-svn
$(PKG_SOURCE_VERSION
)
16 # - break-out {peer,name,data}store for each backend
17 # - package testing stuff
19 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
20 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
21 PKG_SOURCE_URL
:=https
://gnunet.org
/svn
/gnunet
/
25 PKG_LICENSE_FILES
:=COPYING
26 PKG_MAINTAINER
:=Daniel Golle
<daniel@makrotopia.org
>
29 PKG_FIXUP
:=gettext-version
32 include $(INCLUDE_DIR
)/package.mk
33 include $(INCLUDE_DIR
)/nls.mk
36 --with-libiconv-prefix
="$(ICONV_PREFIX)" \
37 --with-libintl-prefix
="$(INTL_PREFIX)" \
39 $(if
$(CONFIG_PACKAGE_
$(PKG_NAME
)-mysql
),--with-mysql
="$(STAGING_DIR)/usr",--without-mysql
) \
40 $(if
$(CONFIG_PACKAGE_
$(PKG_NAME
)-pgsql
),--with-postgresql
="$(STAGING_DIR)/usr/bin/pg_config",--without-postgresql
) \
41 $(if
$(CONFIG_PACKAGE_
$(PKG_NAME
)-sqlite
),--with-sqlite
="$(STAGING_DIR)/usr",--without-sqlite
) \
42 $(if
$(CONFIG_PACKAGE_
$(PKG_NAME
)-experiments
),--enable-experimental
,--disable-experimental
) \
43 --with-extractor
=$(STAGING_DIR
)/usr \
44 --with-gnutls
=$(STAGING_DIR
)/usr \
45 --with-libgnurl
=$(STAGING_DIR
)/usr \
46 --with-libunistring-prefix
=$(STAGING_DIR
)/usr \
47 --with-microhttpd
=$(STAGING_DIR
)/usr
49 # ToDo: request upstream to provide --with-pulseaudio=...
50 TARGET_LDFLAGS
+= -Wl
,-rpath-link
=$(STAGING_DIR
)/usr
/lib
/pulseaudio
52 define Package
/gnunet
/Default
56 URL
:=https
://www.gnunet.org
/
60 $(call Package
/gnunet
/Default
)
61 TITLE
+= - a peer-to-peer framework focusing on security
62 DEPENDS
:=+ca-certificates
+libgnurl
+libgnutls
+libidn
+libltdl \
63 +libmicrohttpd
+libunistring
+librt
$(ICONV_DEPENDS
) $(INTL_DEPENDS
)
64 USERID
:=gnunet
=400:gnunet
=400
68 define Package
/gnunet
/description
69 GNUnet is a peer-to-peer framework focusing on security. The first and
70 primary application for GNUnet is anonymous file-sharing. GNUnet is
71 currently developed by a worldwide group of independent free software
72 developers. GNUnet is a GNU package
(http
://www.gnu.org
/).
74 This is an ALPHA release. There are known and significant bugs
as
75 well
as many missing features in this release.
77 This package provides the core components of GNUnet including the
78 CADET routing engine
, a DHT implementation and basic transports
as
79 well
as their helpers.
83 define Package
/gnunet-
$(1)
84 $$(call Package
/gnunet
/Default
)
86 DEPENDS
:=gnunet
$(DEPENDS_
$(1))
87 $(if
$(3),DEFAULT
:=y if PACKAGE_gnunet
)
88 $(if
$(USERID_
$(1)),USERID
:=$(USERID_
$(1)))
91 define Package
/gnunet-
$(1)/install
92 ( if
[ "$(BIN_$(1))" ]; then \
93 $(INSTALL_DIR
) $$(1)/usr
/bin
; \
94 for bin in
$(BIN_
$(1)); do \
95 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/gnunet-
$$$$$$$$bin $$(1)/usr
/bin
/ ; \
99 ( if
[ "$(LIB_$(1))" ]; then \
100 $(INSTALL_DIR
) $$(1)/usr
/lib
; \
101 for lib in
$(LIB_
$(1)); do \
102 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnunet
$$$$$$$$lib.so
* $$(1)/usr
/lib
/ ; \
106 ( if
[ "$(PLUGIN_$(1))" ]; then \
107 $(INSTALL_DIR
) $$(1)/usr
/lib
/gnunet
; \
108 for plug in
$(PLUGIN_
$(1)); do \
109 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/gnunet
/libgnunet_plugin_
$$$$$$$$plug*.so
$$(1)/usr
/lib
/gnunet
; \
113 ( if
[ "$(LIBEXEC_$(1))" ]; then \
114 $(INSTALL_DIR
) $$(1)/usr
/lib
/gnunet
/libexec
; \
115 for
lex in
$(LIBEXEC_
$(1)); do \
116 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/gnunet
/libexec
/gnunet-
$$$$$$$$lex $$(1)/usr
/lib
/gnunet
/libexec
; \
120 ( if
[ "$(CONF_$(1))" ]; then \
121 $(INSTALL_DIR
) $$(1)/usr
/share
/gnunet
/config.d
; \
122 for conf in
$(CONF_
$(1)); do \
123 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/gnunet
/config.d
/$$$$$$$$conf.conf
$$(1)/usr
/share
/gnunet
/config.d
; \
128 $$(eval
$$(call BuildPackage
,gnunet-
$(1)))
131 define Package
/gnunet
/install
132 $(INSTALL_DIR
) $(1)/usr
/bin
$(1)/usr
/lib
/gnunet
/libexec
133 $(INSTALL_DIR
) $(1)/usr
/share
/gnunet
/config.d
$(1)/usr
/share
/gnunet
/hellos
135 ( for bin in arm ats cadet core config ecc identity nat nat-server nse \
136 peerinfo peerstore revocation scalarproduct statistics transport uri
; do \
137 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/gnunet-
$$$$bin $(1)/usr
/bin
/ ; \
140 ( for lib in arm ats block cadet core datacache dht \
141 dns dnsparser dnsstub fragmentation friends hello identity nat nse \
142 peerinfo peerstore regexblock regex revocation scalarproduct set \
143 statistics transport util
; do \
144 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnunet
$$$$lib.so
* $(1)/usr
/lib
/ ; \
147 ( for plug in ats_proportional block_dht block_regex datacache_heap \
148 transport_tcp transport_udp transport_unix
; do \
149 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/gnunet
/libgnunet_plugin_
$$$$plug*.so
$(1)/usr
/lib
/gnunet
; \
152 ( for
lex in daemon-hostlist daemon-topology helper-nat-client \
153 helper-nat-server service-arm service-ats service-cadet \
154 service-core service-dht service-identity service-nse \
155 service-peerinfo service-peerstore service-regex \
156 service-revocation service-scalarproduct-alice \
157 service-scalarproduct-bob service-scalarproduct-ecc-alice \
158 service-scalarproduct-ecc-bob service-set service-statistics \
159 service-transport
; do \
160 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/gnunet
/libexec
/gnunet-
$$$$lex $(1)/usr
/lib
/gnunet
/libexec
; \
163 ( for conf in arm ats cadet core datacache dht hostlist identity \
164 nat nse peerinfo peerstore regex revocation scalarproduct \
165 set statistics topology transport util
; do \
166 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/gnunet
/config.d
/$$$$conf.conf
$(1)/usr
/share
/gnunet
/config.d
; \
169 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/gnunet
/hellos
/* $(1)/usr
/share
/gnunet
/hellos
170 $(INSTALL_DIR
) $(1)/etc
/init.d
171 $(INSTALL_BIN
) .
/files
/gnunet.init
$(1)/etc
/init.d
/gnunet
172 $(INSTALL_DIR
) $(1)/lib
/upgrade
/keep.d
173 $(INSTALL_DATA
) .
/files
/gnunet.upgrade
$(1)/lib
/upgrade
/keep.d
/gnunet
174 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
175 $(INSTALL_BIN
) .
/files
/gnunet.defaults
$(1)/etc
/uci-defaults
/gnunet
178 define Build
/InstallDev
179 $(INSTALL_DIR
) $(1)/usr
/include/gnunet
$(1)/usr
/lib
/pkgconfig
180 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/*.
{la
,so
}* $(1)/usr
/lib
/
181 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/*.
pc $(1)/usr
/lib
/pkgconfig
182 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/gnunet
/*.h
$(1)/usr
/include/gnunet
185 DEPENDS_conversation
:=+gnunet-gns
+libgst1app
+libgst1audio
+libgstreamer1
+glib2
+pulseaudio-daemon
+libopus
+libogg
186 BIN_conversation
:=conversation conversation-test
187 LIB_conversation
:=conversation microphone speaker
188 PLUGIN_conversation
:=gnsrecord_conversation
189 LIBEXEC_conversation
:=helper-audio-playback helper-audio-record service-conversation
190 CONF_conversation
:=conversation
192 DEPENDS_transport-http_client
:=+libgnurl
193 PLUGIN_transport-http_client
:=transport_http_client transport_https_client
195 DEPENDS_transport-http_server
:=+libmicrohttpd
196 PLUGIN_transport-http_server
:=transport_http_server transport_https_server
198 PLUGIN_transport-wlan
:=transport_wlan
199 LIBEXEC_transport-wlan
:=helper-transport-wlan
201 DEPENDS_experiments
:=+libglpk
+gnunet-sqlite
202 BIN_experiments
:=multicast rps
203 LIB_experiments
:=consensus dv env multicast psyc psycstore psycutil rps secretsharing social
204 PLUGIN_experiments
:=ats_mlp ats_ril namecache_flat namestore_flat psycstore_sqlite transport_dv
205 LIBEXEC_experiments
:=service-consensus service-dv service-evil-consensus service-multicast service-psyc service-psycstore service-rps service-secretsharing service-social
206 CONF_experiments
:=consensus dv multicast psyc psycstore rps secretsharing social
208 DEPENDS_fs
:=+gnunet-datastore
+libextractor
209 BIN_fs
:=auto-share directory download download-manager.scm fs publish unindex search
212 LIBEXEC_fs
:=helper-fs-publish service-fs
215 DEPENDS_gns
:=+gnunet-vpn
216 USERID_gns
:=gnunetdns
=401:gnunetdns
=401
217 BIN_gns
:=gns gns-import.sh namecache namestore resolver
218 LIB_gns
:=gns gnsrecord namecache namestore
219 PLUGIN_gns
:=block_dns block_gns gnsrecord_dns gnsrecord_gns
220 LIBEXEC_gns
:=dns2gns gns-proxy helper-dns namestore-fcfsd service-dns service-gns service-namecache service-namestore service-resolver
221 CONF_gns
:=dns gns namecache namestore resolver
223 DEPENDS_datastore
:=+gnunet-gns
+libsqlite3
224 BIN_datastore
:=datastore
225 LIB_datastore
:=datastore
226 PLUGIN_datastore
:=datastore_heap
227 LIBEXEC_datastore
:=daemon-latency-logger service-datastore
228 CONF_datastore
:=datastore
230 DEPENDS_mysql
:=+gnunet-gns
+gnunet-datastore
+libmysqlclient
232 PLUGIN_mysql
:=datastore_mysql
234 DEPENDS_pgsql
:=+gnunet-gns
+gnunet-datastore
+libpq
236 PLUGIN_pgsql
:=datacache_postgres datastore_postgres namecache_postgres namestore_postgres
238 DEPENDS_sqlite
:=+gnunet-gns
+gnunet-datastore
+libsqlite3
239 PLUGIN_sqlite
:=datacache_sqlite datastore_sqlite namecache_sqlite namestore_sqlite peerstore_sqlite
241 DEPENDS_transport-bluetooth
:=+bluez-libs
242 PLUGIN_transport-bluetooth
:=transport_bluetooth
243 LIBEXEC_transport-bluetooth
:=helper-transport-bluetooth
245 DEPENDS_utils
:=+certtool
+openssl-util
246 BIN_utils
:=gns-proxy-setup-ca transport-certificate-creation scrypt
248 DEPENDS_vpn
:=+kmod-tun
+iptables
251 LIBEXEC_vpn
:=daemon-exit daemon-pt helper-exit helper-vpn service-vpn
252 CONF_vpn
:=exit pt vpn
254 $(eval
$(call BuildPackage
,gnunet
))
255 $(eval
$(call BuildComponent
,conversation
,conversation component
,))
256 $(eval
$(call BuildComponent
,experiments
,experimental components
,))
257 $(eval
$(call BuildComponent
,fs
,file-sharing components
,))
258 $(eval
$(call BuildComponent
,gns
,name resolution components
,y
))
259 $(eval
$(call BuildComponent
,datastore
,storage components
,))
260 $(eval
$(call BuildComponent
,transport-bluetooth
,bluetooth transport
,))
261 $(eval
$(call BuildComponent
,transport-http_client
,HTTP
/HTTPS client transport
,y
))
262 $(eval
$(call BuildComponent
,transport-http_server
,HTTP
/HTTPS server transport
,))
263 $(eval
$(call BuildComponent
,transport-wlan
,WLAN transport
,))
264 $(eval
$(call BuildComponent
,utils
,administration utililties
,))
265 $(eval
$(call BuildComponent
,vpn
,vpn components
,y
))
266 $(eval
$(call BuildComponent
,mysql
,mySQL datastore backend
,))
267 $(eval
$(call BuildComponent
,pgsql
,PostgreSQL backends
,))
268 $(eval
$(call BuildComponent
,sqlite
,libsqlite3 backends
,y
))