rancid modules should use the current rancis version number, else rancid will complain about it - replace hard coded version number with @VERSION@ in cmw.pm and cmwlogin.pm - svn mv files/cmw.pm files/cmw.pm.in - svn mv files/cmwlogin.pm files/cmwlogin.pm.in fix variables used in post-install - s/NEWERCONFIG_FILES1/NEWERCONFIG_FILE1/ - s/NEWERCONFIG_FILES2/NEWERCONFIG_FILE2/ Btw. I suspect the tests from post-install should be done with a pkg-install script, else they are useless if installed via pkg Index: Makefile =================================================================== --- Makefile (revision 430709) +++ Makefile (working copy) @@ -30,8 +30,8 @@ OLDCONFIG_FILE1= bin/env OLDCONFIG_FILE2= util/lg/lg.conf -NEWERCONFIG_FILES1= etc/rancid.conf -NEWERCONFIG_FILES2= etc/lg.conf +NEWERCONFIG_FILE1= etc/rancid.conf +NEWERCONFIG_FILE2= etc/lg.conf NEWCONFIG_FILES= rancid.conf lg.conf OPTIONS_DEFINE= COMWARE SVN @@ -64,6 +64,8 @@ post-patch: .if ${PORT_OPTIONS:MCOMWARE} ${CAT} ${FILESDIR}/comware_types.conf >> ${WRKSRC}/etc/rancid.types.base + ${SED} -e 's/@VERSION@/${PORTVERSION}/g' ${FILESDIR}/cmwlogin.in > ${WRKDIR}/cmwlogin + ${SED} -e 's/@VERSION@/${PORTVERSION}/g' ${FILESDIR}/cmw.pm.in > ${WRKDIR}/cmw.pm .endif ${REINPLACE_CMD} "s|par.1|rancid-par.1|" ${WRKSRC}/man/Makefile.in ${MV} ${WRKSRC}/man/par.1 ${WRKSRC}/man/rancid-par.1 @@ -74,8 +76,8 @@ ${LN} -s ${LOCALBASE}/libexec/${PORTNAME}/rancid-cvs ${STAGEDIR}${LOCALBASE}/bin ${LN} -s ${LOCALBASE}/libexec/${PORTNAME}/rancid-run ${STAGEDIR}${LOCALBASE}/bin .if ${PORT_OPTIONS:MCOMWARE} - ${INSTALL_DATA} ${FILESDIR}/cmw.pm ${STAGEDIR}/${LOCALBASE}/lib/rancid - ${INSTALL_SCRIPT} ${FILESDIR}/cmwlogin ${STAGEDIR}/${LOCALBASE}/libexec/rancid + ${INSTALL_DATA} ${WRKDIR}/cmw.pm ${STAGEDIR}/${LOCALBASE}/lib/rancid + ${INSTALL_SCRIPT} ${WRKDIR}/cmwlogin ${STAGEDIR}/${LOCALBASE}/libexec/rancid .endif .for file in ${NEWCONFIG_FILES} @ if [ -f ${LOCALBASE}/etc/${PORTNAME}/${file} ] ; then \ Index: files/cmw.pm =================================================================== --- files/cmw.pm (revision 430709) +++ files/cmw.pm (working copy) @@ -2,7 +2,7 @@ ## ## $Id: cmw.pm.in 3000 2015-01-06 18:47:49Z heas $ ## -## rancid 3.1.99 +## rancid @VERSION@ ## Copyright (c) 1997-2015 by Terrapin Communications, Inc. ## All rights reserved. ## @@ -53,7 +53,7 @@ require(Exporter); our @ISA = qw(Exporter); -use rancid 3.1.99; +use rancid @VERSION@; our $login; Index: files/cmwlogin =================================================================== --- files/cmwlogin (revision 430709) +++ files/cmwlogin (working copy) @@ -2,7 +2,7 @@ ## ## $Id: cmwlogin 3022 2015-01-13 20:00:00Z heas $ ## -## rancid 3.1.99 +## rancid @VERSION@ ## Copyright (c) 1997-2015 by Terrapin Communications, Inc. ## All rights reserved. ## @@ -140,7 +140,7 @@ set do_passwd 0 # Version string } -V* { - send_user "rancid 3.1.99\n" + send_user "rancid @VERSION@\n" exit 0 # Enable Username } -w* {