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