aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt
diff options
context:
space:
mode:
authortj <tj@FreeBSD.org>2012-12-06 10:50:17 +0800
committertj <tj@FreeBSD.org>2012-12-06 10:50:17 +0800
commitbf5642a555a3ede8f59cdd9aec5715f6b034ab49 (patch)
tree542b967158efb2aa98f46c8286dbc867e885324b /net-mgmt
parent49440bdf1bd9e3940f363b543877a184197256db (diff)
downloadfreebsd-ports-gnome-bf5642a555a3ede8f59cdd9aec5715f6b034ab49.tar.gz
freebsd-ports-gnome-bf5642a555a3ede8f59cdd9aec5715f6b034ab49.tar.zst
freebsd-ports-gnome-bf5642a555a3ede8f59cdd9aec5715f6b034ab49.zip
* Remove interacitve questions in build process
* Install bundled config files Feature safe: yes Approved by: db, eadler (mentors, implicit)
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/p5-jmx4perl/Makefile20
-rw-r--r--net-mgmt/p5-jmx4perl/files/patch-Build.PL38
-rw-r--r--net-mgmt/p5-jmx4perl/files/pkg-deinstall.in15
-rw-r--r--net-mgmt/p5-jmx4perl/files/pkg-install.in15
-rw-r--r--net-mgmt/p5-jmx4perl/pkg-plist10
5 files changed, 98 insertions, 0 deletions
diff --git a/net-mgmt/p5-jmx4perl/Makefile b/net-mgmt/p5-jmx4perl/Makefile
index bc5e6c3cb86c..9df165aa61af 100644
--- a/net-mgmt/p5-jmx4perl/Makefile
+++ b/net-mgmt/p5-jmx4perl/Makefile
@@ -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>
diff --git a/net-mgmt/p5-jmx4perl/files/patch-Build.PL b/net-mgmt/p5-jmx4perl/files/patch-Build.PL
new file mode 100644
index 000000000000..de067a2cf9f4
--- /dev/null
+++ b/net-mgmt/p5-jmx4perl/files/patch-Build.PL
@@ -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
diff --git a/net-mgmt/p5-jmx4perl/files/pkg-deinstall.in b/net-mgmt/p5-jmx4perl/files/pkg-deinstall.in
new file mode 100644
index 000000000000..9cf88a64d8ad
--- /dev/null
+++ b/net-mgmt/p5-jmx4perl/files/pkg-deinstall.in
@@ -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
diff --git a/net-mgmt/p5-jmx4perl/files/pkg-install.in b/net-mgmt/p5-jmx4perl/files/pkg-install.in
new file mode 100644
index 000000000000..c6e1f794875f
--- /dev/null
+++ b/net-mgmt/p5-jmx4perl/files/pkg-install.in
@@ -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
diff --git a/net-mgmt/p5-jmx4perl/pkg-plist b/net-mgmt/p5-jmx4perl/pkg-plist
index 47a575bcd685..1014a752e733 100644
--- a/net-mgmt/p5-jmx4perl/pkg-plist
+++ b/net-mgmt/p5-jmx4perl/pkg-plist
@@ -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%%