Gentoo Archives: gentoo-commits

From: Yixun Lan <dlan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/smartdns/files/, net-dns/smartdns/
Date: Sat, 09 Apr 2022 00:46:52
Message-Id: 1649465086.5fe91c832626d7e6db788a376a1cca0ce53c2352.dlan@gentoo
1 commit: 5fe91c832626d7e6db788a376a1cca0ce53c2352
2 Author: Yixun Lan <dlan <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 9 00:40:46 2022 +0000
4 Commit: Yixun Lan <dlan <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 9 00:44:46 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5fe91c83
7
8 net-dns/smartdns: initial version 36.1 added
9
10 Package-Manager: Portage-3.0.30, Repoman-3.0.3
11 Signed-off-by: Yixun Lan <dlan <AT> gentoo.org>
12
13 net-dns/smartdns/Manifest | 1 +
14 net-dns/smartdns/files/smartdns.confd | 5 +++++
15 net-dns/smartdns/files/smartdns.initd | 24 ++++++++++++++++++++++++
16 net-dns/smartdns/metadata.xml | 8 ++++++++
17 net-dns/smartdns/smartdns-36.1.ebuild | 33 +++++++++++++++++++++++++++++++++
18 5 files changed, 71 insertions(+)
19
20 diff --git a/net-dns/smartdns/Manifest b/net-dns/smartdns/Manifest
21 new file mode 100644
22 index 000000000000..274c5dc55d5e
23 --- /dev/null
24 +++ b/net-dns/smartdns/Manifest
25 @@ -0,0 +1 @@
26 +DIST smartdns-36.1.tar.gz 499257 BLAKE2B c0bca0b8751afd67d7628d993f1093fb95c0864d153e65ebb31d0f9ccf76c7581f98a7fc16cf503cfa83f4d3e9b05e7c21818f34fa34ce770e9e0f0c3eced921 SHA512 88da539f12351bfef256e93d851a08247699ed2f08724abd5d0cc770a6b0475e0540d2aef6f43524edc48cccd9f58db3ad4c68561b26812bf8863b543748c549
27
28 diff --git a/net-dns/smartdns/files/smartdns.confd b/net-dns/smartdns/files/smartdns.confd
29 new file mode 100644
30 index 000000000000..f7ec5258db73
31 --- /dev/null
32 +++ b/net-dns/smartdns/files/smartdns.confd
33 @@ -0,0 +1,5 @@
34 +# Default settings for smartdns server. This file is sourced by /bin/sh from
35 +# /etc/init.d/smartdns.
36 +
37 +# Options to pass to smartdns
38 +SMART_DNS_OPTS=
39
40 diff --git a/net-dns/smartdns/files/smartdns.initd b/net-dns/smartdns/files/smartdns.initd
41 new file mode 100644
42 index 000000000000..f6084c557daa
43 --- /dev/null
44 +++ b/net-dns/smartdns/files/smartdns.initd
45 @@ -0,0 +1,24 @@
46 +#!/sbin/openrc-run
47 +# Copyright 1999-2022 Gentoo Authors
48 +# Distributed under the terms of the GNU General Public License v2
49 +
50 +depend() {
51 + need net
52 +}
53 +
54 +start() {
55 + ebegin "Starting smartdns daemon"
56 + start-stop-daemon --start --exec /usr/sbin/smartdns \
57 + --pidfile /run/smartdns.pid \
58 + -- -p /run/smartdns.pid \
59 + ${SMART_DNS_OPTS}
60 + eend $*
61 +}
62 +
63 +stop() {
64 + ebegin "Stopping smartdns daemon"
65 + start-stop-daemon --stop --exec /usr/sbin/smartdns \
66 + --pidfile /run/smartdns.pid
67 + eend $?
68 +}
69 +
70
71 diff --git a/net-dns/smartdns/metadata.xml b/net-dns/smartdns/metadata.xml
72 new file mode 100644
73 index 000000000000..1ab427e8f0b6
74 --- /dev/null
75 +++ b/net-dns/smartdns/metadata.xml
76 @@ -0,0 +1,8 @@
77 +<?xml version="1.0" encoding="UTF-8"?>
78 +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
79 +<pkgmetadata>
80 + <maintainer type="person">
81 + <email>dlan@g.o</email>
82 + <name>Yixun Lan</name>
83 + </maintainer>
84 +</pkgmetadata>
85
86 diff --git a/net-dns/smartdns/smartdns-36.1.ebuild b/net-dns/smartdns/smartdns-36.1.ebuild
87 new file mode 100644
88 index 000000000000..b3addca60631
89 --- /dev/null
90 +++ b/net-dns/smartdns/smartdns-36.1.ebuild
91 @@ -0,0 +1,33 @@
92 +# Copyright 2022 Gentoo Authors
93 +# Distributed under the terms of the GNU General Public License v2
94 +
95 +EAPI=8
96 +
97 +inherit systemd
98 +DESCRIPTION="A local DNS server returns the fastest access results"
99 +HOMEPAGE="https://github.com/pymumu/smartdns"
100 +SRC_URI="https://github.com/pymumu/smartdns/archive/refs/tags/Release${PV}.tar.gz -> ${P}.tar.gz"
101 +
102 +LICENSE="GPL-3"
103 +SLOT="0"
104 +KEYWORDS="~amd64"
105 +
106 +DEPEND="dev-libs/openssl:0="
107 +RDEPEND="${DEPEND}"
108 +BDEPEND=""
109 +
110 +S="${WORKDIR}/${PN}-Release${PV}"
111 +
112 +src_prepare() {
113 + default
114 + sed -i -e "/install .*default /d" \
115 + -e "/install .*init.d /d" Makefile || die
116 +}
117 +
118 +src_install() {
119 + emake DESTDIR="${D}" \
120 + SYSTEMDSYSTEMUNITDIR="$(systemd_get_systemunitdir)" install
121 +
122 + newconfd "${FILESDIR}"/smartdns.confd smartdns
123 + newinitd "${FILESDIR}"/smartdns.initd smartdns
124 +}