* Remove interacitve questions in build process

* Install bundled config files

Feature safe:	yes
Approved by:	db, eadler (mentors, implicit)
This commit is contained in:
Tom Judge 2012-12-06 02:50:17 +00:00
parent f6246255ac
commit 83e47a6b8d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=308361
5 changed files with 98 additions and 0 deletions

View file

@ -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>

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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%%