summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>1999-12-06 23:40:55 +0000
committerabs <abs@pkgsrc.org>1999-12-06 23:40:55 +0000
commitece830ebfef8c8675dc172996962f83d17f6130d (patch)
tree366dc5fdbad28e098ff22f5c44013ec22bf5af9a
parent52deb13b482a30dc93f08c9caa0ec57938e04cc9 (diff)
downloadpkgsrc-ece830ebfef8c8675dc172996962f83d17f6130d.tar.gz
Add total number of packages to the category README.html
-rw-r--r--mk/bsd.pkg.subdir.mk15
-rw-r--r--templates/README.category7
2 files changed, 13 insertions, 9 deletions
diff --git a/mk/bsd.pkg.subdir.mk b/mk/bsd.pkg.subdir.mk
index 7743038156d..34021ea190c 100644
--- a/mk/bsd.pkg.subdir.mk
+++ b/mk/bsd.pkg.subdir.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.subdir.mk,v 1.31 1999/07/09 13:15:24 agc Exp $
+# $NetBSD: bsd.pkg.subdir.mk,v 1.32 1999/12/06 23:40:55 abs Exp $
# Derived from: FreeBSD Id: bsd.port.subdir.mk,v 1.19 1997/03/09 23:10:56 wosch Exp
# from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91
#
@@ -161,6 +161,7 @@ README.html: .PRECIOUS
.endif
.endfor
@${SORT} -t '>' +3 -4 $@.tmp > $@.tmp2
+ @${AWK} awk '{ ++n } END { print n-1 }' < $@.tmp2 > $@.tmp4
.if exists(${.CURDIR}/pkg/DESCR)
@${HTMLIFY} ${.CURDIR}/pkg/DESCR > $@.tmp3
.else
@@ -168,20 +169,22 @@ README.html: .PRECIOUS
.endif
@cat ${README} | \
${SED} -e 's/%%CATEGORY%%/'"`${BASENAME} ${.CURDIR}`"'/g' \
+ -e '/%%NUMITEMS%%/r$@.tmp4' \
+ -e '/%%NUMITEMS%%/d' \
-e '/%%DESCR%%/r$@.tmp3' \
-e '/%%DESCR%%/d' \
-e '/%%SUBDIR%%/r$@.tmp2' \
-e '/%%SUBDIR%%/d' \
- > $@.tmp4
- @if cmp -s $@.tmp4 $@.BAK ; then \
+ > $@.tmp5
+ @if cmp -s $@.tmp5 $@.BAK ; then \
${MV} $@.BAK $@ ; \
- ${RM} $@.tmp4 ; \
+ ${RM} $@.tmp5 ; \
else \
${ECHO_MSG} "===> Creating README.html for ${_THISDIR_}${.CURDIR:T}" ; \
- ${MV} $@.tmp4 $@ ; \
+ ${MV} $@.tmp5 $@ ; \
${RM} -f $@.BAK ; \
fi
- @${RM} -f $@.tmp $@.tmp2 $@.tmp3
+ @${RM} -f $@.tmp $@.tmp2 $@.tmp3 $@.tmp4
.for subdir in ${SUBDIR}
@cd ${subdir} && ${MAKE} "_THISDIR_=${_THISDIR_}${.CURDIR:T}/" ${_README_TYPE}
.endfor
diff --git a/templates/README.category b/templates/README.category
index f84b87e1e63..bbfc3deb65c 100644
--- a/templates/README.category
+++ b/templates/README.category
@@ -1,4 +1,4 @@
-<!-- $NetBSD: README.category,v 1.7 1999/12/06 23:06:45 abs Exp $ -->
+<!-- $NetBSD: README.category,v 1.8 1999/12/06 23:40:56 abs Exp $ -->
<html>
<head>
<title>The NetBSD Packages Collection: %%CATEGORY%%</title>
@@ -16,8 +16,9 @@
<p>
%%DESCR%%
-<p>Here are the one-line descriptions for each of the items
-in this directory:
+<p>Here are the one-line descriptions for each of the items (
+%%NUMITEMS%%
+) in this directory:
<p><hr noshade>
<p><table>