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.

116 lines
3.3 KiB

  1. #
  2. # Copyright (C) 2016 OpenWrt.org
  3. # Copyright (C) 2012-2016 Black Roland and contributors (https://github.com/black-roland/exOpenWrt/graphs/contributors)
  4. # Copyright (C) 2011-2012 Entware
  5. #
  6. # This is free software, licensed under the GNU General Public License v2.
  7. # See /LICENSE for more information.
  8. #
  9. include $(TOPDIR)/rules.mk
  10. PKG_NAME:=dnscrypt-proxy
  11. PKG_VERSION:=1.9.4
  12. PKG_RELEASE:=1
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  14. PKG_SOURCE_URL:=http://download.dnscrypt.org/dnscrypt-proxy
  15. PKG_MD5SUM:=fdf4a708e7922e13b14555f315ca8d5361aec89b0595b06fdbbcaacfa4e6f11e
  16. PKG_FIXUP:=autoreconf
  17. PKG_INSTALL:=1
  18. PKG_MAINTAINER:=Damiano Renfer <damiano.renfer@gmail.com>
  19. PKG_LICENSE:=ISC
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/dnscrypt-proxy/Default
  22. SECTION:=net
  23. CATEGORY:=Network
  24. SUBMENU:=IP Addresses and Names
  25. URL:=http://dnscrypt.org/
  26. MAINTAINER:=Damiano Renfer <damiano.renfer@gmail.com>
  27. endef
  28. define Package/dnscrypt-proxy
  29. $(call Package/dnscrypt-proxy/Default)
  30. DEPENDS:=+libsodium +dnscrypt-proxy-resolvers
  31. TITLE:=A tool for securing communications between a client and a DNS resolver
  32. endef
  33. define Package/dnscrypt-proxy/description
  34. dnscrypt-proxy provides local service which can be used directly as your
  35. local resolver or as a DNS forwarder, encrypting and authenticating requests
  36. using the DNSCrypt protocol and passing them to an upstream server.
  37. The DNSCrypt protocol uses high-speed high-security elliptic-curve cryptography
  38. and is very similar to DNSCurve, but focuses on securing communications between
  39. a client and its first-level resolver.
  40. endef
  41. define Package/dnscrypt-proxy-resolvers
  42. $(call Package/dnscrypt-proxy/Default)
  43. TITLE:=Package with current list of dnscrypt-proxy resolvers
  44. VERSION:=$(PKG_VERSION)+git-20161129-f17bace-$(PKG_RELEASE)
  45. endef
  46. define Package/dnscrypt-proxy-resolvers/description
  47. Package with current list of dnscrypt-proxy resolvers.
  48. endef
  49. define Package/hostip
  50. $(call Package/dnscrypt-proxy/Default)
  51. DEPENDS:=+libsodium
  52. TITLE:=Resolver to IPv4 or IPv6 addresses
  53. endef
  54. define Package/hostip/description
  55. The DNSCrypt proxy ships with a simple tool named hostip that resolves a name
  56. to IPv4 or IPv6 addresses.
  57. endef
  58. define Build/Configure
  59. $(call Build/Configure/Default, \
  60. --prefix=/usr \
  61. --disable-ssp \
  62. --disable-plugins \
  63. )
  64. endef
  65. TARGET_CFLAGS += \
  66. -fomit-frame-pointer \
  67. -fdata-sections \
  68. -ffunction-sections
  69. TARGET_LDFLAGS += \
  70. -Wl,-gc-sections
  71. MAKE_FLAGS += \
  72. CFLAGS="$(TARGET_CFLAGS)" \
  73. LDFLAGS="$(TARGET_LDFLAGS)"
  74. define Package/dnscrypt-proxy/install
  75. $(INSTALL_DIR) $(1)/usr/sbin
  76. $(CP) $(PKG_INSTALL_DIR)/usr/sbin/dnscrypt-proxy $(1)/usr/sbin/
  77. $(INSTALL_DIR) $(1)/etc/init.d
  78. $(INSTALL_BIN) ./files/dnscrypt-proxy.init $(1)/etc/init.d/dnscrypt-proxy
  79. $(INSTALL_DIR) $(1)/etc/config
  80. $(INSTALL_CONF) ./files/dnscrypt-proxy.config $(1)/etc/config/dnscrypt-proxy
  81. endef
  82. define Package/dnscrypt-proxy-resolvers/install
  83. $(INSTALL_DIR) $(1)/usr/share/dnscrypt-proxy
  84. $(CP) ./files/dnscrypt-resolvers.csv $(1)/usr/share/dnscrypt-proxy/
  85. endef
  86. define Package/dnscrypt-proxy/conffiles
  87. /etc/config/dnscrypt-proxy
  88. endef
  89. define Package/hostip/install
  90. $(INSTALL_DIR) $(1)/usr/bin
  91. $(CP) $(PKG_INSTALL_DIR)/usr/bin/hostip $(1)/usr/bin/
  92. endef
  93. $(eval $(call BuildPackage,dnscrypt-proxy))
  94. $(eval $(call BuildPackage,dnscrypt-proxy-resolvers))
  95. $(eval $(call BuildPackage,hostip))