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.

66 lines
2.0 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.20.0
  11. PKG_RELEASE:=1
  12. PKG_BUILD_PARALLEL:=1
  13. PKG_SOURCE_URL:=https://codeload.github.com/PurpleI2P/i2pd/tar.gz/$(PKG_VERSION)?
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  15. PKG_HASH:=e424c368f92be5050f3dd5e98ed9ce2ea8d6076e36444c99b96e3b10f69420b1
  16. PKG_LICENSE:=BSD-3-clause
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/i2pd
  19. SECTION:=net
  20. CATEGORY:=Network
  21. DEPENDS:=+libopenssl +boost +boost-system +boost-filesystem \
  22. +boost-program_options +boost-date_time +libatomic +zlib
  23. TITLE:=full-featured C++ implementation of I2P client
  24. URL:=https://github.com/PurpleI2P/i2pd
  25. USERID:=i2pd:i2pd
  26. MAINTAINER:=David Yang <mmyangfl@gmail.com>
  27. endef
  28. define Package/i2pd/description
  29. I2P (Invisible Internet Protocol) is a universal anonymous network layer. All
  30. communications over I2P are anonymous and end-to-end encrypted, participants
  31. don't reveal their real IP addresses.
  32. endef
  33. define Package/i2pd/conffiles
  34. /etc/i2pd/i2pd.conf
  35. /etc/i2pd/subscriptions.txt
  36. /etc/i2pd/tunnels.conf
  37. endef
  38. TARGET_LDFLAGS+=-latomic
  39. MAKE_FLAGS+=USE_AESNI=no USE_AVX=no
  40. define Package/i2pd/install
  41. $(INSTALL_DIR) $(1)/usr/sbin
  42. $(INSTALL_BIN) $(PKG_BUILD_DIR)/i2pd $(1)/usr/sbin
  43. $(INSTALL_DIR) $(1)/usr/share/i2pd
  44. $(CP) $(PKG_BUILD_DIR)/contrib/certificates $(1)/usr/share/i2pd
  45. $(INSTALL_DIR) $(1)/etc/i2pd
  46. $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/i2pd.conf $(1)/etc/i2pd
  47. $(SED) ' \
  48. s/127.0.0.1/192.168.1.1/g; \
  49. s/datadir = \/var\/lib/datadir = \/etc/ \
  50. ' $(1)/etc/i2pd/i2pd.conf
  51. $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/subscriptions.txt $(1)/etc/i2pd
  52. $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/tunnels.conf $(1)/etc/i2pd
  53. $(INSTALL_DIR) $(1)/etc/init.d
  54. $(INSTALL_BIN) ./files/i2pd.init $(1)/etc/init.d/i2pd
  55. endef
  56. $(eval $(call BuildPackage,i2pd))