diff options
author | Peter Volkov <pva@gentoo.org> | 2011-04-01 15:57:16 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2011-04-01 15:57:16 +0000 |
commit | a7ca2f50ea0aec3bdabfbbe852173dd9334d6a1d (patch) | |
tree | 5552e85caa72d560f81066f9878354c1a60f206f /net-analyzer/smokeping | |
parent | Smokeping #358389 fixed, unmask dev-perl/Config-Grammar. (diff) | |
download | historical-a7ca2f50ea0aec3bdabfbbe852173dd9334d6a1d.tar.gz historical-a7ca2f50ea0aec3bdabfbbe852173dd9334d6a1d.tar.bz2 historical-a7ca2f50ea0aec3bdabfbbe852173dd9334d6a1d.zip |
Finally fix blockers with JSON and use in-tree Config-Grammar, bug #358389, thank Torsten Veller for this job. Drop old.
Package-Manager: portage-2.1.9.45/cvs/Linux x86_64
Diffstat (limited to 'net-analyzer/smokeping')
-rw-r--r-- | net-analyzer/smokeping/ChangeLog | 11 | ||||
-rw-r--r-- | net-analyzer/smokeping/Manifest | 12 | ||||
-rw-r--r-- | net-analyzer/smokeping/files/78_smokeping.conf | 17 | ||||
-rw-r--r-- | net-analyzer/smokeping/files/smokeping.init | 70 | ||||
-rw-r--r-- | net-analyzer/smokeping/files/smokeping.init.1 | 73 | ||||
-rw-r--r-- | net-analyzer/smokeping/smokeping-2.2.4.ebuild | 112 | ||||
-rw-r--r-- | net-analyzer/smokeping/smokeping-2.3.5.ebuild | 115 | ||||
-rw-r--r-- | net-analyzer/smokeping/smokeping-2.4.2-r3.ebuild | 3 | ||||
-rw-r--r-- | net-analyzer/smokeping/smokeping-2.4.2-r4.ebuild | 167 |
9 files changed, 182 insertions, 398 deletions
diff --git a/net-analyzer/smokeping/ChangeLog b/net-analyzer/smokeping/ChangeLog index c83d9decc9b9..9e358cd21456 100644 --- a/net-analyzer/smokeping/ChangeLog +++ b/net-analyzer/smokeping/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for net-analyzer/smokeping # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/smokeping/ChangeLog,v 1.35 2011/03/13 20:38:53 pva Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/smokeping/ChangeLog,v 1.36 2011/04/01 15:57:16 pva Exp $ + +*smokeping-2.4.2-r4 (01 Apr 2011) + + 01 Apr 2011; Peter Volkov <pva@gentoo.org> -files/78_smokeping.conf, + -smokeping-2.2.4.ebuild, -smokeping-2.3.5.ebuild, + smokeping-2.4.2-r3.ebuild, +smokeping-2.4.2-r4.ebuild, + -files/smokeping.init, -files/smokeping.init.1: + Finally fix blockers with JSON and use in-tree Config-Grammar, bug + #358389, thank Torsten Veller for this job. Drop old. 13 Mar 2011; Peter Volkov <pva@gentoo.org> -smokeping-2.4.2-r1.ebuild, -smokeping-2.4.2-r2.ebuild, smokeping-2.4.2-r3.ebuild: diff --git a/net-analyzer/smokeping/Manifest b/net-analyzer/smokeping/Manifest index 3e1666890b5e..a1f2dda99bb7 100644 --- a/net-analyzer/smokeping/Manifest +++ b/net-analyzer/smokeping/Manifest @@ -1,14 +1,8 @@ -AUX 78_smokeping.conf 376 RMD160 6a5ab3e4d5d94e6b410f52dfdbf99fe3e8ef32ab SHA1 1ef976cddf5bd1cfc5f68dacc2172d075be4677c SHA256 c29e0c2e83b28f1aac3cda5d4990f0eee5fdc9e2abd084b07a538aec29860b0e AUX 79_smokeping.conf 351 RMD160 96e13a810420790cdf7b5ea8969048be603e6c7e SHA1 69942bd8d0559c25a538edde540233c9ef7ff1e3 SHA256 fa4c48387598f8c6e60b7642e4284bb64196dcd233cea9f18ff37009b212ff77 AUX config.dist 2962 RMD160 e19833de607c6b8a6c88b26b4c903736e9b5ca86 SHA1 7dd78fdf8f0129c3e2b47015b67381e7b127332d SHA256 031f0cb72de57812ed34f463d71e90d05fb7b0e2b8df79d5e6ec42e67dfeca7e -AUX smokeping.init 1641 RMD160 0f2656c931fc1dac12e6ef794f55d9e0e6fe28c8 SHA1 992f118547cc153993b0427920e0cc5eb1c0d54e SHA256 d47d12cc2c48203cfaad4ab91456e22487f3b1247ab98601680b6738edd236c7 -AUX smokeping.init.1 1700 RMD160 f15885579b4068b11bd591514ebfdf38df66cfce SHA1 b658a72fd6169b148746478adaa38dc2b2b5d270 SHA256 680b472a245a0cd20ac6066d03669f8bccdb42dfa8cab02ea881aae2e35eadba AUX smokeping.init.2 1747 RMD160 4f1d2029d4ad7b862726458e0892f77a335c0a78 SHA1 f87591f156e58abf5ed8b8723729de6ee28d7930 SHA256 331cddc6cce8d7aba23e93211568e3ce99c25e113633c4013e55bb5d98a161e4 -DIST smokeping-2.2.4.tar.gz 588740 RMD160 74a784ac3b9a837ba29882c1bcc16f6bdb440b9a SHA1 45e210e79017853031dee379a05647db7697d076 SHA256 a1d684785294919b6b97924484579bc64c460a39482c4dd676514712b3699da9 -DIST smokeping-2.3.5.tar.gz 580458 RMD160 484efd851453024e83cb84ecad753d2051df0081 SHA1 d7ed6d1cf7fde5c8c9e1cb69c1e543cdf3f3edfa SHA256 e50eb7944ffd27897cb2af7d551592a142d33479284bb35c36bf68481ca64556 DIST smokeping-2.4.2.tar.gz 909514 RMD160 4c91f1c6be77ef4d851821f5c0a8a60be0770527 SHA1 055d65c7e3c49cd0d6e8f96242131fe69dc3110e SHA256 ed8680d1b3fdb2b1efde3aa14b37bf7e9aee2c992c5814061dbd78e6eea00d49 -EBUILD smokeping-2.2.4.ebuild 3434 RMD160 508163eccfa73e35126c8584f4ff18773773276e SHA1 65e67e495c353a96075a868edfdf59682887226a SHA256 479946714cc7ca03e36ff813c23f06d5bd4a6325414636904019388694549ea4 -EBUILD smokeping-2.3.5.ebuild 3530 RMD160 a02f1ddf97dec18e665ae0f672a506d641d0598e SHA1 6e7dace2850d575762bc83cdb7dce2f39677808e SHA256 3fa31b1e1ecf02eda5b093c250b62d2d3a06fefb1ae1ff8d3e20d6068392e5e0 -EBUILD smokeping-2.4.2-r3.ebuild 5267 RMD160 fcff52c3dcdd5973aeb61cd84ddfffc8b07582ac SHA1 346f22b6733bf279a19abd66d9ca4e3d84c6922c SHA256 2456ddb10061c6c2c26c4c0a06e27373c2d5647832c12d4600e035429ea2dd48 -MISC ChangeLog 5506 RMD160 8e7b8772cf80b3f78c4212f5f7139bf17ba07941 SHA1 c80cea4e5f12a0a6027605fa9651248007eff659 SHA256 637feb67785f300af401e3d63aba1c4782777232b730fa3efdb79b34a4d9a7dc +EBUILD smokeping-2.4.2-r3.ebuild 5294 RMD160 1348c303fd4abd391c275816e1eb192f867c2b9d SHA1 22ca83d5aafa14b7b95b4a2b84e11ee036df291b SHA256 d6c852d35594f245b23d63a5267122a3a0a7e04e3b3c6a515c3e0b56b57b7ef2 +EBUILD smokeping-2.4.2-r4.ebuild 5616 RMD160 cf0970f904c0d107af3e2308e8f71d513a9ee304 SHA1 0a17ca9710e83d196d87650acf14e298d54f70dc SHA256 af53bb8acd3b57773ad4a807ae84cf6fab1fa73c4eb3a85fa4ac1991b49c7c42 +MISC ChangeLog 5897 RMD160 8124d9e574823df37f8cd53ba799c5ec8aa65087 SHA1 0b3b948eb97d41ff49728af7f253862fde0ee2d7 SHA256 5aa42fb763388c96530e82ca2395e333c057464ff7487dbf5e0e852ed0faa22a MISC metadata.xml 361 RMD160 7de7c7bb433ae943618d7ea8c434da347d1a7f8e SHA1 ebad6ec275bddd0fc705ee7aabe7607070593071 SHA256 c91655cb47d86f209ce10de9c4e62bac01c76127b9bad94e2be166bbde2691e2 diff --git a/net-analyzer/smokeping/files/78_smokeping.conf b/net-analyzer/smokeping/files/78_smokeping.conf deleted file mode 100644 index e710ae822342..000000000000 --- a/net-analyzer/smokeping/files/78_smokeping.conf +++ /dev/null @@ -1,17 +0,0 @@ -### -### Setup the smokeping image cache -### -<IfModule mod_alias.c> - Alias "/.simg/" "/var/lib/smokeping/.simg/" - <IfModule mod_perl.c> - <Directory "/var/lib/smokeping/.simg/"> - Options -Indexes MultiViews - AllowOverride None - <IfModule mod_access.c> - Order deny,allow - Deny from all - Allow from 127.0.0.1 - </IfModule> - </Directory> - </IfModule> -</IfModule> diff --git a/net-analyzer/smokeping/files/smokeping.init b/net-analyzer/smokeping/files/smokeping.init deleted file mode 100644 index 6ccb34a8c3f5..000000000000 --- a/net-analyzer/smokeping/files/smokeping.init +++ /dev/null @@ -1,70 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -opts="${opts} dump restore" - -depend() { - need net - use dns -} - -checkconfig() { - if [[ ! -e "/usr/bin/smokeping" ]] ; then - eerror "You need /usr/bin/smokeping to run smokeping!" - return 1 - fi - if [[ ! -e "/etc/smokeping" ]] ; then - eerror "You need /etc/smokeping to run smokeping!" - return 1 - fi - einfo "Please remember to setup smokeping at /etc/smokeping!" -} - -start() { - checkconfig || return 1 - - ebegin "Starting smokeping" - LC_ALL=C \ - start-stop-daemon --start --name smokeping \ - --exec /usr/bin/smokeping \ - --chuid smokeping:smokeping - eend $? -} - -stop() { - ebegin "Stopping smokeping" - start-stop-daemon --stop \ - --pidfile /var/lib/smokeping/smokeping.pid - eend $? -} - -dump() { - ebegin "Dumping smokeping rrd files to XML for backup or upgrade use" - if service_started "${myservice}" ; then - eerror "You need to stop smokeping before dumping files!" - return 1 - fi - for f in `find /var/lib/smokeping -name '*.rrd' -print` ; do - f_xml=`dirname $f`/`basename $f .rrd`.xml - rrdtool dump "$f" > "${f_xml}" - chown root:0 "${f_xml}" - done - eend $? -} - -restore() { - ebegin "Restoring smokeping rrd files from XML dump files" - if service_started "${myservice}" ; then - eerror "You need to stop smokeping before restoring files!" - return 1 - fi - for f in `find /var/lib/smokeping -name '*.xml' -print` ; do - f_rrd=`dirname $f`/`basename $f .xml`.rrd - mv -f "${f_rrd}" "${f_rrd}.bak" - chown root:0 "${f_rrd}.bak" - rrdtool restore "$f" "${f_rrd}" - chown smokeping:smokeping "${f_rrd}" - done - eend $? -} diff --git a/net-analyzer/smokeping/files/smokeping.init.1 b/net-analyzer/smokeping/files/smokeping.init.1 deleted file mode 100644 index 0222964c6ee9..000000000000 --- a/net-analyzer/smokeping/files/smokeping.init.1 +++ /dev/null @@ -1,73 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -opts="${opts} dump reload restore" - -depend() { - need net - use dns -} - -checkconfig() { - if [ ! -f "/etc/smokeping/config" ] ; then - eerror "You need /etc/smokeping to run smokeping!" - return 1 - fi - einfo "Please do not forget to configure smokeping at /etc/smokeping/config!" -} - -start() { - checkconfig || return 1 - - ebegin "Starting smokeping" - LC_ALL=C \ - start-stop-daemon --start --name smokeping \ - --pidfile /var/run/smokeping/smokeping.pid \ - --exec /usr/bin/smokeping \ - --chuid smokeping:smokeping - eend $? -} - -stop() { - ebegin "Stopping smokeping" - start-stop-daemon --stop \ - --pidfile /var/run/smokeping/smokeping.pid - eend $? -} - -reload() { - ebegin "Reloading smokeping" - /usr/bin/smokeping --reload 1>/dev/null 2>&1 - eend $? -} - -dump() { - ebegin "Dumping smokeping rrd files to XML for backup or upgrade use" - if service_started "${myservice}" ; then - eerror "You need to stop smokeping before dumping files!" - return 1 - fi - for f in `find /var/lib/smokeping -name '*.rrd' -print` ; do - f_xml=`dirname $f`/`basename $f .rrd`.xml - rrdtool dump "$f" > "${f_xml}" - chown root:0 "${f_xml}" - done - eend $? -} - -restore() { - ebegin "Restoring smokeping rrd files from XML dump files" - if service_started "${myservice}" ; then - eerror "You need to stop smokeping before restoring files!" - return 1 - fi - for f in `find /var/lib/smokeping -name '*.xml' -print` ; do - f_rrd=`dirname $f`/`basename $f .xml`.rrd - mv -f "${f_rrd}" "${f_rrd}.bak" - chown root:0 "${f_rrd}.bak" - rrdtool restore "$f" "${f_rrd}" - chown smokeping:smokeping "${f_rrd}" - done - eend $? -} diff --git a/net-analyzer/smokeping/smokeping-2.2.4.ebuild b/net-analyzer/smokeping/smokeping-2.2.4.ebuild deleted file mode 100644 index 7f16697ab4a9..000000000000 --- a/net-analyzer/smokeping/smokeping-2.2.4.ebuild +++ /dev/null @@ -1,112 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/smokeping/smokeping-2.2.4.ebuild,v 1.4 2008/04/21 09:40:47 chtekk Exp $ - -inherit perl-module eutils - -KEYWORDS="amd64 sparc x86" - -DESCRIPTION="A powerful latency measurement tool." -SRC_URI="http://oss.oetiker.ch/smokeping/pub/${P}.tar.gz" -HOMEPAGE="http://oss.oetiker.ch/smokeping/" -LICENSE="GPL-2" -SLOT="0" -IUSE="apache2" - -DEPEND="dev-lang/perl - virtual/perl-libnet - >=net-analyzer/rrdtool-1.2 - net-analyzer/fping - dev-perl/libwww-perl - dev-perl/Net-DNS - apache2? ( >=www-apache/mod_perl-2.0.1 )" -RDEPEND="${DEPEND}" - -pkg_setup() { - if ! built_with_use '>=net-analyzer/rrdtool-1.2' perl ; then - eerror "You must build net-analyzer/rrdtool with the" - eerror "'perl' USE flag turned on!" - die "net-analyzer/rrdtool installed with 'perl' USE flag disabled" - fi - - enewgroup smokeping - enewuser smokeping -1 -1 /var/lib/smokeping smokeping -} - -src_compile() { - # There is a makefile we don't want to run so leave this here - einfo "Skip compile." -} - -src_install() { - # First move all the perl modules into the vendor lib area of Perl - perlinfo - insinto ${VENDOR_LIB} - doins lib/*.pm - insinto ${VENDOR_LIB}/Config - doins lib/Config/*.pm - insinto ${VENDOR_LIB}/Smokeping - doins lib/Smokeping/*.pm - insinto ${VENDOR_LIB}/Smokeping/matchers - doins lib/Smokeping/matchers/*.pm - insinto ${VENDOR_LIB}/Smokeping/probes - doins lib/Smokeping/probes/*.pm - insinto ${VENDOR_LIB}/Smokeping/sorters - doins lib/Smokeping/sorters/*.pm - - # Create the files in /var for rrd file storage - keepdir /var/lib/${PN}/.simg - fowners smokeping:smokeping /var/lib/${PN} - if use apache2 ; then - fowners apache:apache /var/lib/${PN}/.simg - else - fowners smokeping:smokeping /var/lib/${PN}/.simg - fi - fperms 775 /var/lib/${PN} /var/lib/${PN}/.simg - - # Install the CGI webserver script - exeinto /var/www/localhost/perl - newexe htdocs/${PN}.cgi.dist ${PN}.pl - dosed 's:^use lib:#use lib:g' /var/www/localhost/perl/${PN}.pl - dosed 's:/usr/sepp/bin/speedy:/usr/bin/perl:' /var/www/localhost/perl/${PN}.pl - dosed 's:/home/oetiker/data/projects/AADJ-smokeping/dist/etc/config:/etc/smokeping:' \ - /var/www/localhost/perl/${PN}.pl - - # Install AJAX scripts - insinto /var/www/localhost/perl - doins -r htdocs/cropper - - # Create the binary - newbin bin/${PN}.dist ${PN} - dosed 's:^use lib:#use lib:g' /usr/bin/${PN} - dosed 's:/usr/sepp/bin/perl-5.8.4:/usr/bin/perl:' /usr/bin/${PN} - dosed 's:etc/config.dist:/etc/smokeping:' /usr/bin/${PN} - - # Create the config files - insinto /etc - newins "${FILESDIR}/config.dist" ${PN} - newins etc/basepage.html.dist ${PN}.template - doins etc/smokemail.dist - newinitd "${FILESDIR}/${PN}.init" ${PN} - if use apache2 ; then - insinto /etc/apache2/modules.d - doins "${FILESDIR}/78_${PN}.conf" - fi -} - -pkg_postinst() { - chown smokeping:smokeping "${ROOT}/var/lib/${PN}" - chmod 755 "${ROOT}/var/lib/${PN}" - elog - elog "Four more steps are needed to get ${PN} up&running:" - elog "1) You need to edit /etc/${PN}" - elog "2) You need to edit the template at /etc/${PN}.template" - elog "3) You need to make the fping binary setuid root:" - elog " # chmod 4755 /usr/sbin/fping" - if use apache2 ; then - elog "4) Make sure to add -D PERL to APACHE2_OPTS in /etc/conf.d/apache2" - elog " and to restart apache2." - fi - elog "You can now start ${PN} with '/etc/init.d/${PN} start'." - elog -} diff --git a/net-analyzer/smokeping/smokeping-2.3.5.ebuild b/net-analyzer/smokeping/smokeping-2.3.5.ebuild deleted file mode 100644 index a663dfc65002..000000000000 --- a/net-analyzer/smokeping/smokeping-2.3.5.ebuild +++ /dev/null @@ -1,115 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/smokeping/smokeping-2.3.5.ebuild,v 1.3 2008/08/19 14:13:13 falco Exp $ - -inherit perl-module eutils - -KEYWORDS="~amd64 ~hppa ~sparc ~x86" - -DESCRIPTION="A powerful latency measurement tool." -SRC_URI="http://oss.oetiker.ch/smokeping/pub/${P}.tar.gz" -HOMEPAGE="http://oss.oetiker.ch/smokeping/" -LICENSE="GPL-2" -SLOT="0" -IUSE="apache2" - -DEPEND="dev-lang/perl - virtual/perl-libnet - >=net-analyzer/rrdtool-1.2 - net-analyzer/fping - dev-perl/libwww-perl - dev-perl/Socket6 - dev-perl/Net-DNS - apache2? ( >=www-apache/mod_perl-2.0.1 )" -RDEPEND="${DEPEND}" - -pkg_setup() { - if ! built_with_use '>=net-analyzer/rrdtool-1.2' perl ; then - eerror "You must build net-analyzer/rrdtool with the" - eerror "'perl' USE flag turned on!" - die "net-analyzer/rrdtool installed with 'perl' USE flag disabled" - fi - - enewgroup smokeping - enewuser smokeping -1 -1 /var/lib/smokeping smokeping -} - -src_compile() { - # There is a makefile we don't want to run so leave this here - einfo "Skip compile." -} - -src_install() { - # First move all the perl modules into the vendor lib area of Perl - perlinfo - insinto ${VENDOR_LIB} - doins lib/*.pm - insinto ${VENDOR_LIB}/Config - doins lib/Config/*.pm - insinto ${VENDOR_LIB}/Config/Grammar - doins lib/Config/Grammar/*.pm - insinto ${VENDOR_LIB}/Smokeping - doins lib/Smokeping/*.pm - insinto ${VENDOR_LIB}/Smokeping/matchers - doins lib/Smokeping/matchers/*.pm - insinto ${VENDOR_LIB}/Smokeping/probes - doins lib/Smokeping/probes/*.pm - insinto ${VENDOR_LIB}/Smokeping/sorters - doins lib/Smokeping/sorters/*.pm - - # Create the files in /var for rrd file storage - keepdir /var/lib/${PN}/.simg - fowners smokeping:smokeping /var/lib/${PN} - if use apache2 ; then - fowners apache:apache /var/lib/${PN}/.simg - else - fowners smokeping:smokeping /var/lib/${PN}/.simg - fi - fperms 775 /var/lib/${PN} /var/lib/${PN}/.simg - - # Install the CGI webserver script - exeinto /var/www/localhost/perl - newexe htdocs/${PN}.cgi.dist ${PN}.pl - dosed 's:^use lib:#use lib:g' /var/www/localhost/perl/${PN}.pl - dosed 's:/usr/sepp/bin/speedy:/usr/bin/perl:' /var/www/localhost/perl/${PN}.pl - dosed 's:/home/oetiker/data/projects/AADJ-smokeping/dist/etc/config:/etc/smokeping:' \ - /var/www/localhost/perl/${PN}.pl - - # Install AJAX scripts - insinto /var/www/localhost/perl - doins -r htdocs/cropper - - # Create the binary - newbin bin/${PN}.dist ${PN} - dosed 's:^use lib:#use lib:g' /usr/bin/${PN} - dosed 's:/usr/sepp/bin/perl-5.8.4:/usr/bin/perl:' /usr/bin/${PN} - dosed 's:etc/config.dist:/etc/smokeping:' /usr/bin/${PN} - - # Create the config files - insinto /etc - newins "${FILESDIR}/config.dist" ${PN} - newins etc/basepage.html.dist ${PN}.template - doins etc/smokemail.dist - newinitd "${FILESDIR}/${PN}.init" ${PN} - if use apache2 ; then - insinto /etc/apache2/modules.d - doins "${FILESDIR}/78_${PN}.conf" - fi -} - -pkg_postinst() { - chown smokeping:smokeping "${ROOT}/var/lib/${PN}" - chmod 755 "${ROOT}/var/lib/${PN}" - elog - elog "Four more steps are needed to get ${PN} up&running:" - elog "1) You need to edit /etc/${PN}" - elog "2) You need to edit the template at /etc/${PN}.template" - elog "3) You need to make the fping binary setuid root:" - elog " # chmod 4755 /usr/sbin/fping" - if use apache2 ; then - elog "4) Make sure to add -D PERL to APACHE2_OPTS in /etc/conf.d/apache2" - elog " and to restart apache2." - fi - elog "You can now start ${PN} with '/etc/init.d/${PN} start'." - elog -} diff --git a/net-analyzer/smokeping/smokeping-2.4.2-r3.ebuild b/net-analyzer/smokeping/smokeping-2.4.2-r3.ebuild index b5d14c827587..d062cb4814d9 100644 --- a/net-analyzer/smokeping/smokeping-2.4.2-r3.ebuild +++ b/net-analyzer/smokeping/smokeping-2.4.2-r3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $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 $ +# $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 $ EAPI="2" @@ -30,6 +30,7 @@ DEPEND="dev-lang/perl speedy? ( dev-perl/SpeedyCGI ) !apache2? ( virtual/httpd-cgi ) apache2? ( >=www-apache/mod_perl-2.0.1 ) + !dev-perl/Config-Grammar !dev-perl/JSON !perl-core/JSON-PP" diff --git a/net-analyzer/smokeping/smokeping-2.4.2-r4.ebuild b/net-analyzer/smokeping/smokeping-2.4.2-r4.ebuild new file mode 100644 index 000000000000..8ce757bcb009 --- /dev/null +++ b/net-analyzer/smokeping/smokeping-2.4.2-r4.ebuild @@ -0,0 +1,167 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $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 $ + +EAPI="2" + +inherit perl-module eutils + +DESCRIPTION="A powerful latency measurement tool." +HOMEPAGE="http://oss.oetiker.ch/smokeping/" +SRC_URI="http://oss.oetiker.ch/smokeping/pub/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="apache2 speedy" + +# dev-perl/JSON-1.x is bundled and is incompatible with version 2.x wich is in +# the tree. See http://bugs.gentoo.org/show_bug.cgi?id=260170#c2 +DEPEND="dev-lang/perl + virtual/perl-libnet + >=net-analyzer/rrdtool-1.2[perl] + >=net-analyzer/fping-2.4_beta2-r2 + dev-perl/Config-Grammar + dev-perl/Digest-HMAC + dev-perl/libwww-perl + dev-perl/CGI-Session + >=dev-perl/SNMP_Session-1.13 + >=dev-perl/Socket6-0.20 + dev-perl/Net-DNS + speedy? ( dev-perl/SpeedyCGI ) + !apache2? ( virtual/httpd-cgi ) + apache2? ( >=www-apache/mod_perl-2.0.1 )" + +RDEPEND="${DEPEND}" + +pkg_setup() { + enewgroup smokeping + enewuser smokeping -1 -1 /var/lib/smokeping smokeping +} + +src_prepare() { + rm -rf lib/Digest # provided by dev-perl/Digest-HMAC + rm -rf lib/CGI # provided by dev-perl/CGI-Session + rm -rf lib/Config # provided by dev-perl/Config-Grammar + rm -r lib/{BER.pm,SNMP_Session.pm,SNMP_util.pm} # dev-perl/SNMP_Session + rm qooxdoo/qooxdoolink + + PERL5SMOKEPING="/usr/share/${PN}/perl5" + sed -i "/^use strict;/a\use lib '${PERL5SMOKEPING}';" \ + "${S}"/lib/Qooxdoo/JSONRPC.pm || die +} + +src_compile() { + # There is a makefile we don't want to run so leave this here + einfo "Skip compile." +} + +src_install() { + # Install JSON-1 outside of perl's @INC path + insinto ${PERL5SMOKEPING} + doins lib/JSON.pm + insinto ${PERL5SMOKEPING}/JSON + doins -r lib/JSON/* + rm -r lib/JSON lib/JSON.pm + # Install the remaining perl modules into the vendor lib area of Perl + perlinfo + insinto ${VENDOR_LIB}/ + doins -r lib/* + + # Install the CGI webserver scripts + sed 's:^use lib:#use lib:g' -i htdocs/*.cgi.dist + if use speedy; then + sed '1{s:/usr/[^ ]*:/usr/bin/speedy:}' -i htdocs/*.cgi.dist + else + sed '1{s:/usr/[^ ]*:/usr/bin/perl:}' -i htdocs/*.cgi.dist + fi + sed 's:/home/oetiker.*/config.dist:/etc/smokeping/config:' \ + -i htdocs/*.cgi.dist + exeinto /var/www/localhost/perl/ + newexe htdocs/smokeping.cgi.dist smokeping.pl || die + exeinto /var/www/localhost/smokeping + newexe htdocs/tr.cgi.dist tr.cgi || die + rm htdocs/{tr,smokeping}.cgi.dist + + # Install AJAX scripts + insinto /var/www/localhost/smokeping + doins -r htdocs/* || die + + # Create the smokeping binaries + for bin in ${PN} tSmoke; do + newbin bin/${bin}.dist ${bin} + dosed 's:^use lib:#use lib:g' /usr/bin/${bin} + dosed 's:etc/config.dist:/etc/smokeping/config:' /usr/bin/${bin} + done + + # Create the config files + insinto /etc/${PN} + for file in etc/*; do + config=${file/.dist} + newins ${file} ${config#*/} + done + sed -e '/^imgcache/{s:\(^imgcache[ \t]*=\).*:\1 /var/lib/smokeping/.simg:}' \ + -e '/^imgurl/{s:\(^imgurl[ \t]*=\).*:\1 ../.simg:}' \ + -e '/^datadir/{s:\(^datadir[ \t]*=\).*:\1 /var/lib/smokeping:}' \ + -e '/^piddir/{s:\(^piddir[ \t]*=\).*:\1 /var/run/smokeping:}' \ + -e '/^cgiurl/{s#\(^cgiurl[ \t]*=\).*#\1 http://some.place.xyz/perl/smokeping.pl#}' \ + -e '/^smokemail/{s:\(^smokemail[ \t]*=\).*:\1 /etc/smokeping/smokemail:}' \ + -e '/^tmail/{s:\(^tmail[ \t]*=\).*:\1 /etc/smokeping/tmail:}' \ + -e '/^secrets/{s:\(^secrets[ \t]*=\).*:\1 /etc/smokeping/smokeping_secrets:}' \ + -e '/^template/{s:\(^template[ \t]*=\).*:\1 /etc/smokeping/basepage.html:}' \ + -i "${D}/etc/${PN}/config" || die + sed -e '/^<script/{s:cropper/:/cropper/:}' -i "${D}/etc/${PN}/basepage.html" + fperms 700 /etc/${PN}/smokeping_secrets + + newinitd "${FILESDIR}/${PN}.init.2" ${PN} || die + + if use apache2 ; then + insinto /etc/apache2/modules.d + doins "${FILESDIR}/79_${PN}.conf" || die + fi + + # Create the files in /var for rrd file storage + keepdir /var/lib/${PN}/.simg + fowners smokeping:smokeping /var/lib/${PN} + if use apache2 ; then + fowners apache:apache /var/lib/${PN}/.simg + else + fowners smokeping:smokeping /var/lib/${PN}/.simg + fi + fperms 775 /var/lib/${PN} /var/lib/${PN}/.simg + + # Install documentation. + insinto "/usr/share/doc/${PF}" + doins -r doc/examples + dodoc CHANGES CONTRIBUTORS README TODO || die + doman doc/{smokeping{.1,.cgi.1,_config.5},Smokeping.3,smokeping_examples.7} \ + doc/{smokeping_{extend,install,master_slave,upgrade}.7,smoketrace.7} \ + doc/{tSmoke.1,Smokeping/Smokeping::{Examples,RRDtools}.3} || die +} + +pkg_postinst() { + chown smokeping:smokeping "${ROOT}/var/lib/${PN}" + chmod 755 "${ROOT}/var/lib/${PN}" + elog + elog "Additional steps are needed to get ${PN} up & running:" + elog + elog "First you need to edit /etc/${PN}/config. After that" + elog "you can start ${PN} with '/etc/init.d/${PN} start'." + elog + if use apache2 ; then + elog "For web interface make sure to add -D PERL to APACHE2_OPTS in" + elog "/etc/conf.d/apache2 and to restart apache2. To access site from" + elog "other places check permissions at /etc/apache2/modules.d/79_${PN}.conf" + elog + else + elog "For web interface configure your web server to serve perl cgi" + elog "script at /var/www/localhost/perl/" + fi + elog "To make cropper working you just need to copy /var/www/localhost/smokeping/cropper" + elog "into you htdocs (or create symlink and allow webserver to follow symlinks)." + elog + elog "We install all files required for smoketrace, but you have to" + elog "configure it manually. Just read 'man smoketrace'. Also you need to" + elog "'emerge traceroute'." + elog +} |