2 # Copyright (c) 2018-2022 Nick Peng (pymumu@gmail.com)
3 # This is free software, licensed under the GNU General Public License v3.
6 include $(TOPDIR
)/rules.mk
13 PKG_SOURCE_URL
:=https
://www.github.com
/pymumu
/smartdns.git
14 PKG_SOURCE_VERSION
:=1991a0b102e891f149647b162897bf4403f8f66c
15 PKG_MIRROR_HASH
:=8017fd769d8128af5b54ce7935f4801cc798c6608dd54fa3e3a7d230ec8f1b64
17 PKG_MAINTAINER
:=Nick Peng
<pymumu@gmail.com
>
18 PKG_LICENSE
:=GPL-3.0
-or-later
19 PKG_LICENSE_FILES
:=LICENSE
23 include $(INCLUDE_DIR
)/package.mk
25 MAKE_VARS
+= VER
=$(PKG_VERSION
)
28 define Package
/smartdns
31 TITLE
:=smartdns server
32 DEPENDS
:=+libpthread
+libopenssl
33 URL
:=https
://www.github.com
/pymumu
/smartdns
/
36 define Package
/smartdns
/description
37 SmartDNS is a local DNS server which accepts DNS query requests from local network clients
,
38 gets DNS query results from multiple upstream DNS servers concurrently
, and returns the fastest IP to clients.
39 Unlike dnsmasq
's all-servers, smartdns returns the fastest IP.
42 define Package/smartdns/conffiles
44 /etc/smartdns/address.conf
45 /etc/smartdns/blacklist-ip.conf
46 /etc/smartdns/custom.conf
49 define Package/smartdns/install
50 $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d $(1)/etc/smartdns
51 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/smartdns $(1)/usr/sbin/smartdns
52 $(INSTALL_BIN) $(PKG_BUILD_DIR)/package/openwrt/files/etc/init.d/smartdns $(1)/etc/init.d/smartdns
53 $(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/address.conf $(1)/etc/smartdns/address.conf
54 $(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/blacklist-ip.conf $(1)/etc/smartdns/blacklist-ip.conf
55 $(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/custom.conf $(1)/etc/smartdns/custom.conf
56 $(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/files/etc/config/smartdns $(1)/etc/config/smartdns
59 $(eval $(call BuildPackage,smartdns))