small-package/smartdns/Makefile

59 lines
1.8 KiB
Makefile
Raw Normal View History

2021-09-05 16:50:22 +08:00
# SPDX-License-Identifier: GPL-3.0-or-later
#
# Copyright (C) 2018-2020 Ruilin Peng (Nick) <pymumu@gmail.com>.
include $(TOPDIR)/rules.mk
PKG_NAME:=smartdns
2021-09-08 08:27:38 +08:00
PKG_VERSION:=1.2021.35
PKG_RELEASE:=1
2021-09-05 16:50:22 +08:00
PKG_SOURCE_PROTO:=git
2021-09-08 08:27:38 +08:00
PKG_SOURCE_URL:=https://www.github.com/pymumu/smartdns.git
2021-09-05 16:50:22 +08:00
PKG_SOURCE_VERSION:=f50e4dd0813da9300580f7188e44ed72a27ae79c
2021-09-24 19:49:47 +08:00
PKG_MIRROR_HASH:=skip
2021-09-05 16:50:22 +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_VARS += VER=$(PKG_VERSION)
MAKE_PATH:=src
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.
Unlike dnsmasq's all-servers, smartdns returns the fastest IP.
endef
define Package/smartdns/conffiles
/etc/config/smartdns
/etc/smartdns/address.conf
/etc/smartdns/blacklist-ip.conf
/etc/smartdns/custom.conf
endef
define Package/smartdns/install
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/config $(1)/etc/init.d $(1)/etc/smartdns
$(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
$(INSTALL_CONF) $(CURDIR)/conf/custom.conf $(1)/etc/smartdns/custom.conf
$(INSTALL_CONF) $(CURDIR)/conf/smartdns.conf $(1)/etc/config/smartdns
endef
$(eval $(call BuildPackage,smartdns))