Merge pull request #20944 from stangri/master-https-dns-proxy
[feed/packages.git] / net / smartdns / Makefile
1 #
2 # Copyright (c) 2018-2023 Nick Peng (pymumu@gmail.com)
3 # This is free software, licensed under the GNU General Public License v3.
4 #
5
6 include $(TOPDIR)/rules.mk
7
8 PKG_NAME:=smartdns
9 PKG_VERSION:=1.2023.42
10 PKG_RELEASE:=1
11
12 PKG_SOURCE_PROTO:=git
13 PKG_SOURCE_URL:=https://www.github.com/pymumu/smartdns.git
14 PKG_SOURCE_VERSION:=ed102cda03c56e9c63040d33d4a391b56491493e
15 PKG_MIRROR_HASH:=366e98b92c3d22844ff5fc52c35f65c3b01e1b92fc9dc14c474823f0cc3ed11a
16
17 PKG_MAINTAINER:=Nick Peng <pymumu@gmail.com>
18 PKG_LICENSE:=GPL-3.0-or-later
19 PKG_LICENSE_FILES:=LICENSE
20
21 PKG_BUILD_PARALLEL:=1
22
23 include $(INCLUDE_DIR)/package.mk
24
25 MAKE_VARS += VER=$(PKG_VERSION)
26 MAKE_PATH:=src
27
28 define Package/smartdns
29 SECTION:=net
30 CATEGORY:=Network
31 TITLE:=smartdns server
32 DEPENDS:=+libpthread +libopenssl
33 URL:=https://www.github.com/pymumu/smartdns/
34 endef
35
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, and encrypt DNS queries with DoT or DoH.
40 endef
41
42 define Package/smartdns/conffiles
43 /etc/config/smartdns
44 /etc/smartdns/address.conf
45 /etc/smartdns/blacklist-ip.conf
46 /etc/smartdns/custom.conf
47 /etc/smartdns/domain-block.list
48 /etc/smartdns/domain-forwarding.list
49 endef
50
51 define Package/smartdns/install
52 $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
53 $(INSTALL_DIR) $(1)/etc/smartdns $(1)/etc/smartdns/domain-set $(1)/etc/smartdns/conf.d/
54 $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/smartdns $(1)/usr/sbin/smartdns
55 $(INSTALL_BIN) $(PKG_BUILD_DIR)/package/openwrt/files/etc/init.d/smartdns $(1)/etc/init.d/smartdns
56 $(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/address.conf $(1)/etc/smartdns/address.conf
57 $(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/blacklist-ip.conf $(1)/etc/smartdns/blacklist-ip.conf
58 $(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/custom.conf $(1)/etc/smartdns/custom.conf
59 $(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/files/etc/config/smartdns $(1)/etc/config/smartdns
60 endef
61
62 $(eval $(call BuildPackage,smartdns))