Няма описание

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=gnunet
  9. PKG_SOURCE_VERSION:=35856
  10. PKG_VERSION:=0.10.1-svn$(PKG_SOURCE_VERSION)
  11. PKG_RELEASE:=3
  12. # ToDo:
  13. # - break-out transports
  14. # -> get rid of microhttpd and gnurl dependency for gns and vpn
  15. # requires upstream to split config files
  16. # - break-out {peer,name,data}store
  17. # - building and package mysql or postgresql storage backends
  18. # - 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/
  22. PKG_SOURCE_PROTO:=svn
  23. PKG_LICENSE:=GPL-3.0
  24. PKG_LICENSE_FILES:=COPYING
  25. PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
  26. PKG_BUILD_PARALLEL:=1
  27. PKG_FIXUP:=autoreconf
  28. PKG_INSTALL:=1
  29. include $(INCLUDE_DIR)/package.mk
  30. CONFIGURE_ARGS+= \
  31. --disable-rpath \
  32. --with-extractor=$(STAGING_DIR)/usr \
  33. --with-gnutls=$(STAGING_DIR)/usr \
  34. --with-libgnurl=$(STAGING_DIR)/usr \
  35. --with-libunistring-prefix=$(STAGING_DIR)/usr \
  36. --with-ltdl \
  37. --with-microhttpd=$(STAGING_DIR)/usr \
  38. --without-mysql \
  39. --without-postgresql
  40. # ToDo: request upstream to provide --with-pulseaudio=...
  41. TARGET_LDFLAGS+= -Wl,-rpath-link=$(STAGING_DIR)/usr/lib/pulseaudio
  42. define Package/gnunet/Default
  43. SECTION:=net
  44. CATEGORY:=Network
  45. TITLE:=GNUnet
  46. URL:=https://www.gnunet.org/
  47. endef
  48. define Package/gnunet
  49. $(call Package/gnunet/Default)
  50. TITLE+= - a peer-to-peer framework focusing on security
  51. DEPENDS:=+ca-certificates +libgnurl +libgnutls +libidn +libltdl \
  52. +libmicrohttpd +libunistring +librt
  53. USERID:=gnunet=400:gnunet=400
  54. MENU:=1
  55. endef
  56. define Package/gnunet/description
  57. GNUnet is a peer-to-peer framework focusing on security. The first and
  58. primary application for GNUnet is anonymous file-sharing. GNUnet is
  59. currently developed by a worldwide group of independent free software
  60. developers. GNUnet is a GNU package (http://www.gnu.org/).
  61. This is an ALPHA release. There are known and significant bugs as
  62. well as many missing features in this release.
  63. This package provides the core components of GNUnet including the
  64. CADET routing engine, a DHT implementation and most transports as well
  65. as their helpers.
  66. endef
  67. define BuildComponent
  68. define Package/gnunet-$(1)
  69. $$(call Package/gnunet/Default)
  70. TITLE+= $(2)
  71. DEPENDS:=gnunet $(DEPENDS_$(1))
  72. DEFAULT:=$(3)
  73. endef
  74. define Package/gnunet-$(1)/install
  75. ( if [ "$(BIN_$(1))" ]; then \
  76. $(INSTALL_DIR) $$(1)/usr/bin ; \
  77. for bin in $(BIN_$(1)); do \
  78. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-$$$$$$$$bin $$(1)/usr/bin/ ; \
  79. done \
  80. fi )
  81. ( if [ "$(LIB_$(1))" ]; then \
  82. $(INSTALL_DIR) $$(1)/usr/lib ; \
  83. for lib in $(LIB_$(1)); do \
  84. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnunet$$$$$$$$lib.so* $$(1)/usr/lib/ ; \
  85. done \
  86. fi )
  87. ( if [ "$(PLUGIN_$(1))" ]; then \
  88. $(INSTALL_DIR) $$(1)/usr/lib/gnunet ; \
  89. for plug in $(PLUGIN_$(1)); do \
  90. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$$$$$plug*.so $$(1)/usr/lib/gnunet ; \
  91. done \
  92. fi )
  93. ( if [ "$(LIBEXEC_$(1))" ]; then \
  94. $(INSTALL_DIR) $$(1)/usr/lib/gnunet/libexec ; \
  95. for lex in $(LIBEXEC_$(1)); do \
  96. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libexec/gnunet-$$$$$$$$lex $$(1)/usr/lib/gnunet/libexec ; \
  97. done \
  98. fi )
  99. ( if [ "$(CONF_$(1))" ]; then \
  100. $(INSTALL_DIR) $$(1)/usr/share/gnunet/config.d ; \
  101. for conf in $(CONF_$(1)); do \
  102. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/config.d/$$$$$$$$conf.conf $$(1)/usr/share/gnunet/config.d ; \
  103. done \
  104. fi )
  105. endef
  106. $$(eval $$(call BuildPackage,gnunet-$(1)))
  107. endef
  108. define Package/gnunet/install
  109. $(INSTALL_DIR) $(1)/usr/bin $(1)/usr/lib/gnunet/libexec
  110. $(INSTALL_DIR) $(1)/usr/share/gnunet/config.d $(1)/usr/share/gnunet/hellos
  111. ( for bin in arm ats core ecc identity nat-server nse \
  112. peerinfo revocation scalarproduct statistics transport uri; do \
  113. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/gnunet-$$$$bin $(1)/usr/bin/ ; \
  114. done )
  115. ( for lib in arm ats block cadet core datacache dht \
  116. dns dnsparser dnsstub fragmentation friends hello identity nat nse \
  117. peerinfo regexblock regex revocation scalarproduct set \
  118. statistics transport util; do \
  119. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libgnunet$$$$lib.so* $(1)/usr/lib/ ; \
  120. done )
  121. ( for plug in ats_proportional block_dht block_regex datacache_heap \
  122. transport_http_client transport_http_server \
  123. transport_https_client transport_https_server \
  124. transport_tcp transport_udp transport_unix transport_wlan; do \
  125. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libgnunet_plugin_$$$$plug*.so $(1)/usr/lib/gnunet ; \
  126. done )
  127. ( for lex in daemon-hostlist daemon-topology helper-nat-client \
  128. helper-nat-server service-arm service-ats service-cadet \
  129. service-core service-dht service-identity service-nse \
  130. service-peerinfo service-regex service-revocation \
  131. service-scalarproduct-alice service-scalarproduct-bob \
  132. service-set service-statistics service-transport; do \
  133. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/gnunet/libexec/gnunet-$$$$lex $(1)/usr/lib/gnunet/libexec ; \
  134. done )
  135. ( for conf in arm ats cadet core datacache dht hostlist \
  136. identity nat nse peerinfo regex revocation scalarproduct \
  137. set statistics topology transport util; do \
  138. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/config.d/$$$$conf.conf $(1)/usr/share/gnunet/config.d ; \
  139. done )
  140. $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/share/gnunet/hellos/* $(1)/usr/share/gnunet/hellos
  141. $(INSTALL_DIR) $(1)/etc/init.d/
  142. $(INSTALL_BIN) ./files/gnunet.init $(1)/etc/init.d/gnunet
  143. endef
  144. define Build/InstallDev
  145. $(INSTALL_DIR) $(1)/usr/include/gnunet $(1)/usr/lib/pkgconfig
  146. $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.{la,so}* $(1)/usr/lib/
  147. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig
  148. $(CP) $(PKG_INSTALL_DIR)/usr/include/gnunet/*.h $(1)/usr/include/gnunet
  149. endef
  150. DEPENDS_conversation:=+gnunet-gns +libgst1app +libgst1audio +libgstreamer1 +glib2 +pulseaudio-daemon +libopus +libogg
  151. BIN_conversation:=conversation conversation-test
  152. LIB_conversation:=conversation microphone speaker
  153. PLUGIN_conversation:=gnsrecord_conversation
  154. LIBEXEC_conversation:=helper-audio-playback helper-audio-record
  155. CONF_conversation:=conversation
  156. DEPENDS_experiments:=+libglpk
  157. PLUGIN_experiments:=ats_mlp ats_ril
  158. DEPENDS_fs:=+gnunet-storage +libextractor
  159. BIN_fs:=auto-share directory download download-manager.scm fs publish unindex search
  160. LIB_fs:=fs
  161. PLUGIN_fs:=block_fs
  162. LIB_EXEC_fs:=helper-fs-publish service-fs
  163. CONF_fs:=fs
  164. DEPENDS_gns:=+gnunet-vpn
  165. BIN_gns:=gns namecache resolver
  166. LIB_gns:=gns gnsrecord namecache namestore
  167. PLUGIN_gns:=block_dns block_gns gnsrecord_dns gnsrecord_gns
  168. LIBEXEC_gns:=dns2gns gns-proxy helper-dns service-dns service-gns service-namecache service-resolver
  169. CONF_gns:=dns gns namecache resolver
  170. DEPENDS_storage:=+gnunet-gns +libsqlite3
  171. BIN_storage:=datastore peerstore
  172. LIB_storage:=datastore peerstore
  173. PLUGIN_storage:=datacache_sqlite datastore_heap datastore_sqlite namecache_sqlite namestore_sqlite
  174. LIBEXEC_storage:=daemon-latency-logger namestore-fcfsd service-datastore service-peerstore
  175. CONF_storage:=datastore peerstore
  176. DEPENDS_transport-bluetooth:=+bluez-libs
  177. PLUGIN_transport-bluetooth:=transport_bluetooth
  178. LIBEXEC_transport-bluetooth:=helper-transport-bluetooth
  179. DEPENDS_utils:=+certtool +openssl-util
  180. BIN_utils:=config gns-import.sh gns-proxy-setup-ca transport-certificate-creation
  181. DEPENDS_vpn:=+kmod-tun
  182. LIB_vpn:=tun vpn
  183. LIBEXEC_vpn:=daemon-exit daemon-pt helper-exit helper-vpn service-vpn
  184. CONF_vpn:=exit pt vpn
  185. $(eval $(call BuildPackage,gnunet))
  186. $(eval $(call BuildComponent,conversation,conversation component,n))
  187. $(eval $(call BuildComponent,experiments,experimental components,n))
  188. $(eval $(call BuildComponent,fs,file-sharing components,n))
  189. $(eval $(call BuildComponent,gns,name resolving components,y))
  190. $(eval $(call BuildComponent,storage,storage components,n))
  191. $(eval $(call BuildComponent,transport-bluetooth,bluetooth transport,n))
  192. $(eval $(call BuildComponent,utils,administration utililties,n))
  193. $(eval $(call BuildComponent,vpn,vpn components,y))