aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/cricket/Makefile
diff options
context:
space:
mode:
authorPete Fritchman <petef@FreeBSD.org>2002-06-08 22:25:20 +0000
committerPete Fritchman <petef@FreeBSD.org>2002-06-08 22:25:20 +0000
commit02e74a11f278bda4249040bf6fefdad66e524791 (patch)
tree5207cdfb36a81b578325515e7ba710acf722ab69 /net-mgmt/cricket/Makefile
parent907d1429737b0e840c30dd5982033aa5b0d7f922 (diff)
downloadports-02e74a11f278bda4249040bf6fefdad66e524791.tar.gz
ports-02e74a11f278bda4249040bf6fefdad66e524791.zip
- update to 1.0.4.p1
- remove NO_PACKAGE; the customization isn't done at build/install time - remove the old patches & configure script; use cricket's own scripts to tell it our version of perl. - revamp the install so it matches the docs more closely: * things go in ${PREFIX}/cricket * scripts go in cricket/cricket-${PORTVERSION}, cricket/cricket symlink created for convenience * cricket/cricket-{config,data,logs} created - create a "cricket" user to run the collectors - use pkg-message instead of ${ECHO}'ing things in post-install PR: 38932 (with a few modifications) Submitted by: Janos Mohacsi <janos.mohacsi@dante.org.uk>
Notes
Notes: svn path=/head/; revision=60915
Diffstat (limited to 'net-mgmt/cricket/Makefile')
-rw-r--r--net-mgmt/cricket/Makefile45
1 files changed, 30 insertions, 15 deletions
diff --git a/net-mgmt/cricket/Makefile b/net-mgmt/cricket/Makefile
index d72744e40933..7700a7e78e83 100644
--- a/net-mgmt/cricket/Makefile
+++ b/net-mgmt/cricket/Makefile
@@ -6,10 +6,10 @@
#
PORTNAME= cricket
-PORTVERSION= 1.0.2
+PORTVERSION= 1.0.4.p1
CATEGORIES= net
-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
-MASTER_SITE_SUBDIR= ${PORTNAME}
+MASTER_SITES= http://cricket.sourceforge.net/download/beta/
+DISTNAME= ${PORTNAME}-${PORTVERSION:S/.p/-pre/}
MAINTAINER= ports@FreeBSD.org
@@ -23,22 +23,37 @@ RUN_DEPENDS= ${SITE_PERL}/SNMP_Session.pm:${PORTSDIR}/net/p5-SNMP_Session \
SITE_PERL= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}
SITE_PERL_ARCH= ${LOCALBASE}/lib/perl5/site_perl/${PERL_VER}/${PERL_ARCH}
-NO_PACKAGE= "needs customization"
+HAS_CONFIGURE= yes
USE_PERL5= yes
-SCRIPTS_ENV+= PERL5=${PERL5}
-
-do-build:
+NO_BUILD= yes
+PKGMESSAGE= ${WRKDIR}/pkg-message
+PLIST_SUB+= VERSION=${PORTVERSION}
+CRICKET_USER= cricket
+CRICKET_GROUP= www
do-install:
- @${MKDIR} -m 755 ${PREFIX}/cricket
- @${CP} -R ${WRKSRC}/* ${PREFIX}/cricket
- @find ${PREFIX}/cricket -name \*.orig -or -name \*.bak | xargs ${RM} -f
+ @${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
+ @${MKDIR} -m 755 ${PREFIX}/cricket/cricket-${PORTVERSION}
+ @${CP} -R ${WRKSRC}/* ${PREFIX}/cricket/cricket-${PORTVERSION}
+ @find ${PREFIX}/cricket/cricket-${PORTVERSION} -name \*.orig -or \
+ -name \*.bak | xargs ${RM} -f
+ ${CHOWN} -R ${CRICKET_USER}:${CRICKET_GROUP} ${PREFIX}/cricket
+ @if [ -L ${PREFIX}/cricket/cricket ]; then \
+ ${ECHO} "Updating ${PREFIX}/cricket/cricket symbolic link" ; \
+ ${RM} ${PREFIX}/cricket/cricket ; \
+ fi
+ ${LN} -s ${PREFIX}/cricket/cricket-${PORTVERSION} \
+ ${PREFIX}/cricket/cricket
+ @if [ -f ${LOCALBASE}/cricket/compile ] ; then \
+ ${ECHO} "You should migrate manually to use new cricket" ; \
+ ${ECHO} "installation scheme." ; \
+ fi
post-install:
- @${ECHO} ""
- @${ECHO} "Cricket has been installed in ${PREFIX}/cricket. You'll find"
- @${ECHO} "executables and configfiles there. Please take a look at"
- @${ECHO} "http://cricket.sourceforge.net/. The documentation can"
- @${ECHO} "be found in ${PREFIX}/cricket/doc/ too."
+ @${SED} -e "s:%%PREFIX%%:${PREFIX}:g" ${WRKSRC}/cricket-conf.pl.sample \
+ >${PREFIX}/etc/cricket-conf.pl.dist
+ @${SED} -e 's,%%PREFIX%%,${PREFIX},' ${FILESDIR}/pkg-message.in > \
+ ${PKGMESSAGE}
+ @${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>