1 include $(TOPDIR
)/rules.mk
4 PKG_SOURCE_VERSION
:=556ccd6d483b3678867c3829e6979c307df04450
5 PKG_MIRROR_HASH
:=5ecf15575eccc30135b2dc9871d88de0b32b593dc79cf5b0632a4fe2ffd711df
7 PKG_VERSION
:=0.10.2-git-20170626-
$(PKG_SOURCE_VERSION
)
10 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
11 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
12 PKG_SOURCE_URL
:=https
://gnunet.org
/git
/gnunet.git
16 PKG_LICENSE_FILES
:=COPYING
17 PKG_MAINTAINER
:=Daniel Golle
<daniel@makrotopia.org
>
20 PKG_FIXUP
:=gettext-version
23 include $(INCLUDE_DIR
)/package.mk
24 include $(INCLUDE_DIR
)/nls.mk
27 --with-libiconv-prefix
="$(ICONV_PREFIX)" \
28 --with-libintl-prefix
="$(INTL_PREFIX)" \
30 $(if
$(CONFIG_PACKAGE_
$(PKG_NAME
)-mysql
),--with-mysql
="$(STAGING_DIR)/usr",--without-mysql
) \
31 $(if
$(CONFIG_PACKAGE_
$(PKG_NAME
)-pgsql
),--with-postgresql
="$(STAGING_DIR)/usr/bin/pg_config",--without-postgresql
) \
32 $(if
$(CONFIG_PACKAGE_libsqlite3
),--with-sqlite
="$(STAGING_DIR)/usr",--without-sqlite
) \
35 --enable-experimental \
36 --with-extractor
=$(STAGING_DIR
)/usr \
37 --with-gnutls
=$(STAGING_DIR
)/usr \
38 --with-libgnurl
=$(STAGING_DIR
)/usr \
39 --with-libunistring-prefix
=$(STAGING_DIR
)/usr \
40 --with-microhttpd
=$(STAGING_DIR
)/usr
42 # ToDo: request upstream to provide --with-pulseaudio=...
43 TARGET_LDFLAGS
+= -Wl
,-rpath-link
=$(STAGING_DIR
)/usr
/lib
/pulseaudio
45 define Package
/gnunet
/Default
49 URL
:=https
://www.gnunet.org
/
53 $(call Package
/gnunet
/Default
)
54 TITLE
+= - a peer-to-peer framework focusing on security
55 DEPENDS
:=+libgcrypt
+libgpg-error
+libidn
+libltdl
+libunistring
+librt
+zlib \
56 $(ICONV_DEPENDS
) $(INTL_DEPENDS
)
57 USERID
:=gnunet
=958:gnunet
=958
61 define Package
/gnunet
/description
62 GNUnet is a peer-to-peer framework focusing on security. The first and
63 primary application for GNUnet is anonymous file-sharing. GNUnet is
64 currently developed by a worldwide group of independent free software
65 developers. GNUnet is a GNU package
(http
://www.gnu.org
/).
67 This is an ALPHA release. There are known and significant bugs
as
68 well
as many missing features in this release.
70 This package provides the core components of GNUnet including the
71 CADET routing engine
, a DHT implementation and basic transports
as
72 well
as their helpers.
76 PKG_CONFIG_DEPENDS
+=CONFIG_PACKAGE_
$(PKG_NAME
)-$(1)
78 define Package
/gnunet-
$(1)
79 $$(call Package
/gnunet
/Default
)
81 DEPENDS
:=gnunet
$(DEPENDS_
$(1))
82 $(if
$(3),DEFAULT
:=y if PACKAGE_gnunet
)
83 $(if
$(USERID_
$(1)),USERID
:=$(USERID_
$(1)))
84 $(if
$(CONFLICTS_
$(1)),CONFLICTS
:=$(CONFLICTS_
$(1)))
87 define Package
/gnunet-
$(1)/install
88 ( if
[ "$(BIN_$(1))" ]; then \
89 $(INSTALL_DIR
) $$(1)/usr
/bin
; \
90 for bin in
$(BIN_
$(1)); do \
91 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/gnunet-
$$$$$$$$bin $$(1)/usr
/bin
/ ; \
95 ( if
[ "$(LIB_$(1))" ]; then \
96 $(INSTALL_DIR
) $$(1)/usr
/lib
; \
97 for lib in
$(LIB_
$(1)); do \
98 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnunet
$$$$$$$$lib.so
* $$(1)/usr
/lib
/ ; \
102 ( if
[ "$(PLUGIN_$(1))" ]; then \
103 $(INSTALL_DIR
) $$(1)/usr
/lib
/gnunet
; \
104 for plug in
$(PLUGIN_
$(1)); do \
105 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/gnunet
/libgnunet_plugin_
$$$$$$$$plug*.so
$$(1)/usr
/lib
/gnunet
; \
109 ( if
[ "$(LIBEXEC_$(1))" ]; then \
110 $(INSTALL_DIR
) $$(1)/usr
/lib
/gnunet
/libexec
; \
111 for
lex in
$(LIBEXEC_
$(1)); do \
112 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/gnunet
/libexec
/gnunet-
$$$$$$$$lex $$(1)/usr
/lib
/gnunet
/libexec
; \
116 ( if
[ "$(CONF_$(1))" ]; then \
117 $(INSTALL_DIR
) $$(1)/usr
/share
/gnunet
/config.d
; \
118 for conf in
$(CONF_
$(1)); do \
119 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/gnunet
/config.d
/$$$$$$$$conf.conf
$$(1)/usr
/share
/gnunet
/config.d
; \
123 ( if
[ -e .
/files
/gnunet-
$(1).defaults
]; then \
124 $(INSTALL_DIR
) $$(1)/etc
/uci-defaults
; \
125 $(INSTALL_BIN
) .
/files
/gnunet-
$(1).defaults
$$(1)/etc
/uci-defaults
/gnunet-
$(1) ; \
129 $$(eval
$$(call BuildPackage
,gnunet-
$(1)))
132 define Package
/gnunet
/install
133 $(INSTALL_DIR
) $(1)/usr
/bin
$(1)/usr
/lib
/gnunet
/libexec
134 $(INSTALL_DIR
) $(1)/usr
/share
/gnunet
/config.d
$(1)/usr
/share
/gnunet
/hellos
136 ( for bin in arm ats cadet core config ecc identity nat nat-auto nat-server nse \
137 peerinfo revocation scalarproduct statistics transport uri
; do \
138 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/gnunet-
$$$$bin $(1)/usr
/bin
/ ; \
141 ( for lib in arm ats block blockgroup cadet core datacache dht \
142 dns dnsparser fragmentation friends hello identity natauto natnew nse \
143 peerinfo regexblock regex revocation scalarproduct set \
144 statistics transport util
; do \
145 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnunet
$$$$lib.so
* $(1)/usr
/lib
/ ; \
148 ( for plug in ats_proportional block_dht block_regex block_revocation \
149 transport_tcp transport_udp transport_unix
; do \
150 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/gnunet
/libgnunet_plugin_
$$$$plug*.so
$(1)/usr
/lib
/gnunet
; \
153 ( for
lex in daemon-topology helper-nat-client \
154 helper-nat-server service-arm service-ats service-cadet \
155 service-core service-dht service-identity service-nat service-nat-auto \
156 service-nse service-peerinfo service-regex \
157 service-revocation service-scalarproduct-alice \
158 service-scalarproduct-bob service-scalarproduct-ecc-alice \
159 service-scalarproduct-ecc-bob service-set service-statistics \
160 service-transport
; do \
161 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/gnunet
/libexec
/gnunet-
$$$$lex $(1)/usr
/lib
/gnunet
/libexec
; \
164 ( for conf in arm ats cadet core datacache dht identity identity-provider \
165 nat nat-auto nse peerinfo regex revocation scalarproduct \
166 set statistics topology transport util
; do \
167 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/gnunet
/config.d
/$$$$conf.conf
$(1)/usr
/share
/gnunet
/config.d
; \
170 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/gnunet
/hellos
/* $(1)/usr
/share
/gnunet
/hellos
171 $(INSTALL_DIR
) $(1)/etc
/init.d
172 $(INSTALL_BIN
) .
/files
/gnunet.init
$(1)/etc
/init.d
/gnunet
173 $(INSTALL_DIR
) $(1)/lib
/upgrade
/keep.d
174 $(INSTALL_DATA
) .
/files
/gnunet.upgrade
$(1)/lib
/upgrade
/keep.d
/gnunet
175 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
176 $(INSTALL_BIN
) .
/files
/gnunet.defaults
$(1)/etc
/uci-defaults
/gnunet
177 $(INSTALL_DIR
) $(1)/lib
/netifd
/proto
178 $(INSTALL_BIN
) .
/files
/gnunet-proto.sh
$(1)/lib
/netifd
/proto
/gnunet.sh
181 define Build
/InstallDev
182 $(INSTALL_DIR
) $(1)/usr
/include/gnunet
$(1)/usr
/lib
/pkgconfig
183 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/*.
{la
,so
}* $(1)/usr
/lib
/
184 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/*.
pc $(1)/usr
/lib
/pkgconfig
185 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/gnunet
/*.h
$(1)/usr
/include/gnunet
188 DEPENDS_conversation
:=+gnunet-gns
+libgst1app
+libgst1audio
+libgstreamer1
+glib2
+pulseaudio-daemon
+libopus
+libogg
189 BIN_conversation
:=conversation conversation-test
190 LIB_conversation
:=conversation microphone speaker
191 PLUGIN_conversation
:=gnsrecord_conversation
192 LIBEXEC_conversation
:=helper-audio-playback helper-audio-record service-conversation
193 CONF_conversation
:=conversation
195 BIN_dht-cli
:=dht-get dht-put dht-monitor
196 PLUGIN_dht-cli
:=block_test
198 DEPENDS_hostlist
:=+libmicrohttpd
+libgnurl
+ca-certificates
199 LIBEXEC_hostlist
:=daemon-hostlist
200 CONF_hostlist
:=hostlist
202 DEPENDS_transport-http_client
:=+libgnurl
+ca-certificates
203 PLUGIN_transport-http_client
:=transport_http_client transport_https_client
205 DEPENDS_transport-http_server
:=+libmicrohttpd
206 PLUGIN_transport-http_server
:=transport_http_server transport_https_server
208 PLUGIN_transport-wlan
:=transport_wlan
209 LIBEXEC_transport-wlan
:=helper-transport-wlan
211 DEPENDS_experiments
:=+libglpk
212 PLUGIN_experiments
:=ats_mlp ats_ril
216 PLUGIN_dv
:=transport_dv
217 LIBEXEC_dv
:=service-dv
220 DEPENDS_fs
:=+gnunet-datastore
+gnunet-peerstore
+libextractor
221 BIN_fs
:=auto-share directory download fs publish unindex search
224 LIBEXEC_fs
:=helper-fs-publish service-fs
227 DEPENDS_gns
:=+gnunet-vpn
+iptables-mod-extra
228 USERID_gns
:=gnunet
=958:gnunetdns
=452
229 BIN_gns
:=gns gns-import.sh namecache namestore resolver
230 LIB_gns
:=gns gnsrecord namecache namestore
231 PLUGIN_gns
:=block_dns block_gns gnsrecord_dns gnsrecord_gns gnsrecord_identity
232 LIBEXEC_gns
:=dns2gns helper-dns service-dns service-gns service-namecache service-namestore service-resolver service-zonemaster
233 CONF_gns
:=dns gns namecache namestore resolver zonemaster
235 DEPENDS_namestore-fcfsd
:=+gnunet-gns
+libmicrohttpd
236 LIBEXEC_namestore-fcfsd
:=namestore-fcfsd
238 DEPENDS_gns-proxy
:=+gnunet-gns
+libgnurl
+libmicrohttpd
239 LIBEXEC_gns-proxy
:=gns-proxy
241 DEPENDS_datastore
:=+gnunet-gns
242 BIN_datastore
:=datastore
243 LIB_datastore
:=datastore
244 LIBEXEC_datastore
:=service-datastore
245 CONF_datastore
:=datastore
247 BIN_peerstore
:=peerstore
248 LIB_peerstore
:=peerstore
249 LIBEXEC_peerstore
:=service-peerstore
250 CONF_peerstore
:=peerstore
252 DEPENDS_rest
:=+gnunet-gns
+gnunet-social
+libmicrohttpd
+jansson
253 LIB_rest
:=rest json jsonapi jsonapiutils
254 PLUGIN_rest
:=rest_gns rest_identity rest_identity_provider rest_namestore
255 LIBEXEC_rest
:=rest-server
260 LIBEXEC_rps
:=service-rps
263 DEPENDS_social
:=+gnunet-gns
+libmicrohttpd
+jansson
264 BIN_social
:=identity-token multicast social
265 LIB_social
:=consensus identityprovider multicast psyc psycstore psycutil secretsharing social
266 LIBEXEC_social
:=service-consensus service-evil-consensus service-identity-provider service-multicast service-psyc service-psycstore service-secretsharing service-social
267 CONF_social
:=consensus multicast psyc psycstore secretsharing social
268 PLUGINS_social
:=block_consensus
270 PLUGIN_dhtcache-heap
:=datacache_heap
271 CONFLICTS_dhtcache-heap
:=gnunet-dhtcache-pgsql gnunet-dhtcache-sqlite
273 DEPENDS_gns-flat
:=+gnunet-gns
274 PLUGIN_gns-flat
:=namecache_flat namestore_flat
276 DEPENDS_peerstore-flat
:=+gnunet-peerstore
277 PLUGIN_peerstore-flat
:=peerstore_flat
279 DEPENDS_fs-heap
:=+gnunet-datastore
280 PLUGIN_fs-heap
:=datastore_heap
281 CONFLICTS_fs-heap
:=gnunet-fs-mysql gnunet-fs-pgsql gnunet-fs-sqlite
283 DEPENDS_mysql
:=+libmysqlclient
286 DEPENDS_social-mysql
:=+gnunet-mysql
+gnunet-social
287 PLUGIN_social-mysql
:=psycstore_mysql
288 CONFLICTS_social-mysql
:=gnunet-social-sqlite
290 DEPENDS_fs-mysql
:=+gnunet-mysql
+gnunet-datastore
291 PLUGIN_fs-mysql
:=datastore_mysql
292 CONFLICTS_fs-mysql
:=gnunet-fs-pgsql gnunet-fs-sqlite
294 DEPENDS_pgsql
:=+libpq
297 DEPENDS_dhtcache-pgsql
:=+gnunet-pgsql
298 PLUGIN_dhtcache-pgsql
:=datacache_postgres
299 CONFLICTS_dhtcache-pgsql
:=gnunet-dhtcache-sqlite
301 DEPENDS_fs-pgsql
:=+gnunet-pgsql
+gnunet-datastore
302 PLUGIN_fs-pgsql
:=datastore_postgres
303 CONFLICTS_fs-pgsql
:=gnunet-fs-sqlite
305 DEPENDS_gns-pgsql
:=+gnunet-pgsql
+gnunet-gns
306 PLUGIN_gns-pgsql
:=namecache_postgres namestore_postgres
307 CONFLICTS_gns-pgsql
:=gnunet-gns-sqlite gnunet-gns-flat
309 DEPENDS_social-pgsql
:=+gnunet-pgsql
+gnunet-social
310 PLUGIN_social-pgsql
:=psycstore_postgres
311 CONFLICTS_social-pgsql
:=gnunet-social-sqlite gnunet-social-mysql
313 DEPENDS_sqlite
:=+libsqlite3
316 DEPENDS_gns-sqlite
:=+gnunet-gns
+gnunet-sqlite
317 PLUGIN_gns-sqlite
:=namecache_sqlite namestore_sqlite
318 CONFLICTS_gns-sqlite
:=gnunet-gns-flat
320 DEPENDS_peerstore-sqlite
:=+gnunet-peerstore
+gnunet-sqlite
321 PLUGIN_peerstore-sqlite
:=peerstore_sqlite
322 CONFLICTS_peerstore-sqlite
:=gnunet-peerstore-flat
324 DEPENDS_dhtcache-sqlite
:=+gnunet-sqlite
325 PLUGIN_dhtcache-sqlite
:=datacache_sqlite
327 DEPENDS_fs-sqlite
:=+gnunet-datastore
+gnunet-sqlite
328 PLUGIN_fs-sqlite
:=datastore_sqlite
330 DEPENDS_social-sqlite
:=+gnunet-social
+gnunet-sqlite
331 PLUGIN_social-sqlite
:=psycstore_sqlite
333 DEPENDS_transport-bluetooth
:=+bluez-libs
334 PLUGIN_transport-bluetooth
:=transport_bluetooth
335 LIBEXEC_transport-bluetooth
:=helper-transport-bluetooth
337 DEPENDS_utils
:=+certtool
+openssl-util
338 BIN_utils
:=gns-proxy-setup-ca transport-certificate-creation
340 DEPENDS_vpn
:=+kmod-tun
+iptables
+firewall
342 LIB_vpn
:=dnsstub tun vpn
343 LIBEXEC_vpn
:=daemon-exit daemon-pt helper-exit helper-vpn service-vpn
344 CONF_vpn
:=exit pt vpn
347 define Package
/gnunet-gns
/prerm
351 del network.gnunetdns
356 del firewall.gnunetdns
358 del firewall.gndnsrl2
363 define Package
/gnunet-vpn
/prerm
367 del network.gnunetvpn
368 del network.gnunetexit
370 del firewall.gnunetvpn
371 del firewall.gnunetexit
372 del firewall.gnexitfwd
377 define PostInstFixSUIDPerms
378 define Package
/$(1)/postinst
380 [ -z
"$IPKG_INSTROOT" ] || exit
0
381 [ -e
/usr
/share
/gnunet
/.permfix
] && rm /usr
/share
/gnunet
/.permfix || exit
0
385 $(eval
$(call PostInstFixSUIDPerms
,gnunet
))
386 $(eval
$(call PostInstFixSUIDPerms
,gnunet-gns
))
387 $(eval
$(call PostInstFixSUIDPerms
,gnunet-transport-bluetooth
))
388 $(eval
$(call PostInstFixSUIDPerms
,gnunet-transport-wlan
))
389 $(eval
$(call PostInstFixSUIDPerms
,gnunet-vpn
))
391 $(eval
$(call BuildPackage
,gnunet
))
392 $(eval
$(call BuildComponent
,conversation
,conversation component
,))
393 $(eval
$(call BuildComponent
,datastore
,data storage components
,))
394 $(eval
$(call BuildComponent
,dht-cli
,DHT command line clients
,))
395 # $(eval $(call BuildComponent,dv,distance-vector routing component,y))
396 $(eval
$(call BuildComponent
,experiments
,experimental components
,))
397 $(eval
$(call BuildComponent
,fs
,file-sharing components
,))
398 $(eval
$(call BuildComponent
,gns
,name resolution components
,y
))
399 $(eval
$(call BuildComponent
,gns-proxy
,gns-proxy component
,))
400 $(eval
$(call BuildComponent
,hostlist
,HTTP bootstrap hostlist client and server
,y
))
401 $(eval
$(call BuildComponent
,peerstore
,peerstore local persistency component
,))
402 $(eval
$(call BuildComponent
,rest
,REST interface
,))
403 $(eval
$(call BuildComponent
,rps
,RPS routing component
,y
))
404 $(eval
$(call BuildComponent
,social
,social components
,))
405 $(eval
$(call BuildComponent
,namestore-fcfsd
,first-come-first-serve registration server
,))
406 $(eval
$(call BuildComponent
,dhtcache-heap
,heap-based dhtcache plugin
,y
))
407 $(eval
$(call BuildComponent
,fs-heap
,heap-based filesharing plugin
,))
408 $(eval
$(call BuildComponent
,gns-flat
,flat storage GNS plugins
,y
))
409 $(eval
$(call BuildComponent
,peerstore-flat
,flat storage peerstore plugin
,))
410 $(eval
$(call BuildComponent
,mysql
,mySQL backend
,))
411 $(eval
$(call BuildComponent
,fs-mysql
,mySQL filesharing plugins
,))
412 $(eval
$(call BuildComponent
,social-mysql
,mySQL social plugins
,))
413 $(eval
$(call BuildComponent
,pgsql
,PostgreSQL backend
,))
414 $(eval
$(call BuildComponent
,dhtcache-pgsql
,PostgreSQL dhtcache plugin
,))
415 $(eval
$(call BuildComponent
,fs-pgsql
,PostgreSQL filesharing plugin
,))
416 $(eval
$(call BuildComponent
,gns-pgsql
,PostgreSQL GNS plugins
,))
417 $(eval
$(call BuildComponent
,social-pgsql
,PostgreSQL social plugin
,))
418 $(eval
$(call BuildComponent
,sqlite
,libsqlite3 backend
,))
419 $(eval
$(call BuildComponent
,dhtcache-sqlite
,libsqlite3 dhtcache plugin
,))
420 $(eval
$(call BuildComponent
,fs-sqlite
,libsqlite3 filesharing plugin
,))
421 $(eval
$(call BuildComponent
,gns-sqlite
,libsqlite3 gns plugins
,))
422 $(eval
$(call BuildComponent
,peerstore-sqlite
,libsqlite3 peerstore plugin
,))
423 $(eval
$(call BuildComponent
,social-sqlite
,libsqlite3 social plugins
,))
424 $(eval
$(call BuildComponent
,transport-bluetooth
,bluetooth transport
,))
425 $(eval
$(call BuildComponent
,transport-http_client
,HTTP
/HTTPS client transport
,y
))
426 $(eval
$(call BuildComponent
,transport-http_server
,HTTP
/HTTPS server transport
,))
427 $(eval
$(call BuildComponent
,transport-wlan
,WLAN transport
,y
))
428 $(eval
$(call BuildComponent
,utils
,administration utililties
,))
429 $(eval
$(call BuildComponent
,vpn
,vpn components
,y
))