Date: Sun, 2 May 1999 15:54:03 +0200 From: Eivind Eklund <eivind@freebsd.org> To: ports@freebsd.org Subject: Possible bsd.port.mk addition Message-ID: <19990502155403.A29201@bitbox.follo.net>
next in thread | raw e-mail | index | archive | help
I just found myself about to hack on the code for a port, and setting up a cvs repository for it in order to be able to work in a reasonably comfortable environment. After I was finished with my hacking (I ended up with just doing a minor patch; it was less work than I'd anticipated) it struck me that this could easily be automated and would probably be useful. Below is a simple patch to automatically create a cvs repository and check out from it from the hopefully relevant part of the port: Index: bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.311 diff -u -r1.311 bsd.port.mk --- bsd.port.mk 1999/04/28 06:20:12 1.311 +++ bsd.port.mk 1999/05/02 13:48:38 @@ -2439,6 +2439,22 @@ fi .endif +.if !target(cvs) +cvs: ${EXTRACT_COOKIE} + @if [ -e ${PATCH_COOKIE} ]; then \ + echo "Cannot make cvs repo after patching;" \ + "'make clean' and try again'" ; \ + exit 1 ; \ + fi + @(export CVSROOT=${.OBJDIR}/repo ; \ + if [ ! -e $${CVSROOT} ]; then \ + cvs -d $${CVSROOT} init ; \ + fi ; \ + (cd ${WRKSRC} && cvs -d $${CVSROOT} import -m'Clean import' src \ + FOO V`date -u +%Y%m%d%H%M%S`); \ + cvs -d $${CVSROOT} checkout src) +.endif + # Depend is generally meaningless for arbitrary ports, but if someone wants # one they can override this. This is just to catch people who've gotten into # the habit of typing `make depend all install' as a matter of course. There are a lot of improvements that could be made beyond this simple patch; it would, for instance, be nice to be able to use the repo or src area as the "distfile" instead of using the tarball (but you'd want to be able use the tarball, too, in order to be able to import new versions). I've not gone into those areas; I expect the members of the ports list to have more experience with different ports than I do, and thus be more easily able to judge what they want in order to work efficiently. Eivind. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990502155403.A29201>