From 2252757369baf3c2f526c5c7c3f6e9d57cdd2e79 Mon Sep 17 00:00:00 2001 From: LEAN-ESX Date: Tue, 17 Dec 2019 23:24:38 -0800 Subject: [PATCH] smartdns: add package --- package/lean/smartdns/Makefile | 75 ++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 package/lean/smartdns/Makefile diff --git a/package/lean/smartdns/Makefile b/package/lean/smartdns/Makefile new file mode 100644 index 000000000..91bcc3af7 --- /dev/null +++ b/package/lean/smartdns/Makefile @@ -0,0 +1,75 @@ +# +# Copyright (C) 2018-2020 Ruilin Peng (Nick) . +# +# smartdns is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# smartdns is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +include $(TOPDIR)/rules.mk + +PKG_NAME:=smartdns + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/pymumu/smartdns.git + +PKG_REV:=d6c34658af0d4aac94655a139030c5ec12884754 +PKG_VERSION:=2019.12.15 +PKG_RELEASE:=2 +PKG_LICENSE:=GPL-3.0 + +PKG_SOURCE_VERSION:=$(PKG_REV) +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_SUBDIR) + +include $(INCLUDE_DIR)/package.mk + +MAKE_ARGS := CFLAGS="$(TARGET_CFLAGS)" CC=$(TARGET_CC) + +define Package/smartdns + SECTION:=net + CATEGORY:=Network + TITLE:=smartdns server + URL:=http://github.com/pymumu/smartdns/ + MAINTAINER:=Nick Peng + DEPENDS:=+libopenssl +endef + +define Package/smartdns/description +SmartDNS is a local DNS server. SmartDNS accepts DNS query requests from local clients, obtains DNS query results from multiple upstream DNS servers, and returns the fastest access results to clients. +endef + +define Build/Configure + mkdir -p $(PKG_INSTALL_DIR) +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR)/src $(MAKE_ARGS) all +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) $(PKG_BUILD_DIR)/package/openwrt/custom.conf $(1)/etc/smartdns/custom.conf + $(INSTALL_CONF) $(PKG_BUILD_DIR)/package/openwrt/files/etc/config/smartdns $(1)/etc/config/smartdns +endef + +$(eval $(call BuildPackage,smartdns))