summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYixun Lan <dlan@gentoo.org>2022-04-09 08:40:46 +0800
committerYixun Lan <dlan@gentoo.org>2022-04-09 08:44:46 +0800
commit5fe91c832626d7e6db788a376a1cca0ce53c2352 (patch)
tree4063eeed1d61f62b381676f3c3ca57411ac51868 /net-dns/smartdns
parentapp-emacs/emojify: new package; add version 1.2 (diff)
downloadgentoo-5fe91c832626d7e6db788a376a1cca0ce53c2352.tar.gz
gentoo-5fe91c832626d7e6db788a376a1cca0ce53c2352.tar.bz2
gentoo-5fe91c832626d7e6db788a376a1cca0ce53c2352.zip
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>
Diffstat (limited to 'net-dns/smartdns')
-rw-r--r--net-dns/smartdns/Manifest1
-rw-r--r--net-dns/smartdns/files/smartdns.confd5
-rw-r--r--net-dns/smartdns/files/smartdns.initd24
-rw-r--r--net-dns/smartdns/metadata.xml8
-rw-r--r--net-dns/smartdns/smartdns-36.1.ebuild33
5 files changed, 71 insertions, 0 deletions
diff --git a/net-dns/smartdns/Manifest b/net-dns/smartdns/Manifest
new file mode 100644
index 000000000000..274c5dc55d5e
--- /dev/null
+++ b/net-dns/smartdns/Manifest
@@ -0,0 +1 @@
+DIST smartdns-36.1.tar.gz 499257 BLAKE2B c0bca0b8751afd67d7628d993f1093fb95c0864d153e65ebb31d0f9ccf76c7581f98a7fc16cf503cfa83f4d3e9b05e7c21818f34fa34ce770e9e0f0c3eced921 SHA512 88da539f12351bfef256e93d851a08247699ed2f08724abd5d0cc770a6b0475e0540d2aef6f43524edc48cccd9f58db3ad4c68561b26812bf8863b543748c549
diff --git a/net-dns/smartdns/files/smartdns.confd b/net-dns/smartdns/files/smartdns.confd
new file mode 100644
index 000000000000..f7ec5258db73
--- /dev/null
+++ b/net-dns/smartdns/files/smartdns.confd
@@ -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=
diff --git a/net-dns/smartdns/files/smartdns.initd b/net-dns/smartdns/files/smartdns.initd
new file mode 100644
index 000000000000..f6084c557daa
--- /dev/null
+++ b/net-dns/smartdns/files/smartdns.initd
@@ -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 $?
+}
+
diff --git a/net-dns/smartdns/metadata.xml b/net-dns/smartdns/metadata.xml
new file mode 100644
index 000000000000..1ab427e8f0b6
--- /dev/null
+++ b/net-dns/smartdns/metadata.xml
@@ -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>
diff --git a/net-dns/smartdns/smartdns-36.1.ebuild b/net-dns/smartdns/smartdns-36.1.ebuild
new file mode 100644
index 000000000000..b3addca60631
--- /dev/null
+++ b/net-dns/smartdns/smartdns-36.1.ebuild
@@ -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
+}