You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
2.2 KiB

  1. #
  2. # Copyright (C) 2015, 2016 gxcreator
  3. # Copyright (C) 2017 OpenWrt.org
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=i2pd
  10. PKG_VERSION:=2.17.0
  11. PKG_RELEASE:=2
  12. PKG_BUILD_PARALLEL:=1
  13. PKG_SOURCE_PROTO:=git
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  15. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  16. PKG_SOURCE_URL:=https://github.com/PurpleI2P/i2pd.git
  17. PKG_SOURCE_VERSION:=$(PKG_VERSION)
  18. PKG_MIRROR_HASH:=d389615366e603468c6d213e6545dfea99090d4a83aac121b6e2e4e5d0aac925
  19. PKG_LICENSE:=BSD-3-clause
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/i2pd
  22. SECTION:=net
  23. CATEGORY:=Network
  24. DEPENDS:=+libopenssl +boost +boost-system +boost-filesystem \
  25. +boost-program_options +boost-date_time +libatomic +zlib
  26. TITLE:=full-featured C++ implementation of I2P client
  27. URL:=https://github.com/PurpleI2P/i2pd
  28. USERID:=i2pd:i2pd
  29. MAINTAINER:=David Yang <mmyangfl@gmail.com>
  30. endef
  31. define Package/i2pd/description
  32. I2P (Invisible Internet Protocol) is a universal anonymous network layer. All
  33. communications over I2P are anonymous and end-to-end encrypted, participants
  34. don't reveal their real IP addresses.
  35. endef
  36. define Package/i2pd/conffiles
  37. /etc/i2pd/i2pd.conf
  38. /etc/i2pd/subscriptions.txt
  39. /etc/i2pd/tunnels.conf
  40. endef
  41. TARGET_LDFLAGS+=-latomic
  42. MAKE_FLAGS+=USE_AESNI=no USE_AVX=no
  43. define Package/i2pd/install
  44. $(INSTALL_DIR) $(1)/usr/sbin
  45. $(INSTALL_BIN) $(PKG_BUILD_DIR)/i2pd $(1)/usr/sbin
  46. $(INSTALL_DIR) $(1)/usr/share/i2pd
  47. $(CP) $(PKG_BUILD_DIR)/contrib/certificates $(1)/usr/share/i2pd
  48. $(INSTALL_DIR) $(1)/etc/i2pd
  49. $(LN) /usr/share/i2pd/certificates $(1)/etc/i2pd/certificates
  50. $(LN) /var/lib/i2pd/peerProfiles $(1)/etc/i2pd/peerProfiles
  51. $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/i2pd.conf $(1)/etc/i2pd
  52. $(SED) ' \
  53. s/127.0.0.1/192.168.1.1/g; \
  54. s/datadir = \/var\/lib/datadir = \/etc/ \
  55. ' $(1)/etc/i2pd/i2pd.conf
  56. $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/subscriptions.txt $(1)/etc/i2pd
  57. $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/tunnels.conf $(1)/etc/i2pd
  58. $(INSTALL_DIR) $(1)/etc/init.d
  59. $(INSTALL_BIN) ./files/i2pd.init $(1)/etc/init.d/i2pd
  60. endef
  61. $(eval $(call BuildPackage,i2pd))