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.

80 lines
2.3 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.38.0
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=https://codeload.github.com/PurpleI2P/i2pd/tar.gz/$(PKG_VERSION)?
  14. PKG_HASH:=8452f5323795a1846d554096c08fffe5ac35897867b93a5079605df8f80a3089
  15. PKG_MAINTAINER:=David Yang <mmyangfl@gmail.com>
  16. PKG_LICENSE:=BSD-3-Clause
  17. PKG_LICENSE_FILES:=LICENSE
  18. PKG_BUILD_PARALLEL:=1
  19. PKG_INSTALL:=1
  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. endef
  30. define Package/i2pd/description
  31. I2P (Invisible Internet Protocol) is a universal anonymous network layer. All
  32. communications over I2P are anonymous and end-to-end encrypted, participants
  33. don't reveal their real IP addresses.
  34. endef
  35. define Package/i2pd/conffiles
  36. /etc/config/i2pd
  37. /etc/i2pd/i2pd.conf
  38. /etc/i2pd/tunnels.conf
  39. /etc/i2pd/tunnels.d/
  40. endef
  41. define Build/Prepare
  42. $(Build/Prepare/Default)
  43. # race condition
  44. cd $(PKG_BUILD_DIR); $(MAKE) mk_obj_dir
  45. endef
  46. TARGET_LDFLAGS+=-latomic
  47. define Package/i2pd/install
  48. $(INSTALL_DIR) $(1)/usr/sbin
  49. $(INSTALL_BIN) $(PKG_BUILD_DIR)/i2pd $(1)/usr/sbin
  50. $(INSTALL_DIR) $(1)/usr/share/i2pd
  51. $(CP) $(PKG_BUILD_DIR)/contrib/certificates $(1)/usr/share/i2pd
  52. $(INSTALL_DIR) $(1)/etc/config
  53. $(INSTALL_DATA) ./files/i2pd.config $(1)/etc/config/i2pd
  54. $(INSTALL_DIR) $(1)/etc/i2pd
  55. $(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/i2pd.conf $(1)/etc/i2pd
  56. $(SED) ' \
  57. s/127.0.0.1/192.168.1.1/g; \
  58. s/datadir = \/var\/lib/datadir = \/etc/ \
  59. ' $(1)/etc/i2pd/i2pd.conf
  60. $(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/tunnels.conf $(1)/etc/i2pd
  61. $(INSTALL_DIR) $(1)/etc/i2pd/tunnels.d
  62. $(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/tunnels.d/*.conf $(1)/etc/i2pd/tunnels.d
  63. # subscriptions.txt deprecated, see #8088
  64. $(INSTALL_DIR) $(1)/etc/init.d
  65. $(INSTALL_BIN) ./files/i2pd.init $(1)/etc/init.d/i2pd
  66. endef
  67. $(eval $(call BuildPackage,i2pd))