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.

59 lines
2.0 KiB

  1. #
  2. # Copyright (c) 2018-2020 Nick Peng (pymumu@gmail.com)
  3. # This is free software, licensed under the GNU General Public License v3.
  4. #
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=smartdns
  7. PKG_VERSION:=1.2021.35
  8. PKG_RELEASE:=1
  9. PKG_SOURCE_PROTO:=git
  10. PKG_SOURCE_URL:=https://www.github.com/pymumu/smartdns.git
  11. PKG_SOURCE_VERSION:=f50e4dd0813da9300580f7188e44ed72a27ae79c
  12. PKG_MIRROR_HASH:=b4d825a48884101f647cd594f00b714a2d09ac419b958ee0317d302fd31b0038
  13. PKG_MAINTAINER:=Nick Peng <pymumu@gmail.com>
  14. PKG_LICENSE:=GPL-3.0-or-later
  15. PKG_LICENSE_FILES:=LICENSE
  16. PKG_BUILD_PARALLEL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. MAKE_VARS += VER=$(PKG_VERSION)
  19. MAKE_PATH:=src
  20. define Package/smartdns
  21. SECTION:=net
  22. CATEGORY:=Network
  23. TITLE:=smartdns server
  24. DEPENDS:=+libpthread +libopenssl
  25. URL:=https://www.github.com/pymumu/smartdns/
  26. endef
  27. define Package/smartdns/description
  28. SmartDNS is a local DNS server which accepts DNS query requests from local network clients,
  29. gets DNS query results from multiple upstream DNS servers concurrently, and returns the fastest IP to clients.
  30. Unlike dnsmasq's all-servers, smartdns returns the fastest IP.
  31. endef
  32. define Package/smartdns/conffiles
  33. /etc/config/smartdns
  34. /etc/smartdns/address.conf
  35. /etc/smartdns/blacklist-ip.conf
  36. /etc/smartdns/custom.conf
  37. endef
  38. define Package/smartdns/install
  39. $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d $(1)/etc/smartdns
  40. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/smartdns $(1)/usr/sbin/smartdns
  41. $(INSTALL_BIN) $(PKG_BUILD_DIR)/package/openwrt/files/etc/init.d/smartdns $(1)/etc/init.d/smartdns
  42. $(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/address.conf $(1)/etc/smartdns/address.conf
  43. $(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/blacklist-ip.conf $(1)/etc/smartdns/blacklist-ip.conf
  44. $(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/custom.conf $(1)/etc/smartdns/custom.conf
  45. $(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/files/etc/config/smartdns $(1)/etc/config/smartdns
  46. endef
  47. $(eval $(call BuildPackage,smartdns))