net-dns/smartdns: initial version 36.1 added

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Yixun Lan <dlan@gentoo.org>
This commit is contained in:
Yixun Lan
2022-04-09 08:40:46 +08:00
parent 277855dd85
commit 5fe91c8326
5 changed files with 71 additions and 0 deletions

View File

@@ -0,0 +1 @@
DIST smartdns-36.1.tar.gz 499257 BLAKE2B c0bca0b8751afd67d7628d993f1093fb95c0864d153e65ebb31d0f9ccf76c7581f98a7fc16cf503cfa83f4d3e9b05e7c21818f34fa34ce770e9e0f0c3eced921 SHA512 88da539f12351bfef256e93d851a08247699ed2f08724abd5d0cc770a6b0475e0540d2aef6f43524edc48cccd9f58db3ad4c68561b26812bf8863b543748c549

View File

@@ -0,0 +1,5 @@
# Default settings for smartdns server. This file is sourced by /bin/sh from
# /etc/init.d/smartdns.
# Options to pass to smartdns
SMART_DNS_OPTS=

View File

@@ -0,0 +1,24 @@
#!/sbin/openrc-run
# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
depend() {
need net
}
start() {
ebegin "Starting smartdns daemon"
start-stop-daemon --start --exec /usr/sbin/smartdns \
--pidfile /run/smartdns.pid \
-- -p /run/smartdns.pid \
${SMART_DNS_OPTS}
eend $*
}
stop() {
ebegin "Stopping smartdns daemon"
start-stop-daemon --stop --exec /usr/sbin/smartdns \
--pidfile /run/smartdns.pid
eend $?
}

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>dlan@gentoo.org</email>
<name>Yixun Lan</name>
</maintainer>
</pkgmetadata>

View File

@@ -0,0 +1,33 @@
# Copyright 2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit systemd
DESCRIPTION="A local DNS server returns the fastest access results"
HOMEPAGE="https://github.com/pymumu/smartdns"
SRC_URI="https://github.com/pymumu/smartdns/archive/refs/tags/Release${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64"
DEPEND="dev-libs/openssl:0="
RDEPEND="${DEPEND}"
BDEPEND=""
S="${WORKDIR}/${PN}-Release${PV}"
src_prepare() {
default
sed -i -e "/install .*default /d" \
-e "/install .*init.d /d" Makefile || die
}
src_install() {
emake DESTDIR="${D}" \
SYSTEMDSYSTEMUNITDIR="$(systemd_get_systemunitdir)" install
newconfd "${FILESDIR}"/smartdns.confd smartdns
newinitd "${FILESDIR}"/smartdns.initd smartdns
}