1 |
commit: c5a1aea329a52da62c39184d19935590b5c38e57 |
2 |
Author: Conrad Kostecki <conrad <AT> kostecki <DOT> com> |
3 |
AuthorDate: Sun Dec 2 18:57:40 2018 +0000 |
4 |
Commit: Aaron W. Swenson <titanofold <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 2 23:38:01 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5a1aea3 |
7 |
|
8 |
net-dns/ddclient: add need net for init script |
9 |
|
10 |
Also bumped to EAPI=7. |
11 |
|
12 |
Closes: https://bugs.gentoo.org/672338 |
13 |
Package-Manager: Portage-2.3.52, Repoman-2.3.12 |
14 |
Signed-off-by: Conrad Kostecki <conrad <AT> kostecki.com> |
15 |
Closes: https://github.com/gentoo/gentoo/pull/10542 |
16 |
Signed-off-by: Aaron W. Swenson <titanofold <AT> gentoo.org> |
17 |
|
18 |
net-dns/ddclient/ddclient-3.9.0-r2.ebuild | 65 +++++++++++++++++++++++++++++++ |
19 |
net-dns/ddclient/files/ddclient.initd-r6 | 22 +++++++++++ |
20 |
2 files changed, 87 insertions(+) |
21 |
|
22 |
diff --git a/net-dns/ddclient/ddclient-3.9.0-r2.ebuild b/net-dns/ddclient/ddclient-3.9.0-r2.ebuild |
23 |
new file mode 100644 |
24 |
index 00000000000..680f66ad4da |
25 |
--- /dev/null |
26 |
+++ b/net-dns/ddclient/ddclient-3.9.0-r2.ebuild |
27 |
@@ -0,0 +1,65 @@ |
28 |
+# Copyright 1999-2018 Gentoo Authors |
29 |
+# Distributed under the terms of the GNU General Public License v2 |
30 |
+ |
31 |
+EAPI=7 |
32 |
+ |
33 |
+inherit systemd user |
34 |
+ |
35 |
+DESCRIPTION="Perl client used to update dynamic DNS entries" |
36 |
+HOMEPAGE="https://sourceforge.net/projects/ddclient/" |
37 |
+SRC_URI="mirror://sourceforge/ddclient/${P}.tar.gz" |
38 |
+ |
39 |
+KEYWORDS="~alpha ~amd64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" |
40 |
+LICENSE="GPL-2+" |
41 |
+SLOT="0" |
42 |
+IUSE="examples iproute2" |
43 |
+ |
44 |
+RDEPEND=" |
45 |
+ dev-lang/perl |
46 |
+ dev-perl/Data-Validate-IP |
47 |
+ dev-perl/Digest-SHA1 |
48 |
+ dev-perl/IO-Socket-INET6 |
49 |
+ dev-perl/IO-Socket-SSL |
50 |
+ virtual/perl-Digest-SHA |
51 |
+ virtual/perl-JSON-PP |
52 |
+ iproute2? ( sys-apps/iproute2 ) |
53 |
+" |
54 |
+ |
55 |
+pkg_setup() { |
56 |
+ enewgroup ddclient |
57 |
+ enewuser ddclient -1 -1 -1 ddclient |
58 |
+} |
59 |
+ |
60 |
+src_prepare() { |
61 |
+ # Remove PID setting, to reliably setup the environment for the init script |
62 |
+ sed -e '/^pid/d' -i sample-etc_ddclient.conf || die |
63 |
+ |
64 |
+ # Remove windows executable |
65 |
+ if use examples; then |
66 |
+ rm sample-etc_dhcpc_dhcpcd-eth0.exe || die |
67 |
+ fi |
68 |
+ |
69 |
+ # Use sys-apps/iproute2 instead of sys-apps/net-tools |
70 |
+ use iproute2 && eapply "${FILESDIR}"/${P}-use_iproute2.patch |
71 |
+ |
72 |
+ default |
73 |
+} |
74 |
+ |
75 |
+src_install() { |
76 |
+ dobin ddclient |
77 |
+ |
78 |
+ insinto /etc/ddclient |
79 |
+ insopts -m 0600 -o ddclient -g ddclient |
80 |
+ newins sample-etc_ddclient.conf ddclient.conf |
81 |
+ |
82 |
+ newinitd "${FILESDIR}"/ddclient.initd-r6 ddclient |
83 |
+ systemd_newunit "${FILESDIR}"/ddclient.service-r1 ddclient.service |
84 |
+ systemd_newtmpfilesd "${FILESDIR}"/ddclient.tmpfiles ddclient.conf |
85 |
+ |
86 |
+ dodoc Change* README* RELEASENOTE TODO UPGRADE |
87 |
+ |
88 |
+ if use examples; then |
89 |
+ docinto examples |
90 |
+ dodoc sample-* |
91 |
+ fi |
92 |
+} |
93 |
|
94 |
diff --git a/net-dns/ddclient/files/ddclient.initd-r6 b/net-dns/ddclient/files/ddclient.initd-r6 |
95 |
new file mode 100644 |
96 |
index 00000000000..7bdc433d1ed |
97 |
--- /dev/null |
98 |
+++ b/net-dns/ddclient/files/ddclient.initd-r6 |
99 |
@@ -0,0 +1,22 @@ |
100 |
+#!/sbin/openrc-run |
101 |
+# Copyright 1999-2018 Gentoo Authors |
102 |
+# Distributed under the terms of the GNU General Public License v2 |
103 |
+ |
104 |
+name="DDclient" |
105 |
+pidfile="/run/ddclient/${RC_SVCNAME}.pid" |
106 |
+ |
107 |
+command="/usr/bin/ddclient" |
108 |
+command_args="-pid ${pidfile}" |
109 |
+command_group="ddclient" |
110 |
+command_user="ddclient" |
111 |
+ |
112 |
+depend() { |
113 |
+ need net |
114 |
+ use dns logger |
115 |
+} |
116 |
+ |
117 |
+start_pre() { |
118 |
+ checkpath -f -m 0600 -o ${command_user}:${command_group} /etc/ddclient/ddclient.conf |
119 |
+ checkpath -d -m 0700 -o ${command_user}:${command_group} /run/ddclient |
120 |
+ checkpath -d -m 0700 -o ${command_user}:${command_group} /var/cache/ddclient |
121 |
+} |