From 1b7f0d246f2f256fabb26f4b3db46a119b6f5945 Mon Sep 17 00:00:00 2001 From: wiz Date: Fri, 16 Feb 2001 13:06:17 +0000 Subject: Change COMMENT handling: COMMENTs are now a variable in the Makefile instead of a pkg/COMMENT file. The COMMENT var should be in the maintainer block after the homepage. Modify bsd.pkg.mk, pkglint, url2pkg, and port2pkg (last one untested) for the new behaviour. Document new state in Packages.txt. This should save lots of inodes, and lots of time when untarring/updating. Idea by Alistair Crooks. For the time being, accept pkg/COMMENT instead of a COMMENT var to avoid a flag day. --- pkgtools/pkglint/Makefile | 4 +-- pkgtools/pkglint/files/pkglint.pl | 53 +++++++++++++++++++------------------ pkgtools/port2pkg/Makefile | 4 +-- pkgtools/port2pkg/files/port2pkg.pl | 10 ++++++- pkgtools/url2pkg/Makefile | 4 +-- pkgtools/url2pkg/files/url2pkg | 8 +++--- 6 files changed, 45 insertions(+), 38 deletions(-) (limited to 'pkgtools') diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile index 405ffb84639..492bcbd1bf2 100644 --- a/pkgtools/pkglint/Makefile +++ b/pkgtools/pkglint/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.77 2001/01/29 10:48:09 abs Exp $ +# $NetBSD: Makefile,v 1.78 2001/02/16 13:06:19 wiz Exp $ # -DISTNAME= pkglint-2.36 +DISTNAME= pkglint-2.37 CATEGORIES= pkgtools devel MASTER_SITES= # empty DISTFILES= # empty diff --git a/pkgtools/pkglint/files/pkglint.pl b/pkgtools/pkglint/files/pkglint.pl index b64a83042ae..96def7e1c0b 100644 --- a/pkgtools/pkglint/files/pkglint.pl +++ b/pkgtools/pkglint/files/pkglint.pl @@ -12,7 +12,7 @@ # Freely redistributable. Absolutely no warranty. # # From Id: portlint.pl,v 1.64 1998/02/28 02:34:05 itojun Exp -# $NetBSD: pkglint.pl,v 1.38 2001/01/26 13:16:52 wiz Exp $ +# $NetBSD: pkglint.pl,v 1.39 2001/02/16 13:06:19 wiz Exp $ # # This version contains some changes necessary for NetBSD packages # done by Hubert Feyrer and @@ -158,9 +158,8 @@ if (! -f "$portdir/Makefile") { # # check for files. # -@checker = ("$pkgdir/COMMENT", "$pkgdir/DESCR"); -%checker = ("$pkgdir/COMMENT", 'checkdescr', - "$pkgdir/DESCR", 'checkdescr'); +@checker = ("$pkgdir/DESCR"); +%checker = ("$pkgdir/DESCR", 'checkdescr'); if ($extrafile) { foreach $i ((<$portdir/$scriptdir/*>, <$portdir/$pkgdir/*>)) { @@ -232,6 +231,9 @@ if (-e <$portdir/$md5file> ) { &perror("WARN: no $portdir/$md5file file. Please run 'make makesum'."); } } +if (-e <$pkgdir/COMMENT> ) { + &perror("FATAL: pkg/COMMENT is deprecated -- please use a COMMENT variable instead."); +} if (! -f "$portdir/$pkgdir/PLIST" and ! -f "$portdir/$pkgdir/PLIST-mi" and ! $seen_PLIST_SRC @@ -261,14 +263,13 @@ if ($err || $warn) { exit $err; # -# pkg/COMMENT, pkg/DESCR +# pkg/DESCR # sub checkdescr { local($file) = @_; - local(%maxchars) = ('COMMENT', 70, 'DESCR', 80); - local(%maxlines) = ('COMMENT', 1, 'DESCR', 24); - local(%errmsg) = ('COMMENT', "must be one-liner", - 'DESCR', "exceeds $maxlines{'DESCR'} ". + local(%maxchars) = ('DESCR', 80); + local(%maxlines) = ('DESCR', 24); + local(%errmsg) = ('DESCR', "exceeds $maxlines{'DESCR'} ". "lines, make it shorter if possible"); local($longlines, $linecnt, $tmp) = (0, 0, ""); @@ -295,19 +296,6 @@ sub checkdescr { "other local characters. $file should be ". "plain ascii file."); } - if ($shortname eq 'COMMENT') { - if ($tmp =~ /\.$/i) { - &perror("WARN: $file should not end with". - " a '.' (period)."); - } - if ($tmp =~ /^(a|an) /i) { - &perror("WARN: $file should not begin with '$1 '."); - } - if ($tmp =~ /^\s/ || $tmp =~ /\s\n$/) { - &perror("WARN: $file should not not have any leading". - " or trailing whitespace."); - } - } close(IN); } @@ -651,7 +639,7 @@ sub readmakefile { sub checkmakefile { local($file) = @_; local($rawwhole, $whole, $idx, @sections); - local($tmp); + local($tmp, $tmp2); local($i, $j, $k, $l); local(@varnames) = (); local($distfiles, $pkgname, $distname, $extractsufx) = ('', '', '', ''); @@ -1137,9 +1125,9 @@ EOF @tocheck=split(/\s+/, <) { + chomp; + print PKG "COMMENT=\t$1\n"; + } + close(COMMENT); + unlink("$pkgdir/pkg/COMMENT"); } elsif ($noportdocs || /^\.if.*NOPORTDOCS/) { if (/^\.if/) { $noportdocs++; diff --git a/pkgtools/url2pkg/Makefile b/pkgtools/url2pkg/Makefile index 4e7c66459c9..94b0d1824f4 100644 --- a/pkgtools/url2pkg/Makefile +++ b/pkgtools/url2pkg/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.11 2001/01/29 09:57:41 abs Exp $ +# $NetBSD: Makefile,v 1.12 2001/02/16 13:06:19 wiz Exp $ # -DISTNAME= url2pkg-1.14 +DISTNAME= url2pkg-1.15 CATEGORIES= pkgtools sysutils MASTER_SITES= # Nothing DISTFILES= # Nothing diff --git a/pkgtools/url2pkg/files/url2pkg b/pkgtools/url2pkg/files/url2pkg index 85cfa84924c..6c56af5e948 100755 --- a/pkgtools/url2pkg/files/url2pkg +++ b/pkgtools/url2pkg/files/url2pkg @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: url2pkg,v 1.14 2001/01/28 17:30:20 hubertf Exp $ +# $NetBSD: url2pkg,v 1.15 2001/02/16 13:06:20 wiz Exp $ # # url2pkg # (c) 1999 Hubert Feyrer @@ -74,6 +74,7 @@ if [ ! -f w*/.extract_done ]; then echo "" echo "MAINTAINER= $email_maintainer" echo "HOMEPAGE= " + echo "COMMENT= " echo "" echo '.include "../../mk/bsd.pkg.mk"' ) >Makefile @@ -133,13 +134,10 @@ echo "" echo "Contents of "`echo w*`"/${wrksrc}:" ls -la w*/$wrksrc -if [ ! -f pkg/COMMENT ]; then - touch pkg/COMMENT -fi if [ ! -f pkg/DESCR ]; then touch pkg/DESCR fi echo "" -echo "Don't forget to fill in pkg/COMMENT and pkg/DESCR when you're done." +echo "Don't forget to fill in the COMMENT variable and pkg/DESCR when you're done." echo "" echo "Good luck! (See pkgsrc/Packages.txt for some more help :-)" -- cgit v1.2.3