kenzok8-packages/smartdns/Makefile

65 lines
2.4 KiB
Makefile
Raw Normal View History

2024-03-07 23:47:45 +08:00
# SPDX-License-Identifier: GPL-3.0-or-later
2022-04-11 16:22:56 +08:00
#
2024-03-07 23:47:45 +08:00
# Copyright (c) 2018-2023 Nick Peng (pymumu@gmail.com)
2022-04-11 16:22:56 +08:00
include $(TOPDIR)/rules.mk
PKG_NAME:=smartdns
2024-06-13 02:08:02 +08:00
PKG_VERSION:=46
2023-01-30 20:15:38 +08:00
PKG_RELEASE:=1
2022-04-11 16:22:56 +08:00
2024-03-07 23:47:45 +08:00
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/pymumu/smartdns/tar.gz/Release$(PKG_VERSION)?
2024-06-13 02:15:49 +08:00
PKG_HASH:=6594d21c0e354b67d4b5918e11eff21e6314e247b9e6e28be1ece4168c368fc1
2024-03-07 23:47:45 +08:00
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-Release$(PKG_VERSION)
2022-04-11 16:22:56 +08:00
PKG_MAINTAINER:=Nick Peng <pymumu@gmail.com>
PKG_LICENSE:=GPL-3.0-or-later
PKG_LICENSE_FILES:=LICENSE
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
MAKE_PATH:=src
2024-03-07 23:47:45 +08:00
MAKE_VARS+= VER=$(PKG_VERSION)
2022-04-11 16:22:56 +08:00
define Package/smartdns
SECTION:=net
CATEGORY:=Network
TITLE:=smartdns server
DEPENDS:=+libpthread +libopenssl
URL:=https://www.github.com/pymumu/smartdns/
endef
define Package/smartdns/description
SmartDNS is a local DNS server which accepts DNS query requests from local network clients,
gets DNS query results from multiple upstream DNS servers concurrently, and returns the fastest IP to clients.
2024-03-07 23:47:45 +08:00
Unlike dnsmasq's all-servers, smartdns returns the fastest IP, and encrypt DNS queries with DoT or DoH.
2022-04-11 16:22:56 +08:00
endef
define Package/smartdns/conffiles
/etc/config/smartdns
/etc/smartdns/address.conf
/etc/smartdns/blacklist-ip.conf
/etc/smartdns/custom.conf
2024-03-07 23:47:45 +08:00
/etc/smartdns/domain-block.list
/etc/smartdns/domain-forwarding.list
2022-04-11 16:22:56 +08:00
endef
define Package/smartdns/install
2024-03-07 23:47:45 +08:00
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d
2023-01-30 20:15:38 +08:00
$(INSTALL_DIR) $(1)/etc/smartdns $(1)/etc/smartdns/domain-set $(1)/etc/smartdns/conf.d/
2024-03-07 23:47:45 +08:00
$(INSTALL_DIR) $(1)/etc/smartdns/ip-set $(1)/etc/smartdns/download
2022-04-11 16:22:56 +08:00
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/smartdns $(1)/usr/sbin/smartdns
$(INSTALL_BIN) $(PKG_BUILD_DIR)/package/openwrt/files/etc/init.d/smartdns $(1)/etc/init.d/smartdns
$(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/address.conf $(1)/etc/smartdns/address.conf
$(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/blacklist-ip.conf $(1)/etc/smartdns/blacklist-ip.conf
2024-03-07 23:47:45 +08:00
$(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/domain-block.list $(1)/etc/smartdns/domain-block.list
$(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/domain-forwarding.list $(1)/etc/smartdns/domain-forwarding.list
$(INSTALL_CONF) $(CURDIR)/conf/custom.conf $(1)/etc/smartdns/custom.conf
$(INSTALL_CONF) $(CURDIR)/conf/smartdns.conf $(1)/etc/config/smartdns
2022-04-11 16:22:56 +08:00
endef
2024-06-13 02:15:49 +08:00
$(eval $(call BuildPackage,smartdns))