Gentoo Archives: gentoo-commits

From: Austin English <wizardedit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/ez-ipupdate/, net-dns/ez-ipupdate/files/
Date: Thu, 28 Apr 2016 23:44:44
Message-Id: 1461881069.87c063b595932155f40c41edd577ad1f1e332424.wizardedit@gentoo
1 commit: 87c063b595932155f40c41edd577ad1f1e332424
2 Author: Austin English <wizardedit <AT> gentoo <DOT> org>
3 AuthorDate: Thu Apr 28 22:04:29 2016 +0000
4 Commit: Austin English <wizardedit <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 28 22:04:29 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=87c063b5
7
8 net-dns/ez-ipupdate: use #!/sbin/openrc-run instead of #!/sbin/runscript
9
10 Gentoo-Bug: https://bugs.gentoo.org/573846
11
12 Package-Manager: portage-2.2.26
13
14 .../ez-ipupdate-3.0.11.13.3_beta8-r3.ebuild | 128 +++++++++++++++++++++
15 net-dns/ez-ipupdate/files/ez-ipupdate.initd | 4 +-
16 2 files changed, 130 insertions(+), 2 deletions(-)
17
18 diff --git a/net-dns/ez-ipupdate/ez-ipupdate-3.0.11.13.3_beta8-r3.ebuild b/net-dns/ez-ipupdate/ez-ipupdate-3.0.11.13.3_beta8-r3.ebuild
19 new file mode 100644
20 index 0000000..3ae49fa
21 --- /dev/null
22 +++ b/net-dns/ez-ipupdate/ez-ipupdate-3.0.11.13.3_beta8-r3.ebuild
23 @@ -0,0 +1,128 @@
24 +# Copyright 1999-2016 Gentoo Foundation
25 +# Distributed under the terms of the GNU General Public License v2
26 +# $Id$
27 +
28 +EAPI="5"
29 +inherit eutils readme.gentoo systemd user versionator
30 +
31 +MY_BETA="$(get_version_component_range 6)"
32 +MY_PATCH="$(get_version_component_range 4-5)"
33 +MY_PV="$(get_version_component_range 1-3)${MY_BETA/beta/b}"
34 +
35 +DESCRIPTION="Dynamic DNS client for lots of dynamic dns services"
36 +HOMEPAGE="http://ez-ipupdate.com/"
37 +SRC_URI="mirror://debian/pool/main/e/ez-ipupdate/${PN}_${MY_PV}.orig.tar.gz
38 + mirror://debian/pool/main/e/ez-ipupdate/${PN}_${MY_PV}-${MY_PATCH}.diff.gz"
39 +
40 +LICENSE="GPL-2"
41 +SLOT="0"
42 +KEYWORDS="~amd64 ~ppc ~sparc ~x86"
43 +IUSE=""
44 +
45 +DEPEND=""
46 +RDEPEND=""
47 +
48 +S="${WORKDIR}/${PN}-${MY_PV}"
49 +
50 +DISABLE_AUTOFORMATTING="yes"
51 +DOC_CONTENTS="
52 +Please create one or more config files in
53 +/etc/ez-ipupdate/. A bunch of samples can
54 +be found in the doc directory.
55 +
56 +All config files must have a '.conf' extension.
57 +
58 +If you are using openRC you need to:
59 +- Please do not use the 'run-as-user', 'run-as-euser',
60 +'cache-file' and 'pidfile' options, since these are
61 +handled internally by the init-script.
62 +
63 +-If you want to use ez-ipupdate in daemon mode,
64 +please add 'daemon' to the config file(s) and
65 +add the ez-ipupdate init-script to the default runlevel.
66 +Without the 'daemon' option, you can run the
67 +init-script with the 'update' parameter inside
68 +your PPP ip-up script.
69 +"
70 +
71 +src_prepare() {
72 + # apply debian patches
73 + epatch "${WORKDIR}/${PN}_${MY_PV}-${MY_PATCH}.diff"
74 +
75 + # repair/apply additional debian patches
76 + sed -i -e "s|^\(---\s*\)\.\./|\1|g" debian/patches/*.diff
77 + EPATCH_SOURCE="${S}/debian/patches" EPATCH_SUFFIX="diff" EPATCH_FORCE="yes" epatch
78 +
79 + # adding members.3322.org support
80 + epatch "${FILESDIR}/${P}-3322.diff"
81 +
82 + # adding www.dnsexit.com support
83 + epatch "${FILESDIR}/${P}-dnsexit.diff"
84 +
85 + # make ez-ipupdate work with iproute2/dhcpcd under linux (bug #318905)
86 + epatch "${FILESDIR}/${P}-linux.diff"
87 +
88 + # allows to set IPv6 via -a option, (bug #432764)
89 + epatch "${FILESDIR}/${P}-ipv6.diff"
90 +
91 + # repair format mask issues
92 + sed -i -e "s|\(\s*\)\(strlen(putbuf)\)|\1(int)\2|g" ez-ipupdate.c || die
93 +
94 + # comment out obsolete options
95 + sed -i -e "s:^\(run-as-user.*\):#\1:g" \
96 + -e "s:^\(cache-file.*\):#\1:g" ex*conf || die
97 +
98 + # make 'missing' executable (bug #103480)
99 + chmod +x missing
100 +}
101 +
102 +src_configure() {
103 + econf --bindir=/usr/sbin
104 +}
105 +
106 +src_install() {
107 + emake DESTDIR="${D}" install
108 + newinitd "${FILESDIR}/ez-ipupdate.initd" ez-ipupdate
109 + systemd_dounit "${FILESDIR}/${PN}.service"
110 + keepdir /etc/ez-ipupdate
111 +
112 + # install docs
113 + dodoc README
114 + newdoc debian/README.Debian README.debian
115 + newdoc debian/changelog ChangeLog.debian
116 + newdoc CHANGELOG ChangeLog
117 + doman debian/ez-ipupdate.8
118 +
119 + # install example configs
120 + docinto examples
121 + dodoc ex*conf
122 +
123 + readme.gentoo_create_doc
124 +}
125 +
126 +pkg_preinst() {
127 + enewgroup ez-ipupd
128 + enewuser ez-ipupd -1 -1 /var/cache/ez-ipupdate ez-ipupd
129 +}
130 +
131 +pkg_postinst() {
132 + chmod 750 /etc/ez-ipupdate /var/cache/ez-ipupdate
133 + chown ez-ipupd:ez-ipupd /etc/ez-ipupdate /var/cache/ez-ipupdate
134 +
135 + readme.gentoo_print_elog
136 +
137 + if [ -f /etc/ez-ipupdate.conf ]; then
138 + elog "!!! IMPORTANT UPDATE NOTICE !!!"
139 + elog
140 + elog "The ez-ipupdate init-script can now handle more"
141 + elog "than one config file. New config file location is"
142 + elog "/etc/ez-ipupdate/*.conf"
143 + elog
144 + if [ ! -f /etc/ez-ipupdate/default.conf ]; then
145 + mv -f /etc/ez-ipupdate.conf /etc/ez-ipupdate/default.conf
146 + elog "Your old configuration has been moved to"
147 + elog "/etc/ez-ipupdate/default.conf"
148 + elog
149 + fi
150 + fi
151 +}
152
153 diff --git a/net-dns/ez-ipupdate/files/ez-ipupdate.initd b/net-dns/ez-ipupdate/files/ez-ipupdate.initd
154 index 4bba723..30b957b 100644
155 --- a/net-dns/ez-ipupdate/files/ez-ipupdate.initd
156 +++ b/net-dns/ez-ipupdate/files/ez-ipupdate.initd
157 @@ -1,5 +1,5 @@
158 -#!/sbin/runscript
159 -# Copyright 1999-2014 Gentoo Foundation
160 +#!/sbin/openrc-run
161 +# Copyright 1999-2016 Gentoo Foundation
162 # Distributed under the terms of the GNU General Public License v2
163 # $Id$