Makefile 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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_PROTO:=git
  10. PKG_SOURCE_URL:=https://www.github.com/pymumu/smartdns.git
  11. PKG_SOURCE_VERSION:=982002e836e486fb4e360bc10e84e7e7197caf46
  12. PKG_MIRROR_HASH:=ae889b521ecf114660ce5597af5c361f5970a7dcb75dadf61b938ba3d2baba54
  13. PKG_MAINTAINER:=Nick Peng <[email protected]>
  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. get 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))