Date: Thu, 6 Dec 2012 02:50:18 +0000 (UTC) From: Tom Judge <tj@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r308361 - in head/net-mgmt/p5-jmx4perl: . files Message-ID: <201212060250.qB62oIB8043099@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tj Date: Thu Dec 6 02:50:17 2012 New Revision: 308361 URL: http://svnweb.freebsd.org/changeset/ports/308361 Log: * Remove interacitve questions in build process * Install bundled config files Feature safe: yes Approved by: db, eadler (mentors, implicit) Added: head/net-mgmt/p5-jmx4perl/files/ head/net-mgmt/p5-jmx4perl/files/patch-Build.PL (contents, props changed) head/net-mgmt/p5-jmx4perl/files/pkg-deinstall.in (contents, props changed) head/net-mgmt/p5-jmx4perl/files/pkg-install.in (contents, props changed) Modified: head/net-mgmt/p5-jmx4perl/Makefile head/net-mgmt/p5-jmx4perl/pkg-plist Modified: head/net-mgmt/p5-jmx4perl/Makefile ============================================================================== --- head/net-mgmt/p5-jmx4perl/Makefile Thu Dec 6 02:12:52 2012 (r308360) +++ head/net-mgmt/p5-jmx4perl/Makefile Thu Dec 6 02:50:17 2012 (r308361) @@ -3,6 +3,7 @@ PORTNAME= jmx4perl PORTVERSION= 1.06 +PORTREVISION= 1 CATEGORIES= net-mgmt perl5 MASTER_SITES= ${MASTER_SITE_PERL_CPAN} MASTER_SITE_SUBDIR= ../by-authors/id/R/RO/ROLAND @@ -94,4 +95,23 @@ MAN3= JMX::Jmx4Perl.3 \ JMX::Jmx4Perl::Response.3 \ JMX::Jmx4Perl::Util.3 +ETC_FILES= common.cfg \ + glassfish.cfg \ + jboss.cfg \ + jetty.cfg \ + memory.cfg \ + metrics.cfg \ + threads.cfg \ + tomcat.cfg \ + weblogic.cfg + +SUB_FILES= pkg-install pkg-deinstall +SUB_LIST= ETC_FILES="${ETC_FILES}" + +post-install: + @${MKDIR} ${ETCDIR} +.for f in ${ETC_FILES} + ${INSTALL_DATA} ${WRKSRC}/config/${f} ${ETCDIR}/${f}.sample +.endfor + .include <bsd.port.mk> Added: head/net-mgmt/p5-jmx4perl/files/patch-Build.PL ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/p5-jmx4perl/files/patch-Build.PL Thu Dec 6 02:50:17 2012 (r308361) @@ -0,0 +1,38 @@ +--- Build.PL.orig 2012-12-06 01:52:11.000000000 +0000 ++++ Build.PL 2012-12-06 01:55:18.000000000 +0000 +@@ -73,7 +73,7 @@ + EOT + + chomp $msg; +-my $answer = y_n($msg,"y"); ++my $answer = 1; + if ($answer) { + add_reqs( + "Nagios::Plugin" => "0.27", # req +@@ -97,7 +97,7 @@ + Install 'cacti_jmx4perl' ? (y/n) + EOT + chomp $msg; +-$answer = y_n($msg,"y"); ++$answer = 1; + if ($answer) { + add_reqs( + "Nagios::Plugin" => "0.27", # req +@@ -121,7 +121,7 @@ + Install 'j4psh' ? (y/n) + EOT + chomp $msg; +-$answer = y_n($msg,"y"); ++$answer = 1; + + if ($answer) { + add_reqs( +@@ -169,7 +169,7 @@ + Install 'jolokia' ? (y/n) + EOT + chomp $msg; +-$answer = y_n($msg,"y"); ++$answer = 1; + if ($answer) { + add_reqs( + "Archive::Zip" => 0, # req Added: head/net-mgmt/p5-jmx4perl/files/pkg-deinstall.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/p5-jmx4perl/files/pkg-deinstall.in Thu Dec 6 02:50:17 2012 (r308361) @@ -0,0 +1,15 @@ +#!/bin/sh +# $FreeBSD$ + +ETCDIR=%%ETCDIR%% +ETC_FILES="%%ETC_FILES%%" + +case $2 in +DEINSTALL) + for f in ${ETC_FILES} + do + /usr/bin/cmp -s ${ETCDIR}/${f}.sample \ + ${ETCDIR}/${f} \ + && /bin/rm -f ${ETCDIR}/${f} + done +esac Added: head/net-mgmt/p5-jmx4perl/files/pkg-install.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/p5-jmx4perl/files/pkg-install.in Thu Dec 6 02:50:17 2012 (r308361) @@ -0,0 +1,15 @@ +#!/bin/sh +# $FreeBSD$ + +ETCDIR=%%ETCDIR%% +ETC_FILES="%%ETC_FILES%%" + +case $2 in +POST-INSTALL) + for f in ${ETC_FILES} + do + if [ ! -f ${ETCDIR}/${f} ]; then + /bin/cp ${ETCDIR}/${f}.sample ${ETCDIR}/${f} + fi + done +esac Modified: head/net-mgmt/p5-jmx4perl/pkg-plist ============================================================================== --- head/net-mgmt/p5-jmx4perl/pkg-plist Thu Dec 6 02:12:52 2012 (r308360) +++ head/net-mgmt/p5-jmx4perl/pkg-plist Thu Dec 6 02:50:17 2012 (r308361) @@ -52,6 +52,15 @@ bin/jolokia %%SITE_PERL%%/JMX/Jmx4Perl/Config.pm %%SITE_PERL%%/JMX/Jmx4Perl/Manual.pod %%SITE_PERL%%/JMX/Jmx4Perl.pm +%%ETCDIR%%/common.cfg.sample +%%ETCDIR%%/glassfish.cfg.sample +%%ETCDIR%%/jboss.cfg.sample +%%ETCDIR%%/jetty.cfg.sample +%%ETCDIR%%/memory.cfg.sample +%%ETCDIR%%/metrics.cfg.sample +%%ETCDIR%%/threads.cfg.sample +%%ETCDIR%%/tomcat.cfg.sample +%%ETCDIR%%/weblogic.cfg.sample @dirrm %%SITE_PERL%%/JMX/Jmx4Perl/Agent/Jolokia/Verifier @dirrm %%SITE_PERL%%/JMX/Jmx4Perl/Agent/Jolokia @dirrm %%SITE_PERL%%/JMX/Jmx4Perl/Agent @@ -62,3 +71,4 @@ bin/jolokia @dirrm %%SITE_PERL%%/JMX/Jmx4Perl/Product @dirrm %%SITE_PERL%%/JMX/Jmx4Perl @dirrmtry %%SITE_PERL%%/JMX +@dirrmtry %%ETCDIR%%
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212060250.qB62oIB8043099>