summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoragc <agc@pkgsrc.org>1998-07-22 09:18:46 +0000
committeragc <agc@pkgsrc.org>1998-07-22 09:18:46 +0000
commit388d113839ae78a13bfa3e1e72a97d530121441d (patch)
tree0dccdbcc105dddc56895ac9a879a3a586c1feb32
parent0a6a80b22fa37614aec75153d919c9ebe58f3e94 (diff)
downloadpkgsrc-388d113839ae78a13bfa3e1e72a97d530121441d.tar.gz
Add any licensing information to the README.html files which are generated
for each package.
-rw-r--r--mk/bsd.pkg.mk10
-rw-r--r--templates/README.pkg4
2 files changed, 12 insertions, 2 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index fa2218d3c73..f0fb1cb1e2d 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.123 1998/07/22 07:30:22 agc Exp $
+# $NetBSD: bsd.pkg.mk,v 1.124 1998/07/22 09:18:46 agc Exp $
#
# This file is in the public domain.
#
@@ -1723,6 +1723,13 @@ README_NAME= ${TEMPLATES}/README.pkg
README_NAME= ${TEMPLATES}/README.port
.endif
+# set up the correct license information as a sed expression
+.ifdef LICENSE
+SED_LICENSE_EXPR= -e 's|%%LICENSE%%|<p>Please note that this package has a ${LICENSE} license.</p>|'
+.else
+SED_LICENSE_EXPR= -e 's|%%LICENSE%%||'
+.endif
+
README.html:
@${MAKE} depends-list PACKAGE_NAME_AS_LINK=YES | sort -u >> $@.tmp1
@[ -s $@.tmp1 ] || echo "<I>(none)</I>" >> $@.tmp1
@@ -1735,6 +1742,7 @@ README.html:
${SED} -e 's|%%PORT%%|'"`${MAKE} package-path | ${HTMLIFY}`"'|g' \
-e '/%%PKG%%/r$@.tmp3' \
-e '/%%PKG%%/d' \
+ ${SED_LICENSE_EXPR} \
-e '/%%COMMENT%%/r${PKGDIR}/COMMENT' \
-e '/%%COMMENT%%/d' \
-e '/%%BUILD_DEPENDS%%/r$@.tmp1' \
diff --git a/templates/README.pkg b/templates/README.pkg
index 163b87a23a9..0bc4d2222bb 100644
--- a/templates/README.pkg
+++ b/templates/README.pkg
@@ -1,4 +1,4 @@
-<!-- $NetBSD: README.pkg,v 1.6 1998/06/01 21:15:27 hubertf Exp $ -->
+<!-- $NetBSD: README.pkg,v 1.7 1998/07/22 09:18:47 agc Exp $ -->
<html>
<head>
<title>The NetBSD Packages Collection: %%PORT%%</title>
@@ -20,6 +20,8 @@
longer description.
</p>
+%%LICENSE%%
+
<p>The package is located in the
"%%PORT%%"
directory. It can be manipulated using the packaging tools,