Gentoo Archives: gentoo-commits

From: "Peter Volkov (pva)" <pva@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-analyzer/smokeping: smokeping-2.4.2-r4.ebuild smokeping-2.4.2-r3.ebuild ChangeLog smokeping-2.3.5.ebuild smokeping-2.2.4.ebuild
Date: Fri, 01 Apr 2011 15:57:26
Message-Id: 20110401155716.96B6820054@flycatcher.gentoo.org
1 pva 11/04/01 15:57:16
2
3 Modified: smokeping-2.4.2-r3.ebuild ChangeLog
4 Added: smokeping-2.4.2-r4.ebuild
5 Removed: smokeping-2.3.5.ebuild smokeping-2.2.4.ebuild
6 Log:
7 Finally fix blockers with JSON and use in-tree Config-Grammar, bug #358389, thank Torsten Veller for this job. Drop old.
8
9 (Portage version: 2.1.9.45/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.6 net-analyzer/smokeping/smokeping-2.4.2-r3.ebuild
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/smokeping/smokeping-2.4.2-r3.ebuild?rev=1.6&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/smokeping/smokeping-2.4.2-r3.ebuild?rev=1.6&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/smokeping/smokeping-2.4.2-r3.ebuild?r1=1.5&r2=1.6
17
18 Index: smokeping-2.4.2-r3.ebuild
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/net-analyzer/smokeping/smokeping-2.4.2-r3.ebuild,v
21 retrieving revision 1.5
22 retrieving revision 1.6
23 diff -u -r1.5 -r1.6
24 --- smokeping-2.4.2-r3.ebuild 13 Mar 2011 20:38:53 -0000 1.5
25 +++ smokeping-2.4.2-r3.ebuild 1 Apr 2011 15:57:16 -0000 1.6
26 @@ -1,6 +1,6 @@
27 # Copyright 1999-2011 Gentoo Foundation
28 # Distributed under the terms of the GNU General Public License v2
29 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/smokeping/smokeping-2.4.2-r3.ebuild,v 1.5 2011/03/13 20:38:53 pva Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/smokeping/smokeping-2.4.2-r3.ebuild,v 1.6 2011/04/01 15:57:16 pva Exp $
31
32 EAPI="2"
33
34 @@ -30,6 +30,7 @@
35 speedy? ( dev-perl/SpeedyCGI )
36 !apache2? ( virtual/httpd-cgi )
37 apache2? ( >=www-apache/mod_perl-2.0.1 )
38 + !dev-perl/Config-Grammar
39 !dev-perl/JSON
40 !perl-core/JSON-PP"
41
42
43
44
45 1.36 net-analyzer/smokeping/ChangeLog
46
47 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/smokeping/ChangeLog?rev=1.36&view=markup
48 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/smokeping/ChangeLog?rev=1.36&content-type=text/plain
49 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/smokeping/ChangeLog?r1=1.35&r2=1.36
50
51 Index: ChangeLog
52 ===================================================================
53 RCS file: /var/cvsroot/gentoo-x86/net-analyzer/smokeping/ChangeLog,v
54 retrieving revision 1.35
55 retrieving revision 1.36
56 diff -u -r1.35 -r1.36
57 --- ChangeLog 13 Mar 2011 20:38:53 -0000 1.35
58 +++ ChangeLog 1 Apr 2011 15:57:16 -0000 1.36
59 @@ -1,6 +1,15 @@
60 # ChangeLog for net-analyzer/smokeping
61 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
62 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/smokeping/ChangeLog,v 1.35 2011/03/13 20:38:53 pva Exp $
63 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/smokeping/ChangeLog,v 1.36 2011/04/01 15:57:16 pva Exp $
64 +
65 +*smokeping-2.4.2-r4 (01 Apr 2011)
66 +
67 + 01 Apr 2011; Peter Volkov <pva@g.o> -files/78_smokeping.conf,
68 + -smokeping-2.2.4.ebuild, -smokeping-2.3.5.ebuild,
69 + smokeping-2.4.2-r3.ebuild, +smokeping-2.4.2-r4.ebuild,
70 + -files/smokeping.init, -files/smokeping.init.1:
71 + Finally fix blockers with JSON and use in-tree Config-Grammar, bug
72 + #358389, thank Torsten Veller for this job. Drop old.
73
74 13 Mar 2011; Peter Volkov <pva@g.o> -smokeping-2.4.2-r1.ebuild,
75 -smokeping-2.4.2-r2.ebuild, smokeping-2.4.2-r3.ebuild:
76
77
78
79 1.1 net-analyzer/smokeping/smokeping-2.4.2-r4.ebuild
80
81 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/smokeping/smokeping-2.4.2-r4.ebuild?rev=1.1&view=markup
82 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/smokeping/smokeping-2.4.2-r4.ebuild?rev=1.1&content-type=text/plain
83
84 Index: smokeping-2.4.2-r4.ebuild
85 ===================================================================
86 # Copyright 1999-2011 Gentoo Foundation
87 # Distributed under the terms of the GNU General Public License v2
88 # $Header: /var/cvsroot/gentoo-x86/net-analyzer/smokeping/smokeping-2.4.2-r4.ebuild,v 1.1 2011/04/01 15:57:16 pva Exp $
89
90 EAPI="2"
91
92 inherit perl-module eutils
93
94 DESCRIPTION="A powerful latency measurement tool."
95 HOMEPAGE="http://oss.oetiker.ch/smokeping/"
96 SRC_URI="http://oss.oetiker.ch/smokeping/pub/${P}.tar.gz"
97
98 LICENSE="GPL-2"
99 SLOT="0"
100 KEYWORDS="~amd64 ~x86"
101 IUSE="apache2 speedy"
102
103 # dev-perl/JSON-1.x is bundled and is incompatible with version 2.x wich is in
104 # the tree. See http://bugs.gentoo.org/show_bug.cgi?id=260170#c2
105 DEPEND="dev-lang/perl
106 virtual/perl-libnet
107 >=net-analyzer/rrdtool-1.2[perl]
108 >=net-analyzer/fping-2.4_beta2-r2
109 dev-perl/Config-Grammar
110 dev-perl/Digest-HMAC
111 dev-perl/libwww-perl
112 dev-perl/CGI-Session
113 >=dev-perl/SNMP_Session-1.13
114 >=dev-perl/Socket6-0.20
115 dev-perl/Net-DNS
116 speedy? ( dev-perl/SpeedyCGI )
117 !apache2? ( virtual/httpd-cgi )
118 apache2? ( >=www-apache/mod_perl-2.0.1 )"
119
120 RDEPEND="${DEPEND}"
121
122 pkg_setup() {
123 enewgroup smokeping
124 enewuser smokeping -1 -1 /var/lib/smokeping smokeping
125 }
126
127 src_prepare() {
128 rm -rf lib/Digest # provided by dev-perl/Digest-HMAC
129 rm -rf lib/CGI # provided by dev-perl/CGI-Session
130 rm -rf lib/Config # provided by dev-perl/Config-Grammar
131 rm -r lib/{BER.pm,SNMP_Session.pm,SNMP_util.pm} # dev-perl/SNMP_Session
132 rm qooxdoo/qooxdoolink
133
134 PERL5SMOKEPING="/usr/share/${PN}/perl5"
135 sed -i "/^use strict;/a\use lib '${PERL5SMOKEPING}';" \
136 "${S}"/lib/Qooxdoo/JSONRPC.pm || die
137 }
138
139 src_compile() {
140 # There is a makefile we don't want to run so leave this here
141 einfo "Skip compile."
142 }
143
144 src_install() {
145 # Install JSON-1 outside of perl's @INC path
146 insinto ${PERL5SMOKEPING}
147 doins lib/JSON.pm
148 insinto ${PERL5SMOKEPING}/JSON
149 doins -r lib/JSON/*
150 rm -r lib/JSON lib/JSON.pm
151 # Install the remaining perl modules into the vendor lib area of Perl
152 perlinfo
153 insinto ${VENDOR_LIB}/
154 doins -r lib/*
155
156 # Install the CGI webserver scripts
157 sed 's:^use lib:#use lib:g' -i htdocs/*.cgi.dist
158 if use speedy; then
159 sed '1{s:/usr/[^ ]*:/usr/bin/speedy:}' -i htdocs/*.cgi.dist
160 else
161 sed '1{s:/usr/[^ ]*:/usr/bin/perl:}' -i htdocs/*.cgi.dist
162 fi
163 sed 's:/home/oetiker.*/config.dist:/etc/smokeping/config:' \
164 -i htdocs/*.cgi.dist
165 exeinto /var/www/localhost/perl/
166 newexe htdocs/smokeping.cgi.dist smokeping.pl || die
167 exeinto /var/www/localhost/smokeping
168 newexe htdocs/tr.cgi.dist tr.cgi || die
169 rm htdocs/{tr,smokeping}.cgi.dist
170
171 # Install AJAX scripts
172 insinto /var/www/localhost/smokeping
173 doins -r htdocs/* || die
174
175 # Create the smokeping binaries
176 for bin in ${PN} tSmoke; do
177 newbin bin/${bin}.dist ${bin}
178 dosed 's:^use lib:#use lib:g' /usr/bin/${bin}
179 dosed 's:etc/config.dist:/etc/smokeping/config:' /usr/bin/${bin}
180 done
181
182 # Create the config files
183 insinto /etc/${PN}
184 for file in etc/*; do
185 config=${file/.dist}
186 newins ${file} ${config#*/}
187 done
188 sed -e '/^imgcache/{s:\(^imgcache[ \t]*=\).*:\1 /var/lib/smokeping/.simg:}' \
189 -e '/^imgurl/{s:\(^imgurl[ \t]*=\).*:\1 ../.simg:}' \
190 -e '/^datadir/{s:\(^datadir[ \t]*=\).*:\1 /var/lib/smokeping:}' \
191 -e '/^piddir/{s:\(^piddir[ \t]*=\).*:\1 /var/run/smokeping:}' \
192 -e '/^cgiurl/{s#\(^cgiurl[ \t]*=\).*#\1 http://some.place.xyz/perl/smokeping.pl#}' \
193 -e '/^smokemail/{s:\(^smokemail[ \t]*=\).*:\1 /etc/smokeping/smokemail:}' \
194 -e '/^tmail/{s:\(^tmail[ \t]*=\).*:\1 /etc/smokeping/tmail:}' \
195 -e '/^secrets/{s:\(^secrets[ \t]*=\).*:\1 /etc/smokeping/smokeping_secrets:}' \
196 -e '/^template/{s:\(^template[ \t]*=\).*:\1 /etc/smokeping/basepage.html:}' \
197 -i "${D}/etc/${PN}/config" || die
198 sed -e '/^<script/{s:cropper/:/cropper/:}' -i "${D}/etc/${PN}/basepage.html"
199 fperms 700 /etc/${PN}/smokeping_secrets
200
201 newinitd "${FILESDIR}/${PN}.init.2" ${PN} || die
202
203 if use apache2 ; then
204 insinto /etc/apache2/modules.d
205 doins "${FILESDIR}/79_${PN}.conf" || die
206 fi
207
208 # Create the files in /var for rrd file storage
209 keepdir /var/lib/${PN}/.simg
210 fowners smokeping:smokeping /var/lib/${PN}
211 if use apache2 ; then
212 fowners apache:apache /var/lib/${PN}/.simg
213 else
214 fowners smokeping:smokeping /var/lib/${PN}/.simg
215 fi
216 fperms 775 /var/lib/${PN} /var/lib/${PN}/.simg
217
218 # Install documentation.
219 insinto "/usr/share/doc/${PF}"
220 doins -r doc/examples
221 dodoc CHANGES CONTRIBUTORS README TODO || die
222 doman doc/{smokeping{.1,.cgi.1,_config.5},Smokeping.3,smokeping_examples.7} \
223 doc/{smokeping_{extend,install,master_slave,upgrade}.7,smoketrace.7} \
224 doc/{tSmoke.1,Smokeping/Smokeping::{Examples,RRDtools}.3} || die
225 }
226
227 pkg_postinst() {
228 chown smokeping:smokeping "${ROOT}/var/lib/${PN}"
229 chmod 755 "${ROOT}/var/lib/${PN}"
230 elog
231 elog "Additional steps are needed to get ${PN} up & running:"
232 elog
233 elog "First you need to edit /etc/${PN}/config. After that"
234 elog "you can start ${PN} with '/etc/init.d/${PN} start'."
235 elog
236 if use apache2 ; then
237 elog "For web interface make sure to add -D PERL to APACHE2_OPTS in"
238 elog "/etc/conf.d/apache2 and to restart apache2. To access site from"
239 elog "other places check permissions at /etc/apache2/modules.d/79_${PN}.conf"
240 elog
241 else
242 elog "For web interface configure your web server to serve perl cgi"
243 elog "script at /var/www/localhost/perl/"
244 fi
245 elog "To make cropper working you just need to copy /var/www/localhost/smokeping/cropper"
246 elog "into you htdocs (or create symlink and allow webserver to follow symlinks)."
247 elog
248 elog "We install all files required for smoketrace, but you have to"
249 elog "configure it manually. Just read 'man smoketrace'. Also you need to"
250 elog "'emerge traceroute'."
251 elog
252 }