Makefile 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #
  2. # Copyright (c) 2018-2024 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.2023.41
  8. PKG_RELEASE:=1
  9. PKG_SOURCE_PROTO:=git
  10. PKG_SOURCE_URL:=https://www.github.com/pymumu/smartdns.git
  11. PKG_MIRROR_HASH:=skip
  12. PKG_SOURCE_VERSION:=60a3719ec739be2cc1e11724ac049b09a75059cb
  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. 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, and encrypt DNS queries with DoT or DoH.
  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. /etc/smartdns/domain-block.list
  38. /etc/smartdns/domain-forwarding.list
  39. endef
  40. define Package/smartdns/install
  41. $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
  42. $(INSTALL_DIR) $(1)/etc/smartdns $(1)/etc/smartdns/domain-set $(1)/etc/smartdns/conf.d/
  43. $(INSTALL_DIR) $(1)/etc/smartdns/ip-set $(1)/etc/smartdns/download
  44. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/smartdns $(1)/usr/sbin/smartdns
  45. $(INSTALL_BIN) $(PKG_BUILD_DIR)/package/openwrt/files/etc/init.d/smartdns $(1)/etc/init.d/smartdns
  46. $(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/address.conf $(1)/etc/smartdns/address.conf
  47. $(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/blacklist-ip.conf $(1)/etc/smartdns/blacklist-ip.conf
  48. $(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/custom.conf $(1)/etc/smartdns/custom.conf
  49. $(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/domain-block.list $(1)/etc/smartdns/domain-block.list
  50. $(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/domain-forwarding.list $(1)/etc/smartdns/domain-forwarding.list
  51. $(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/files/etc/config/smartdns $(1)/etc/config/smartdns
  52. endef
  53. $(eval $(call BuildPackage,smartdns))