From cc09a7e03ca54e096f15db33038792d3a6209d44 Mon Sep 17 00:00:00 2001 From: pav Date: Fri, 28 May 2004 17:13:55 +0000 Subject: - Teach to respect hier(7): - CVS repository went to /usr/local/var/rancid/CVS - config files went to /usr/local/etc/rancid - the man pages are in /usr/local/man - rancid binaries are installed in: /usr/local/libexec/rancid PR: ports/67259 Submitted by: Janos Mohacsi (maintainer) --- net-mgmt/rancid/Makefile | 37 +++++++++--- net-mgmt/rancid/pkg-message | 2 +- net-mgmt/rancid/pkg-plist | 141 ++++++++++++++++++++++---------------------- 3 files changed, 98 insertions(+), 82 deletions(-) (limited to 'net-mgmt/rancid') diff --git a/net-mgmt/rancid/Makefile b/net-mgmt/rancid/Makefile index 3c834ec446f0..347978c990fb 100644 --- a/net-mgmt/rancid/Makefile +++ b/net-mgmt/rancid/Makefile @@ -7,9 +7,9 @@ PORTNAME= rancid PORTVERSION= 2.3 +PORTREVISION= 1 CATEGORIES= net-mgmt MASTER_SITES= ftp://ftp.shrubbery.net/pub/rancid/ -#DISTNAME= ${PORTNAME}-2.3.rc1 MAINTAINER= janos.mohacsi@bsd.hu COMMENT= Really Awesome New Cisco confIg Differ @@ -24,9 +24,10 @@ PKGMESSAGE= ${WRKDIR}/pkg-message USE_GMAKE= yes HAS_CONFIGURE= yes CONFIGURE_ARGS= \ - --prefix=${PREFIX}/rancid - -MANPREFIX= ${PREFIX}/rancid + --prefix=${PREFIX}/ \ + --localstatedir=${PREFIX}/var/${PORTNAME}/ \ + --bindir=${PREFIX}/libexec/${PORTNAME}/ \ + --sysconfdir=${PREFIX}/etc/${PORTNAME}/ MAN1= alogin.1 blogin.1 cat5rancid.1 clogin.1 control_rancid.1 \ cssrancid.1 elogin.1 erancid.1 f10rancid.1 flogin.1 fnrancid.1 \ @@ -40,31 +41,49 @@ MAN5= lg.conf.5 cloginrc.5 rancid.conf.5 router.db.5 OLDCONFIG_FILE1= bin/env OLDCONFIG_FILE2= util/lg/lg.conf -NEWCONFIG_FILES= etc/rancid.conf etc/lg.conf +NEWERCONFIG_FILES1= etc/rancid.conf +NEWERCONFIG_FILES2= etc/lg.conf +NEWCONFIG_FILES= rancid.conf lg.conf pre-everything:: @ ${ECHO} "Make sure your rancid repository is quit before upgrading; disable rancid cron jobs" post-install: - @ ${SED} -e "s:%%INSTDIR%%:${PREFIX}/rancid:g" pkg-message >${PKGMESSAGE} + ${LN} -s ${PREFIX}/libexec/${PORTNAME}/rancid-cvs ${PREFIX}/bin + ${LN} -s ${PREFIX}/libexec/${PORTNAME}/rancid-run ${PREFIX}/bin + @ ${SED} -e "s:%%INSTDIR%%:${PREFIX}:g" pkg-message >${PKGMESSAGE} .if !defined(BATCH) @ ${ECHO} @ ${CAT} ${PKGMESSAGE} @ ${ECHO} .endif .for file in ${NEWCONFIG_FILES} - @ if [ -f ${PREFIX}/rancid/${file} ] ; then \ + @ if [ -f ${PREFIX}/etc/${PORTNAME}/${file} ] ; then \ ${ECHO} "WARNING: *** new ${file} file is installed as ${PREFIX}/rancid/${file}.sample"; \ ${ECHO} " : *** review ${file}.sample for new/deprecated switches or install in place ${file}"; \ fi .endfor + @ if [ -f ${PREFIX}/rancid/$NEWERCONFIG_FILE1} ] ; then \ + ${ECHO} "WARNING: *** ${PREFIX}/rancid/${NEWERCONFIG_FILE1} has been replaced with "; \ + ${ECHO} " : *** ${PREFIX}/etc/${PORTNAME}/rancid.conf. Merge from sample and old file "; \ + fi + @ if [ -f ${PREFIX}/rancid/${NEWERCONFIG_FILE2} ] ; then \ + ${ECHO} "WARNING: *** ${PREFIX}/rancid/${NEWERCONFIG_FILE2} has been replaced with "; \ + ${ECHO} " : *** ${PREFIX}/etc/${PORTNAME}/lg.conf. Merge from sample and old file "; \ + fi + @ if [ -f ${PREFIX}/rancid/${NEWERCONFIG_FILE1} -o \ + -f ${PREFIX}/rancid/${NEWERCONFIG_FILE2} ] ; then \ + ${ECHO} "WARNING: *** New CVS Repository will be stored ${PREFIX}/var/${PORTNAME}/ "; \ + ${ECHO} " : *** Copy the repository if you want to keep the history "; \ + fi + @ if [ -f ${PREFIX}/rancid/${OLDCONFIG_FILE1} ] ; then \ ${ECHO} "WARNING: *** ${PREFIX}/rancid/${OLDCONFIG_FILE1} has been replaced with "; \ - ${ECHO} " : *** ${PREFIX}/rancid/etc/rancid.conf. Merge from sample and old file "; \ + ${ECHO} " : *** ${PREFIX}/etc/${PORTNAME}/rancid.conf. Merge from sample and old file "; \ fi @ if [ -f ${PREFIX}/rancid/${OLDCONFIG_FILE2} ] ; then \ ${ECHO} "WARNING: *** ${PREFIX}/rancid/${OLDCONFIG_FILE2} has been replaced with "; \ - ${ECHO} " : *** ${PREFIX}/rancid/etc/lg.conf. Merge from sample and old file "; \ + ${ECHO} " : *** ${PREFIX}/etc/${PORTNAME}/lg.conf. Merge from sample and old file "; \ fi @ if [ -f ${PREFIX}/rancid/${OLDCONFIG_FILE1} -o \ -f ${PREFIX}/rancid/${OLDCONFIG_FILE2} ] ; then \ diff --git a/net-mgmt/rancid/pkg-message b/net-mgmt/rancid/pkg-message index 517216c88a5c..2c086cfd4f36 100644 --- a/net-mgmt/rancid/pkg-message +++ b/net-mgmt/rancid/pkg-message @@ -8,4 +8,4 @@ If you would like to set up Rancid to be browseable from Web, you need to install devel/cvsweb or devel/viewcvs. For rancid looking-glass copy the actual CGIs (located at -%%INSTDIR%%/bin/{lg.cgi lgform.cgi}) to your cgi-bin. +%%INSTDIR%%/libexec/rancid/{lg.cgi lgform.cgi}) to your cgi-bin. diff --git a/net-mgmt/rancid/pkg-plist b/net-mgmt/rancid/pkg-plist index fc753236a97d..b48456650d41 100644 --- a/net-mgmt/rancid/pkg-plist +++ b/net-mgmt/rancid/pkg-plist @@ -1,72 +1,69 @@ -@exec mkdir -p %D/rancid/var -@exec chmod 775 %D/rancid/var -rancid/bin/alogin -rancid/bin/arancid -rancid/bin/blogin -rancid/bin/brancid -rancid/bin/cat5rancid -rancid/bin/clogin -rancid/bin/control_rancid -rancid/bin/cssrancid -rancid/bin/elogin -rancid/bin/erancid -rancid/bin/f10rancid -rancid/bin/flogin -rancid/bin/fnrancid -rancid/bin/francid -rancid/bin/hlogin -rancid/bin/hpuifilter -rancid/bin/hrancid -rancid/bin/htlogin -rancid/bin/htrancid -rancid/bin/jerancid -rancid/bin/jlogin -rancid/bin/jrancid -rancid/bin/lg.cgi -rancid/bin/lgform.cgi -rancid/bin/mrancid -rancid/bin/nlogin -rancid/bin/nrancid -rancid/bin/nslogin -rancid/bin/nsrancid -rancid/bin/par -rancid/bin/prancid -rancid/bin/rancid -rancid/bin/rancid-cvs -rancid/bin/rancid-fe -rancid/bin/rancid-run -rancid/bin/rivlogin -rancid/bin/rivrancid -rancid/bin/rrancid -rancid/bin/tntlogin -rancid/bin/tntrancid -rancid/bin/xrancid -rancid/bin/zrancid -rancid/etc/lg.conf.sample -rancid/etc/rancid.conf.sample -rancid/share/rancid/CHANGES -rancid/share/rancid/COPYING -rancid/share/rancid/FAQ -rancid/share/rancid/README -rancid/share/rancid/README.lg -rancid/share/rancid/README.misc -rancid/share/rancid/UPGRADING -rancid/share/rancid/cisco-load.exp -rancid/share/rancid/cisco-reload.exp -rancid/share/rancid/cloginrc.sample -rancid/share/rancid/downreport -rancid/share/rancid/getipacctg -rancid/share/rancid/index.html -rancid/share/rancid/lg.conf.sample -rancid/share/rancid/lgnotes.html -rancid/share/rancid/rancid.conf.sample -rancid/share/rancid/rtrfilter -@dirrm rancid/share/rancid -@dirrm rancid/share -@dirrm rancid/var -@dirrm rancid/etc -@dirrm rancid/bin -@dirrm rancid/man/man1 -@dirrm rancid/man/man5 -@dirrm rancid/man -@dirrm rancid +@exec mkdir -p %D/var/rancid +@exec chmod 775 %D/var/rancid +bin/rancid-cvs +bin/rancid-run +libexec/rancid/alogin +libexec/rancid/arancid +libexec/rancid/blogin +libexec/rancid/brancid +libexec/rancid/cat5rancid +libexec/rancid/clogin +libexec/rancid/control_rancid +libexec/rancid/cssrancid +libexec/rancid/elogin +libexec/rancid/erancid +libexec/rancid/f10rancid +libexec/rancid/flogin +libexec/rancid/fnrancid +libexec/rancid/francid +libexec/rancid/hlogin +libexec/rancid/hpuifilter +libexec/rancid/hrancid +libexec/rancid/htlogin +libexec/rancid/htrancid +libexec/rancid/jerancid +libexec/rancid/jlogin +libexec/rancid/jrancid +libexec/rancid/lg.cgi +libexec/rancid/lgform.cgi +libexec/rancid/mrancid +libexec/rancid/nlogin +libexec/rancid/nrancid +libexec/rancid/nslogin +libexec/rancid/nsrancid +libexec/rancid/par +libexec/rancid/prancid +libexec/rancid/rancid +libexec/rancid/rancid-cvs +libexec/rancid/rancid-fe +libexec/rancid/rancid-run +libexec/rancid/rivlogin +libexec/rancid/rivrancid +libexec/rancid/rrancid +libexec/rancid/tntlogin +libexec/rancid/tntrancid +libexec/rancid/xrancid +libexec/rancid/zrancid +etc/rancid/lg.conf.sample +etc/rancid/rancid.conf.sample +share/rancid/CHANGES +share/rancid/COPYING +share/rancid/FAQ +share/rancid/README +share/rancid/README.lg +share/rancid/README.misc +share/rancid/UPGRADING +share/rancid/cisco-load.exp +share/rancid/cisco-reload.exp +share/rancid/cloginrc.sample +share/rancid/downreport +share/rancid/getipacctg +share/rancid/index.html +share/rancid/lg.conf.sample +share/rancid/lgnotes.html +share/rancid/rancid.conf.sample +share/rancid/rtrfilter +@dirrm share/rancid +@dirrm var/rancid +@dirrm etc/rancid +@dirrm libexec/rancid -- cgit