Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Feb 2003 16:00:31 -0800 (PST)
From:      "Simon 'portlint' Schubert" <corecode@corecode.ath.cx>
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   Re: ports/48001: New port: ASpath-tree a IPv6 route stability and correctness monitoring tool
Message-ID:  <200302070000.h1700V8j057049@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR ports/48001; it has been noted by GNATS.

From: "Simon 'portlint' Schubert" <corecode@corecode.ath.cx>
To: Janos Mohacsi <janos.mohacsi@bsd.hu>
Cc: mohacsi@niif.hu, FreeBSD-gnats-submit@FreeBSD.org,
	edwin@FreeBSD.org
Subject: Re: ports/48001: New port: ASpath-tree a IPv6 route stability and
 correctness monitoring tool
Date: Fri, 7 Feb 2003 00:52:32 +0100

 --=.+qfqEk+hYxJ5zo
 Content-Type: text/plain; charset=US-ASCII
 Content-Transfer-Encoding: 7bit
 
 Lately Janos Mohacsi told:
 
 > sed 's/^X//' >aspathtree/pkg-plist << 'END-of-aspathtree/pkg-plist'
 > Xaspathtree/etc/ASpath-tree.config.orig
 > Xaspathtree/etc/ASpath-tree.config.bak
 
 woo? .orig && .bak?
 [several follow]
 > END-of-aspathtree/pkg-plist
 
 can't this be squeezed into a hier(7) conformant structure, using
 ${PREFIX}/{bin,libexec(?),share}?
 
 > sed 's/^X//' >aspathtree/Makefile << 'END-of-aspathtree/Makefile'
 > X# New ports collection makefile for:    aspathtree
 > X# Date created:         06.05.2002
 > X# Whom: Janos Mohacsi <janos.mohacsi@bsd.hu>
 > X#
 > X# $FreeBSD$
 > X
 > XPORTNAME=	aspathtree
 > XPORTVERSION=	4.1
 > XCATEGORIES=	ipv6 net
 
 first category must be a real one:
 CATEGORIES=	net ipv6
 
 [...]
 > XWRKSRC=			${WRKDIR}/ASpath-tree-v4.1/
 
 use ${PORTVERSION}?
 
 > XRESTRICTED=		"not redistributable, license agreement required"
 > XNO_CDROM=	${RESTRICTED}
 > XNO_PACKAGE=	${RESTRICTED}
 
 how about:
 
 RESTRICTED=		"not redistributable, license agreement required"
 
 .include <bsd.port.pre.mk>
 
 .if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX})
 IGNORE=	"You need to read the license and disclaimer on http://carmen.ipv6.tilab.com/cgi-bin/download.pl?pkg=ASpath-tree and download ${DISTFILES} into ${DISTDIR}"
 .endif
 
 > XNO_BUILD=	yes
 > XUSE_PERL5=	yes
 > XSCRIPTS_ENV+=	PERL5=${PERL5}
 > XPKGMESSAGE=	${WRKDIR}/pkg-message
 > X
 > Xdo-fetch:
 > X	@if [ ! -f ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ]; then \
 > X	${ECHO} '======================================================='; \
 > X	${ECHO} 'You need to read the license and disclaimer on '; \
 > X	${ECHO} 'http://carmen.ipv6.tilab.com/cgi-bin/download.pl?pkg=ASpath-tree'; \
 > X	${ECHO} 'and fetch on your own.'; \
 > X	${ECHO} 'Once ${DISTFILES} has been downloaded, move it to '; \
 > X	${ECHO} '${DISTDIR} and then restart this build '; \
 > X	${ECHO} '======================================================='; \
 > X	fi
 
 obsolete if you use above version. use ${TEST} instead of [ ?
 
 > Xdo-install:
 > X	@if [ ! -d ${PREFIX}/aspathtree ]; then \
 > X		${MKDIR} ${PREFIX}/aspathtree ; fi
 
 just ${MKDIR}?
 
 > X	${CP} -R ${WRKSRC}/* ${PREFIX}/aspathtree/
 > X	${CHMOD} +x ${PREFIX}/aspathtree/update-rtree
 
 ${INSTALL_DATA},${INSTALL_SCRIPT}?
 
 > Xpost-install:
 > X	@${SED} -e "s:%%PREFIX%%:${PREFIX}:g" pkg-message >${PKGMESSAGE}
 > X.if !defined(BATCH)
 > X	@${ECHO}
 > X	@${CAT} ${PKGMESSAGE}
 > X	@${ECHO}
 > X.endif
 
 this is not the preferred way of handling pkg-message. usual way would
 be:
 
 post-install:
 	@${SED} -e 's#%%PREFIX%%#${PREFIX}#' ${PKGMESSAGE}
 
 
 and not modify ${PKGMESSAGE} at all. if you insist in your way, use
 ${.CURDIR}/pkg-message
 
 > sed 's/^X//' >aspathtree/files/patch-update-rtree << 'END-of-aspathtree/files/patch-update-rtree'
 [...]
 > X@@ -111,7 +112,7 @@
 > X 	die "ERROR in configuration file: parameter HOMEDIR not correct!\n"    unless (-e "$HOMEDIR/update-rtree");
 > X 	# enabling log to file if required
 > X 	$LOGDIR = "$HOMEDIR/log";
 > X-	unless (-e "$LOGDIR") {mkdir("$LOGDIR", 0777)};
 > X+	unless (-e "$LOGDIR") {mkdir("$LOGDIR", 0775)};
 
 better log to /var/log/...?
 
 > X 	if ($DEBUG) {
 > X 		open(LOGFILE,"> $LOGDIR/runlog.txt");
 > X 		print LOGFILE "ASpath-tree DEBUG log file\n\n";
 > X@@ -229,28 +230,28 @@
 > X 
 > X # Creating directories if required...
 
 does this mean that this program needs to run as root?
 
 > sed 's/^X//' >aspathtree/pkg-message << 'END-of-aspathtree/pkg-message'
 > XFor to configuration information please look at 
 > X%%PREFIX%%/aspathtree/readme.txt. 
 > X
 > XCopy %%PREFIX%%/aspathtree/etc/ASpath-tree.config.dist to 
 > X%%PREFIX%%/etc/ASpath-tree.config
 > Xand modify accordingly to your environment.
 
 how about installing right to ${PREFIX}/etc?
 
 > sed 's/^X//' >aspathtree/scripts/configure << 'END-of-aspathtree/scripts/configure'
 > X#!/bin/sh
 > X#
 > X# $FreeBSD$
 > X
 > XFILES_CONF="update-rtree etc/ASpath-tree.config"
 > X
 > Xfor f in $FILES_CONF ; do
 > X	mv ${WRKSRC}/${f} ${WRKSRC}/$f.bak && sed <${WRKSRC}/${f}.bak \
 > X		s+%%PATHPERLBIN%%+${PERL5}+g >${WRKSRC}/${f}
 > X	mv ${WRKSRC}/${f} ${WRKSRC}/$f.bak && sed <${WRKSRC}/${f}.bak \
 > X		s+%%PREFIX%%+${PREFIX}+g >${WRKSRC}/${f}
 > Xdone
 > X
 > X# rename to dist
 > Xmv ${WRKSRC}/etc/ASpath-tree.config ${WRKSRC}/etc/ASpath-tree.config.dist
 > END-of-aspathtree/scripts/configure
 
 how about in Makefile:
 
 USE_REINPLACE=	yes
 
 post-patch:
 	@${REINPLACE_CMD} -e 's#%%PATHPERLBIN%%#${PERL5}#; \
 		s#%%PREFIX%%#${PREFIX}#' ${WRKSRC}/update-rtree \
 			${WRKSRC}/etc/ASpath-tree-config
 
 cheers
   simon
 
 -- 
 /"\   http://corecode.ath.cx/#donate
 \ /
  \     ASCII Ribbon Campaign
 / \  Against HTML Mail and News
 
 --=.+qfqEk+hYxJ5zo
 Content-Type: application/pgp-signature
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.2.1 (FreeBSD)
 
 iD8DBQE+QvVDr5S+dk6z85oRAvDUAKC5ngQQkJ2YiHar0/4LCpEbUE1o8gCfT0W6
 8aEkis/mz+5wI/91J4k0j7s=
 =FKTT
 -----END PGP SIGNATURE-----
 
 --=.+qfqEk+hYxJ5zo--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302070000.h1700V8j057049>