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
:=35933
12 PKG_VERSION
:=0.10.1-svn
$(PKG_SOURCE_VERSION
)
16 # - break-out transports
17 # -> get rid of microhttpd and gnurl dependency for gns and vpn
18 # requires upstream to split config files
19 # - break-out {peer,name,data}store
20 # - building and package mysql or postgresql storage backends
21 # - package testing stuff
23 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
24 PKG_SOURCE_SUBDIR
:=$(PKG_NAME
)-$(PKG_VERSION
)
25 PKG_SOURCE_URL
:=https
://gnunet.org
/svn
/gnunet
/
29 PKG_LICENSE_FILES
:=COPYING
30 PKG_MAINTAINER
:=Daniel Golle
<daniel@makrotopia.org
>
36 include $(INCLUDE_DIR
)/package.mk
40 --with-extractor
=$(STAGING_DIR
)/usr \
41 --with-gnutls
=$(STAGING_DIR
)/usr \
42 --with-libgnurl
=$(STAGING_DIR
)/usr \
43 --with-libunistring-prefix
=$(STAGING_DIR
)/usr \
45 --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
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 most transports
as well
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 core config ecc identity 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_http_client transport_http_server \
149 transport_https_client transport_https_server \
150 transport_tcp transport_udp transport_unix transport_wlan
; do \
151 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/usr
/lib
/gnunet
/libgnunet_plugin_
$$$$plug*.so
$(1)/usr
/lib
/gnunet
; \
154 ( for
lex in daemon-hostlist daemon-topology helper-nat-client \
155 helper-nat-server service-arm service-ats service-cadet \
156 service-core service-dht service-identity service-nse \
157 service-peerinfo service-peerstore service-regex \
158 service-revocation service-scalarproduct-alice \
159 service-scalarproduct-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 hostlist identity \
165 nat nse peerinfo peerstore 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
175 define Build
/InstallDev
176 $(INSTALL_DIR
) $(1)/usr
/include/gnunet
$(1)/usr
/lib
/pkgconfig
177 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/*.
{la
,so
}* $(1)/usr
/lib
/
178 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/*.
pc $(1)/usr
/lib
/pkgconfig
179 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/gnunet
/*.h
$(1)/usr
/include/gnunet
182 DEPENDS_conversation
:=+gnunet-gns
+libgst1app
+libgst1audio
+libgstreamer1
+glib2
+pulseaudio-daemon
+libopus
+libogg
183 BIN_conversation
:=conversation conversation-test
184 LIB_conversation
:=conversation microphone speaker
185 PLUGIN_conversation
:=gnsrecord_conversation
186 LIBEXEC_conversation
:=helper-audio-playback helper-audio-record
187 CONF_conversation
:=conversation
189 DEPENDS_experiments
:=+libglpk
190 PLUGIN_experiments
:=ats_mlp ats_ril
192 DEPENDS_fs
:=+gnunet-storage
+libextractor
193 BIN_fs
:=auto-share directory download download-manager.scm fs publish unindex search
196 LIB_EXEC_fs
:=helper-fs-publish service-fs
199 DEPENDS_gns
:=+gnunet-vpn
200 USERID_gns
:=gnunetdns
=401:gnunetdns
=401
201 BIN_gns
:=gns gns-import.sh namecache namestore resolver
202 LIB_gns
:=gns gnsrecord namecache namestore
203 PLUGIN_gns
:=block_dns block_gns gnsrecord_dns gnsrecord_gns
204 LIBEXEC_gns
:=dns2gns gns-proxy helper-dns namestore-fcfsd service-dns service-gns service-namecache service-namestore service-resolver
205 CONF_gns
:=dns gns namecache namestore resolver
207 DEPENDS_storage
:=+gnunet-gns
+libsqlite3
208 BIN_storage
:=datastore
209 LIB_storage
:=datastore
210 PLUGIN_storage
:=datacache_sqlite datastore_heap datastore_sqlite namecache_sqlite namestore_sqlite peerstore_sqlite
211 LIBEXEC_storage
:=daemon-latency-logger service-datastore
212 CONF_storage
:=datastore
214 DEPENDS_transport-bluetooth
:=+bluez-libs
215 PLUGIN_transport-bluetooth
:=transport_bluetooth
216 LIBEXEC_transport-bluetooth
:=helper-transport-bluetooth
218 DEPENDS_utils
:=+certtool
+openssl-util
219 BIN_utils
:=config gns-import.sh gns-proxy-setup-ca transport-certificate-creation
221 DEPENDS_vpn
:=+kmod-tun
223 LIBEXEC_vpn
:=daemon-exit daemon-pt helper-exit helper-vpn service-vpn
224 CONF_vpn
:=exit pt vpn
226 $(eval
$(call BuildPackage
,gnunet
))
227 $(eval
$(call BuildComponent
,conversation
,conversation component
,))
228 $(eval
$(call BuildComponent
,experiments
,experimental components
,))
229 $(eval
$(call BuildComponent
,fs
,file-sharing components
,))
230 $(eval
$(call BuildComponent
,gns
,name resolution components
,y
))
231 $(eval
$(call BuildComponent
,storage
,storage components
,))
232 $(eval
$(call BuildComponent
,transport-bluetooth
,bluetooth transport
,))
233 $(eval
$(call BuildComponent
,utils
,administration utililties
,))
234 $(eval
$(call BuildComponent
,vpn
,vpn components
,y
))