Makefile 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #
  2. # Copyright (c) 2018-2019 Nick Peng ([email protected])
  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.2019.28
  8. PKG_RELEASE:=1
  9. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  10. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL:=https://www.github.com/pymumu/smartdns.git
  13. PKG_SOURCE_VERSION:=982002e836e486fb4e360bc10e84e7e7197caf46
  14. PKG_MIRROR_HASH:=ae889b521ecf114660ce5597af5c361f5970a7dcb75dadf61b938ba3d2baba54
  15. PKG_MAINTAINER:=Nick Peng <[email protected]>
  16. PKG_LICENSE:=GPL-3.0-or-later
  17. PKG_LICENSE_FILES:=LICENSE
  18. PKG_BUILD_PARALLEL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. MAKE_VARS += VER=$(PKG_VERSION)
  21. MAKE_PATH:=src
  22. define Package/smartdns
  23. SECTION:=net
  24. CATEGORY:=Network
  25. TITLE:=smartdns server
  26. DEPENDS:=+libpthread +libopenssl
  27. URL:=https://www.github.com/pymumu/smartdns/
  28. endef
  29. define Package/smartdns/description
  30. SmartDNS is a local DNS server which accepts DNS query requests from local network clients,
  31. get DNS query results from multiple upstream DNS servers concurrently, and returns the fastest IP to clients.
  32. Unlike dnsmasq's all-servers, smartdns returns the fastest IP.
  33. endef
  34. define Package/smartdns/conffiles
  35. /etc/config/smartdns
  36. /etc/smartdns/address.conf
  37. /etc/smartdns/blacklist-ip.conf
  38. /etc/smartdns/custom.conf
  39. endef
  40. define Package/smartdns/install
  41. $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d $(1)/etc/smartdns
  42. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/smartdns $(1)/usr/sbin/smartdns
  43. $(INSTALL_BIN) $(PKG_BUILD_DIR)/package/openwrt/files/etc/init.d/smartdns $(1)/etc/init.d/smartdns
  44. $(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/address.conf $(1)/etc/smartdns/address.conf
  45. $(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/blacklist-ip.conf $(1)/etc/smartdns/blacklist-ip.conf
  46. $(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/custom.conf $(1)/etc/smartdns/custom.conf
  47. $(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/files/etc/config/smartdns $(1)/etc/config/smartdns
  48. endef
  49. $(eval $(call BuildPackage,smartdns))