1 include $(TOPDIR
)/rules.mk
7 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
8 PKG_SOURCE_URL
:=@GNU
/gnunet
9 PKG_HASH
:=318e06c4134d1a8ce3b4385d82b11316eaaeb9a4dbc5d4b646453dfc53199296
12 PKG_LICENSE_FILES
:=COPYING
13 PKG_MAINTAINER
:=Daniel Golle
<daniel@makrotopia.org
>
14 PKG_CPE_ID
:=cpe
:/a
:gnunet
:gnunet
17 PKG_FIXUP
:=gettext-version
20 include $(INCLUDE_DIR
)/package.mk
21 include $(INCLUDE_DIR
)/nls.mk
24 --with-libiconv-prefix
="$(ICONV_PREFIX)" \
25 --with-libintl-prefix
="$(INTL_PREFIX)" \
27 $(if
$(CONFIG_PACKAGE_
$(PKG_NAME
)-mysql
),--with-mysql
="$(STAGING_DIR)/usr",--without-mysql
) \
28 $(if
$(CONFIG_PACKAGE_
$(PKG_NAME
)-pgsql
),--with-postgresql
="$(STAGING_DIR)/usr/bin/pg_config",--without-postgresql
) \
29 $(if
$(CONFIG_PACKAGE_libsqlite3
),--with-sqlite
="$(STAGING_DIR)/usr",--without-sqlite
) \
32 --disable-documentation \
33 --enable-experimental \
34 --with-extractor
=$(STAGING_DIR
)/usr \
35 --with-gnutls
=$(STAGING_DIR
)/usr \
36 $(if
$(CONFIG_PACKAGE_
$(PKG_NAME
)-transport-bluetooth
),--with-libbluetooth
="$(STAGING_DIR)/usr",--without-libbluetooth
) \
37 --with-libgnurl
=$(STAGING_DIR
)/usr \
38 --with-libogg
=$(STAGING_DIR
)/usr \
39 --with-libopus
=$(STAGING_DIR
)/usr \
40 --with-libpulse
=$(STAGING_DIR
)/usr \
41 --with-libunistring-prefix
=$(STAGING_DIR
)/usr \
42 --with-microhttpd
=$(STAGING_DIR
)/usr
44 # upstream now provides --with-pulseaudio but doesn't detect rpath
45 TARGET_LDFLAGS
+= -Wl
,-rpath-link
=$(STAGING_DIR
)/usr
/lib
/pulseaudio
47 define Package
/gnunet
/Default
51 URL
:=https
://www.gnunet.org
/
55 $(call Package
/gnunet
/Default
)
56 TITLE
+= - a peer-to-peer framework focusing on security
57 DEPENDS
:=+libatomic
+libgcrypt
+libgpg-error
+libidn2
+libltdl
+libsodium \
58 +libunistring
+librt
+zlib
$(ICONV_DEPENDS
) $(INTL_DEPENDS
)
59 USERID
:=gnunet
=958:gnunet
=958
61 FILE_MODES
:=/usr
/lib
/gnunet
/libexec
/gnunet-helper-nat-server
:root
:gnunet
:4750 \
62 /usr
/lib
/gnunet
/libexec
/gnunet-helper-nat-client
:root
:gnunet
:4750
65 define Package
/gnunet
/description
66 GNUnet is a peer-to-peer framework focusing on security. The first and
67 primary application for GNUnet is anonymous file-sharing. GNUnet is
68 currently developed by a worldwide group of independent free software
69 developers. GNUnet is a GNU package
(http
://www.gnu.org
/).
71 This is an ALPHA release. There are known and significant bugs
as
72 well
as many missing features in this release.
74 This package provides the core components of GNUnet including the
75 CADET routing engine
, a DHT implementation and basic transports
as
76 well
as their helpers.
80 PKG_CONFIG_DEPENDS
+=CONFIG_PACKAGE_
$(PKG_NAME
)-$(1)
82 define Package
/gnunet-
$(1)
83 $$(call Package
/gnunet
/Default
)
85 DEPENDS
:=gnunet
$(DEPENDS_
$(1))
86 $(if
$(3),DEFAULT
:=y if PACKAGE_gnunet
)
87 $(if
$(USERID_
$(1)),USERID
:=$(USERID_
$(1)))
88 $(if
$(CONFLICTS_
$(1)),CONFLICTS
:=$(CONFLICTS_
$(1)))
89 $(if
$(FILE_MODES_
$(1)),FILE_MODES
:=$(FILE_MODES_
$(1)))
92 define Package
/gnunet-
$(1)/install
93 ( if
[ "$(BIN_$(1))" ]; then \
94 $(INSTALL_DIR
) $$(1)/usr
/bin
; \
95 for bin in
$(BIN_
$(1)); do \
96 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/gnunet-
$$$$$$$$bin $$(1)/usr
/bin
/ ; \
100 ( if
[ "$(LIB_$(1))" ]; then \
101 $(INSTALL_DIR
) $$(1)/usr
/lib
; \
102 for lib in
$(LIB_
$(1)); do \
103 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnunet
$$$$$$$$lib.so
* $$(1)/usr
/lib
/ ; \
107 ( if
[ "$(PLUGIN_$(1))" ]; then \
108 $(INSTALL_DIR
) $$(1)/usr
/lib
/gnunet
; \
109 for plug in
$(PLUGIN_
$(1)); do \
110 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/gnunet
/libgnunet_plugin_
$$$$$$$$plug*.so
$$(1)/usr
/lib
/gnunet
; \
114 ( if
[ "$(LIBEXEC_$(1))" ]; then \
115 $(INSTALL_DIR
) $$(1)/usr
/lib
/gnunet
/libexec
; \
116 for
lex in
$(LIBEXEC_
$(1)); do \
117 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/gnunet
/libexec
/gnunet-
$$$$$$$$lex $$(1)/usr
/lib
/gnunet
/libexec
; \
121 ( if
[ "$(CONF_$(1))" ]; then \
122 $(INSTALL_DIR
) $$(1)/usr
/share
/gnunet
/config.d
; \
123 for conf in
$(CONF_
$(1)); do \
124 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/gnunet
/config.d
/$$$$$$$$conf.conf
$$(1)/usr
/share
/gnunet
/config.d
; \
128 ( if
[ -e .
/files
/gnunet-
$(1).defaults
]; then \
129 $(INSTALL_DIR
) $$(1)/etc
/uci-defaults
; \
130 $(INSTALL_BIN
) .
/files
/gnunet-
$(1).defaults
$$(1)/etc
/uci-defaults
/gnunet-
$(1) ; \
134 $$(eval
$$(call BuildPackage
,gnunet-
$(1)))
137 define Package
/gnunet
/install
138 $(INSTALL_DIR
) $(1)/usr
/bin
$(1)/usr
/lib
/gnunet
/libexec
139 $(INSTALL_DIR
) $(1)/usr
/share
/gnunet
/config.d
$(1)/usr
/share
/gnunet
/hellos
141 ( for bin in arm ats cadet core config ecc identity nat nat-auto nat-server nse \
142 peerinfo peerstore revocation scalarproduct scrypt statistics transport uri
; do \
143 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/bin
/gnunet-
$$$$bin $(1)/usr
/bin
/ ; \
146 ( for lib in arm ats block blockgroup cadet \
147 core datacache dht dns fragmentation friends hello \
148 identity natauto natnew nse nt peerinfo peerstore regexblock regex revocation \
149 scalarproduct set seti setu statistics transport transportapplication \
150 transportcommunicator transportcore transportmonitor util
; do \
151 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libgnunet
$$$$lib.so
* $(1)/usr
/lib
/ ; \
154 ( for plug in ats_proportional block_dht block_regex block_revocation transport_unix
; do \
155 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/gnunet
/libgnunet_plugin_
$$$$plug*.so
$(1)/usr
/lib
/gnunet
; \
158 ( for
lex in daemon-topology helper-nat-client \
159 helper-nat-server service-arm service-ats service-ats-new service-cadet \
160 service-core service-dht service-identity service-nat service-nat-auto \
161 service-nse service-peerinfo service-peerstore service-regex \
162 service-revocation service-scalarproduct-alice \
163 service-scalarproduct-bob service-scalarproduct-ecc-alice \
164 service-scalarproduct-ecc-bob service-set service-seti service-setu service-statistics \
165 service-transport timeout
; do \
166 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/gnunet
/libexec
/gnunet-
$$$$lex $(1)/usr
/lib
/gnunet
/libexec
; \
169 ( for conf in arm ats cadet communicator-unix core datacache dht identity \
170 nat nat-auto nse peerinfo peerstore regex revocation \
171 scalarproduct set seti setu statistics topology transport util
; do \
172 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/gnunet
/config.d
/$$$$conf.conf
$(1)/usr
/share
/gnunet
/config.d
; \
175 $(INSTALL_DATA
) $(PKG_INSTALL_DIR
)/usr
/share
/gnunet
/hellos
/* $(1)/usr
/share
/gnunet
/hellos
176 $(INSTALL_DIR
) $(1)/etc
/init.d
177 $(INSTALL_BIN
) .
/files
/gnunet.init
$(1)/etc
/init.d
/gnunet
178 $(INSTALL_DIR
) $(1)/lib
/upgrade
/keep.d
179 $(INSTALL_DATA
) .
/files
/gnunet.upgrade
$(1)/lib
/upgrade
/keep.d
/gnunet
180 $(INSTALL_DIR
) $(1)/etc
/uci-defaults
181 $(INSTALL_BIN
) .
/files
/gnunet.defaults
$(1)/etc
/uci-defaults
/gnunet
182 $(INSTALL_DIR
) $(1)/lib
/netifd
/proto
183 $(INSTALL_BIN
) .
/files
/gnunet-proto.sh
$(1)/lib
/netifd
/proto
/gnunet.sh
186 define Build
/InstallDev
187 $(INSTALL_DIR
) $(1)/usr
/include/gnunet
$(1)/usr
/lib
/pkgconfig
188 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/*.
{la
,so
}* $(1)/usr
/lib
/
189 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/*.
pc $(1)/usr
/lib
/pkgconfig
190 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/gnunet
/*.h
$(1)/usr
/include/gnunet
195 PLUGIN_abd
:=gnsrecord_abd
196 LIBEXEC_abd
:=service-abd
198 DEPENDS_abd
:=+gnunet-gns
200 BIN_auction
:=auction-create auction-info auction-join
201 LIBEXEC_auction
:=service-auction
202 CONF_auction
:=auction
203 DEPENDS_auction
:=+gnunet-reclaim
+jansson
205 DEPENDS_conversation
:=+gnunet-gns
+libgst1app
+libgst1audio
+libgstreamer1
+glib2
+pulseaudio-daemon
+libopus
+libogg
206 BIN_conversation
:=conversation conversation-test
207 LIB_conversation
:=conversation microphone speaker
208 PLUGIN_conversation
:=gnsrecord_conversation
209 LIBEXEC_conversation
:=helper-audio-playback helper-audio-record service-conversation
210 CONF_conversation
:=conversation
212 BIN_dht-cli
:=dht-get dht-put dht-monitor
213 PLUGIN_dht-cli
:=block_test
215 DEPENDS_curl
:=+libgnurl
+jansson
218 DEPENDS_hostlist
:=+libmicrohttpd-ssl
+gnunet-curl
+ca-certificates
219 LIBEXEC_hostlist
:=daemon-hostlist
220 CONF_hostlist
:=hostlist
222 DEPENDS_transport-bluetooth
:=+bluez-libs
223 PLUGIN_transport-bluetooth
:=transport_bluetooth
224 LIBEXEC_transport-bluetooth
:=helper-transport-bluetooth
225 FILE_MODES_transport-bluetooth
:=/usr
/lib
/gnunet
/libexec
/gnunet-helper-transport-bluetooth
:root
:gnunet
:4750
227 DEPENDS_transport-http_client
:=+gnunet-curl
+ca-certificates
228 PLUGIN_transport-http_client
:=transport_http_client transport_https_client
230 DEPENDS_transport-http_server
:=+libmicrohttpd-ssl
231 PLUGIN_transport-http_server
:=transport_http_server transport_https_server
233 PLUGIN_transport-tcp
:=transport_tcp
235 PLUGIN_transport-udp
:=transport_udp
237 PLUGIN_transport-wlan
:=transport_wlan
238 LIBEXEC_transport-wlan
:=helper-transport-wlan
239 FILE_MODES_transport-wlan
:=/usr
/lib
/gnunet
/libexec
/gnunet-helper-transport-wlan
:root
:gnunet
:4750
243 PLUGIN_dv
:=transport_dv
244 LIBEXEC_dv
:=service-dv
247 DEPENDS_fs
:=+gnunet-datastore
+libextractor
248 BIN_fs
:=auto-share directory download fs publish unindex search
251 LIBEXEC_fs
:=helper-fs-publish service-fs
254 DEPENDS_gns
:=+gnunet-vpn
+iptables-mod-extra
255 USERID_gns
:=:gnunetdns
=452
256 BIN_gns
:=gns gns-import.sh namecache namestore resolver zoneimport
257 LIB_gns
:=gns gnsrecord namecache namestore
258 PLUGIN_gns
:=block_dns block_gns gnsrecord_conversation gnsrecord_dns gnsrecord_gns
259 LIBEXEC_gns
:=dns2gns helper-dns service-dns service-gns service-namecache service-namestore service-resolver service-zonemaster
260 CONF_gns
:=dns gns namecache namestore resolver zonemaster
261 FILE_MODES_gns
:=/usr
/lib
/gnunet
/libexec
/gnunet-helper-dns
:root
:gnunetdns
:4750 /usr
/lib
/gnunet
/libexec
/gnunet-service-dns
:gnunet
:gnunetdns
:2750
263 DEPENDS_namestore-fcfsd
:=+gnunet-gns
+libmicrohttpd-ssl
264 LIBEXEC_namestore-fcfsd
:=namestore-fcfsd
266 DEPENDS_gns-proxy
:=+gnunet-gns
+gnunet-curl
+libmicrohttpd-ssl
267 LIBEXEC_gns-proxy
:=gns-proxy
269 DEPENDS_datastore
:=+gnunet-gns
270 BIN_datastore
:=datastore
271 LIB_datastore
:=datastore
272 LIBEXEC_datastore
:=service-datastore
273 CONF_datastore
:=datastore
276 DEPENDS_reclaim
:=+gnunet-gns
+gnunet-sqlite
+libpbc
+libgabe
+jansson
278 LIB_reclaim
:=consensus abe reclaim reclaimattribute secretsharing
279 LIBEXEC_reclaim
:=service-consensus service-reclaim service-secretsharing
280 CONF_reclaim
:=consensus reclaim secretsharing
281 PLUGIN_reclaim
:=block_consensus gnsrecord_reclaim reclaim_credential_jwt reclaim_attribute_basic
283 DEPENDS_rest
:=+gnunet-gns
+gnunet-reclaim
+libmicrohttpd-ssl
+jansson
285 PLUGIN_rest
:=rest_config rest_copying rest_gns rest_identity rest_namestore rest_peerinfo rest_openid_connect rest_reclaim
286 LIBEXEC_rest
:=rest-server
291 LIBEXEC_rps
:=service-rps
294 PLUGIN_dhtcache-heap
:=datacache_heap
295 CONFLICTS_dhtcache-heap
:=gnunet-dhtcache-pgsql gnunet-dhtcache-sqlite
297 DEPENDS_gns-flat
:=+gnunet-gns
298 PLUGIN_gns-flat
:=namecache_flat namestore_flat
300 PLUGIN_peerstore-flat
:=peerstore_flat
302 DEPENDS_fs-heap
:=+gnunet-datastore
303 PLUGIN_fs-heap
:=datastore_heap
304 CONFLICTS_fs-heap
:=gnunet-fs-mysql gnunet-fs-pgsql gnunet-fs-sqlite
306 DEPENDS_mysql
:=+libmysqlclient
310 DEPENDS_fs-mysql
:=+gnunet-mysql
+gnunet-datastore
311 PLUGIN_fs-mysql
:=datastore_mysql
312 CONFLICTS_fs-mysql
:=gnunet-fs-pgsql gnunet-fs-sqlite
314 DEPENDS_pgsql
:=+libpq
317 DEPENDS_dhtcache-pgsql
:=+gnunet-pgsql
318 PLUGIN_dhtcache-pgsql
:=datacache_postgres
319 CONFLICTS_dhtcache-pgsql
:=gnunet-dhtcache-sqlite
321 DEPENDS_fs-pgsql
:=+gnunet-pgsql
+gnunet-datastore
322 PLUGIN_fs-pgsql
:=datastore_postgres
323 CONFLICTS_fs-pgsql
:=gnunet-fs-sqlite
325 DEPENDS_gns-pgsql
:=+gnunet-pgsql
+gnunet-gns
326 PLUGIN_gns-pgsql
:=namecache_postgres namestore_postgres
327 CONFLICTS_gns-pgsql
:=gnunet-gns-sqlite gnunet-gns-flat
330 DEPENDS_sqlite
:=+libsqlite3
333 DEPENDS_gns-sqlite
:=+gnunet-gns
+gnunet-sqlite
334 PLUGIN_gns-sqlite
:=namecache_sqlite namestore_sqlite
335 CONFLICTS_gns-sqlite
:=gnunet-gns-flat
337 DEPENDS_peerstore-sqlite
:=+gnunet-sqlite
338 PLUGIN_peerstore-sqlite
:=peerstore_sqlite
339 CONFLICTS_peerstore-sqlite
:=gnunet-peerstore-flat
341 DEPENDS_dhtcache-sqlite
:=+gnunet-sqlite
342 PLUGIN_dhtcache-sqlite
:=datacache_sqlite
344 DEPENDS_fs-sqlite
:=+gnunet-datastore
+gnunet-sqlite
345 PLUGIN_fs-sqlite
:=datastore_sqlite
347 DEPENDS_utils
:=+certtool
+openssl-util
348 BIN_utils
:=gns-proxy-setup-ca transport-certificate-creation
350 DEPENDS_vpn
:=+kmod-tun
+iptables
+firewall
352 FILE_MODES_vpn
:=/usr
/lib
/gnunet
/libexec
/gnunet-helper-exit
:root
:gnunet
:4750 /usr
/lib
/gnunet
/libexec
/gnunet-helper-vpn
:root
:gnunet
:4750
353 LIB_vpn
:=dnsstub tun vpn
354 LIBEXEC_vpn
:=daemon-exit daemon-pt helper-exit helper-vpn service-vpn
355 CONF_vpn
:=exit pt vpn
357 define Package
/gnunet-gns
/prerm
361 del network.gnunetdns
366 del firewall.gnunetdns
368 del firewall.gndnsrl2
373 define Package
/gnunet-vpn
/prerm
377 del network.gnunetvpn
378 del network.gnunetexit
380 del firewall.gnunetvpn
381 del firewall.gnunetexit
382 del firewall.gnexitfwd
387 define PostInstFixSUIDPerms
388 define Package
/$(1)/postinst
390 [ -z
"$IPKG_INSTROOT" ] || exit
0
391 [ -e
/usr
/share
/gnunet
/.permfix
] && rm /usr
/share
/gnunet
/.permfix || exit
0
395 $(eval
$(call PostInstFixSUIDPerms
,gnunet
))
396 $(eval
$(call PostInstFixSUIDPerms
,gnunet-gns
))
397 $(eval
$(call PostInstFixSUIDPerms
,gnunet-transport-bluetooth
))
398 $(eval
$(call PostInstFixSUIDPerms
,gnunet-transport-wlan
))
399 $(eval
$(call PostInstFixSUIDPerms
,gnunet-vpn
))
401 $(eval
$(call BuildPackage
,gnunet
))
402 $(eval
$(call BuildComponent
,abd
,credential service components
,))
403 $(eval
$(call BuildComponent
,auction
,auction components
,))
404 $(eval
$(call BuildComponent
,conversation
,conversation component
,))
405 $(eval
$(call BuildComponent
,curl
,cURL wrapper component
,))
406 $(eval
$(call BuildComponent
,datastore
,data storage components
,))
407 $(eval
$(call BuildComponent
,dht-cli
,DHT command line clients
,))
408 # $(eval $(call BuildComponent,dv,distance-vector routing component,y))
409 $(eval
$(call BuildComponent
,fs
,file-sharing components
,))
410 $(eval
$(call BuildComponent
,gns
,name resolution components
,y
))
411 $(eval
$(call BuildComponent
,gns-proxy
,gns-proxy component
,))
412 $(eval
$(call BuildComponent
,hostlist
,HTTP bootstrap hostlist client and server
,y
))
413 $(eval
$(call BuildComponent
,reclaim
,reclaim identity-provider subsystem
,))
414 $(eval
$(call BuildComponent
,rest
,REST interface
,))
415 $(eval
$(call BuildComponent
,rps
,RPS routing component
,y
))
416 $(eval
$(call BuildComponent
,namestore-fcfsd
,first-come-first-serve registration server
,))
417 $(eval
$(call BuildComponent
,dhtcache-heap
,heap-based dhtcache plugin
,y
))
418 $(eval
$(call BuildComponent
,fs-heap
,heap-based filesharing plugin
,))
419 $(eval
$(call BuildComponent
,gns-flat
,flat storage GNS plugins
,y
))
420 $(eval
$(call BuildComponent
,peerstore-flat
,flat storage peerstore plugin
,))
421 $(eval
$(call BuildComponent
,mysql
,mySQL backend
,))
422 $(eval
$(call BuildComponent
,fs-mysql
,mySQL filesharing plugins
,))
423 $(eval
$(call BuildComponent
,pgsql
,PostgreSQL backend
,))
424 $(eval
$(call BuildComponent
,dhtcache-pgsql
,PostgreSQL dhtcache plugin
,))
425 $(eval
$(call BuildComponent
,fs-pgsql
,PostgreSQL filesharing plugin
,))
426 $(eval
$(call BuildComponent
,gns-pgsql
,PostgreSQL GNS plugins
,))
427 $(eval
$(call BuildComponent
,sqlite
,libsqlite3 backend
,))
428 $(eval
$(call BuildComponent
,dhtcache-sqlite
,libsqlite3 dhtcache plugin
,))
429 $(eval
$(call BuildComponent
,fs-sqlite
,libsqlite3 filesharing plugin
,))
430 $(eval
$(call BuildComponent
,gns-sqlite
,libsqlite3 gns plugins
,))
431 $(eval
$(call BuildComponent
,peerstore-sqlite
,libsqlite3 peerstore plugin
,))
432 $(eval
$(call BuildComponent
,transport-bluetooth
,bluetooth transport
,))
433 $(eval
$(call BuildComponent
,transport-http_client
,HTTP
/HTTPS client transport
,y
))
434 $(eval
$(call BuildComponent
,transport-http_server
,HTTP
/HTTPS server transport
,))
435 $(eval
$(call BuildComponent
,transport-tcp
,TCP transport
,y
))
436 $(eval
$(call BuildComponent
,transport-udp
,UDP transport
,y
))
437 $(eval
$(call BuildComponent
,transport-wlan
,WLAN transport
,y
))
438 $(eval
$(call BuildComponent
,utils
,administration utililties
,))
439 $(eval
$(call BuildComponent
,vpn
,vpn components
,y
))