diff options
author | hubertf <hubertf> | 2000-11-09 23:46:29 +0000 |
---|---|---|
committer | hubertf <hubertf> | 2000-11-09 23:46:29 +0000 |
commit | da6655fcf800e86f800e520371a6ed677b5b122a (patch) | |
tree | 57c94a5e7dd8488025abe7be0b2ca3a342488186 | |
parent | 0a9e924e885939e0cd4accdeb06ab67cfa427507 (diff) | |
download | pkgsrc-da6655fcf800e86f800e520371a6ed677b5b122a.tar.gz |
Change substitution of %%PKG%% so it's expanded to ${PKGNAME} directly, not
via a tmp file. Also, there's no need to excape any possible HTML chars
(there won't be any in a PKGNAME).
Noted in PR 11462 by Jeremy C. Reed <reed@reedmedia.net>
-rw-r--r-- | mk/bsd.pkg.mk | 10 | ||||
-rw-r--r-- | templates/README.pkg | 4 |
2 files changed, 6 insertions, 8 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk index 422c3387f2b..5914f4f6c12 100644 --- a/mk/bsd.pkg.mk +++ b/mk/bsd.pkg.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.598 2000/11/09 14:02:46 itojun Exp $ +# $NetBSD: bsd.pkg.mk,v 1.599 2000/11/09 23:46:29 hubertf Exp $ # # This file is in the public domain. # @@ -2854,16 +2854,14 @@ README.html: .PRECIOUS @[ -s $@.tmp1 ] || ${ECHO} "<I>(none)</I>" >> $@.tmp1 @${MAKE} ${MAKEFLAGS} run-depends-list PACKAGE_NAME_TYPE=html | sort -u >> $@.tmp2 @[ -s $@.tmp2 ] || ${ECHO} "<I>(none)</I>" >> $@.tmp2 - @${ECHO} '${PKGNAME:S/&/\&/g:S/>/\>/g:S/</\</g}' >> $@.tmp3 @${MAKE} ${MAKEFLAGS} binpkg-list >> $@.tmp4 @[ -s $@.tmp4 ] || ${ECHO} "<TR><TD><I>(no precompiled binaries available)</I>" >> $@.tmp4 @${MAKE} ${MAKEFLAGS} show-vulnerabilities-html >> $@.tmp5 @[ -s $@.tmp5 ] || ${ECHO} "<I>(no vulnerabilities known)</I>" >> $@.tmp5 @${LS} -l ${DISTDIR}/vulnerabilities 2>&1 | ${AWK} 'NF > 7 { printf("at %s %s %s\n", $$6, $$7, $$8) }' >> $@.tmp6 @[ -s $@.tmp6 ] || ${ECHO} "<TR><TD><I>(no vulnerabilities list available)</I>" >> $@.tmp6 - @${SED} -e 's|%%PORT%%|${PKGPATH}|g' \ - -e '/%%PKG%%/r $@.tmp3' \ - -e '/%%PKG%%/d' \ + @${SED} -e 's|%%PORT%%|${PKGPATH}|g' \ + -e 's|%%PKG%%|${PKGNAME}|' \ ${SED_LICENSE_EXPR} \ ${SED_HOMEPAGE_EXPR} \ -e '/%%VULNERABILITIES%%/r $@.tmp5' \ @@ -2882,7 +2880,7 @@ README.html: .PRECIOUS @cmp -s $@.tmp $@ || \ (${ECHO_MSG} "${_PKGSRC_IN}> Creating README.html for ${_THISDIR_}${PKGNAME}"; \ ${MV} -f $@.tmp $@) - @${RM} -f $@.tmp $@.tmp1 $@.tmp2 $@.tmp3 $@.tmp4 $@.tmp5 $@.tmp6 + @${RM} -f $@.tmp $@.tmp1 $@.tmp2 $@.tmp4 $@.tmp5 $@.tmp6 .if !target(show-pkgtools-version) show-pkgtools-version: diff --git a/templates/README.pkg b/templates/README.pkg index 7ea97e17ec0..2c426a46536 100644 --- a/templates/README.pkg +++ b/templates/README.pkg @@ -1,5 +1,5 @@ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> -<!-- $NetBSD: README.pkg,v 1.15 2000/09/19 19:29:11 agc Exp $ --> +<!-- $NetBSD: README.pkg,v 1.16 2000/11/09 23:46:30 hubertf Exp $ --> <html> <head> <title>The NetBSD Packages Collection: %%PORT%%</title> @@ -31,7 +31,7 @@ longer description, or browse the package's "<A HREF=".">%%PORT%%</A>" directory. The current source version of the package is -"%%PKG%%" +"%%PKG%%". For a summary on how to use the package collection, go to the <a href="../../README.html">top of the packages tree</a>. </p> |