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.

81 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.35.0
  11. PKG_RELEASE:=2
  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:=d041fd4e7a88ac168e76f66fdab40174ad093cdc13451cdbd0dd1216e5581f8a
  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. MAKE_FLAGS+=USE_AESNI=no USE_AVX=no
  48. define Package/i2pd/install
  49. $(INSTALL_DIR) $(1)/usr/sbin
  50. $(INSTALL_BIN) $(PKG_BUILD_DIR)/i2pd $(1)/usr/sbin
  51. $(INSTALL_DIR) $(1)/usr/share/i2pd
  52. $(CP) $(PKG_BUILD_DIR)/contrib/certificates $(1)/usr/share/i2pd
  53. $(INSTALL_DIR) $(1)/etc/config
  54. $(INSTALL_DATA) ./files/i2pd.config $(1)/etc/config/i2pd
  55. $(INSTALL_DIR) $(1)/etc/i2pd
  56. $(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/i2pd.conf $(1)/etc/i2pd
  57. $(SED) ' \
  58. s/127.0.0.1/192.168.1.1/g; \
  59. s/datadir = \/var\/lib/datadir = \/etc/ \
  60. ' $(1)/etc/i2pd/i2pd.conf
  61. $(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/tunnels.conf $(1)/etc/i2pd
  62. $(INSTALL_DIR) $(1)/etc/i2pd/tunnels.d
  63. $(INSTALL_CONF) $(PKG_BUILD_DIR)/contrib/tunnels.d/*.conf $(1)/etc/i2pd/tunnels.d
  64. # subscriptions.txt deprecated, see #8088
  65. $(INSTALL_DIR) $(1)/etc/init.d
  66. $(INSTALL_BIN) ./files/i2pd.init $(1)/etc/init.d/i2pd
  67. endef
  68. $(eval $(call BuildPackage,i2pd))