pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/templates genreadme: Re-order package summary and atte...
details: https://anonhg.NetBSD.org/pkgsrc/rev/12089577df93
branches: trunk
changeset: 447568:12089577df93
user: nia <nia%pkgsrc.org@localhost>
date: Mon Feb 22 05:10:18 2021 +0000
description:
genreadme: Re-order package summary and attempt to present it better.
- Add a maintainer field.
- Use lists and sections to separate information.
- Make license information a hyperlink.
- Move available build options and vulnerabilities listings to the bottom,
as they tend to use up a lot of space and create reader fatigue.
- Correct stylesheet paths.
diffstat:
mk/scripts/genreadme.awk | 21 +++++--
templates/README.category | 4 +-
templates/README.pkg | 109 ++++++++++++++++++++++-----------------------
templates/main.css | 7 ++-
4 files changed, 76 insertions(+), 65 deletions(-)
diffs (228 lines):
diff -r 10f3e4cbb49d -r 12089577df93 mk/scripts/genreadme.awk
--- a/mk/scripts/genreadme.awk Mon Feb 22 04:24:12 2021 +0000
+++ b/mk/scripts/genreadme.awk Mon Feb 22 05:10:18 2021 +0000
@@ -1,5 +1,5 @@
#!/usr/bin/awk -f
-# $NetBSD: genreadme.awk,v 1.43 2021/02/22 04:24:12 nia Exp $
+# $NetBSD: genreadme.awk,v 1.44 2021/02/22 05:10:18 nia Exp $
#
# Copyright (c) 2002-2021 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -121,6 +121,12 @@
next;
}
+/^maintainer /{
+ maintainer[$2] = $3;
+ gsub(/@/, " AT ", maintainer[$2]);
+ next;
+}
+
/^comment /{
dir = $2;
gsub(/^comment[ \t]*/, "");
@@ -306,18 +312,19 @@
while((getline < templatefile) > 0){
gsub(/%%PORT%%/, toppkg);
gsub(/%%PKG%%/, pkgdir2name[toppkg]);
+ gsub(/%%MAINTAINER%%/, maintainer[toppkg]);
gsub(/%%COMMENT%%/, comment[toppkg]);
if (homepage[toppkg] == "") {
- gsub(/%%HOMEPAGE%%/, "");
+ gsub(/%%HOMEPAGE%%/, "<em>none stated</em>");
} else {
- gsub(/%%HOMEPAGE%%/,
- "<p>This package has a home page at <a HREF=\"" homepage[toppkg] "\">" homepage[toppkg] "</a>.</p>");
+ gsub(/%%HOMEPAGE%%/, "<a href=\"" \
+ homepage[toppkg] "\">" homepage[toppkg] "</a>");
}
if (license[toppkg] == "") {
- gsub(/%%LICENSE%%/, "");
+ gsub(/%%LICENSE%%/, "<em>none stated</em>");
} else {
- gsub(/%%LICENSE%%/,
- "<p>Please note that this package has a " license[toppkg] " license.</p>");
+ gsub(/%%LICENSE%%/, "<a href=\"../../licenses/" \
+ license[toppkg] "\">" license[toppkg] "</a>");
}
gsub(/%%VULNERABILITIES%%/, ""vul"");
gsub(/%%VULDATE%%/, ""vuldate"");
diff -r 10f3e4cbb49d -r 12089577df93 templates/README.category
--- a/templates/README.category Mon Feb 22 04:24:12 2021 +0000
+++ b/templates/README.category Mon Feb 22 05:10:18 2021 +0000
@@ -1,9 +1,9 @@
-<!-- $NetBSD: README.category,v 1.11 2021/02/21 10:15:24 nia Exp $ -->
+<!-- $NetBSD: README.category,v 1.12 2021/02/22 05:10:18 nia Exp $ -->
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
-<link href="templates/main.css" rel="stylesheet">
+<link href="../templates/main.css" rel="stylesheet">
<title>The NetBSD Packages Collection: %%CATEGORY%%</title>
</head>
<body>
diff -r 10f3e4cbb49d -r 12089577df93 templates/README.pkg
--- a/templates/README.pkg Mon Feb 22 04:24:12 2021 +0000
+++ b/templates/README.pkg Mon Feb 22 05:10:18 2021 +0000
@@ -1,88 +1,87 @@
-<!-- $NetBSD: README.pkg,v 1.31 2021/02/21 10:15:24 nia Exp $ -->
+<!-- $NetBSD: README.pkg,v 1.32 2021/02/22 05:10:18 nia Exp $ -->
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
-<link href="templates/main.css" rel="stylesheet">
-<title>The NetBSD Packages Collection: %%PORT%%</title>
+<link href="../../templates/main.css" rel="stylesheet">
+<title>%%PORT%% - The NetBSD Packages Collection</title>
</head>
<body>
<a href="http://www.mckusick.com/beastie/mainpage/copyright.html">
<img src="../../templates/pkg-daemon.gif" alt="Daemon Power" id="logo">
</a>
-<h1>The NetBSD Packages Collection: <i>%%PORT%%</i></h1>
+<h1><em>%%PORT%%</em> - The NetBSD Packages Collection</h1>
-<p>Brief description of the package:<br>
-<I>
-%%COMMENT%%
-</I>
+<p>
+<em>%%COMMENT%%</em>
</p>
-<p>Please read the file "<a href="DESCR">DESCR</a>" for a
+<p>Please read the file <a href="DESCR">DESCR</a> for a
longer description, or browse the package's
<a href="http://cvsweb.NetBSD.org/bsdweb.cgi/pkgsrc/%%PORT%%/">history</a>.
</p>
-%%HOMEPAGE%%
-
-%%LICENSE%%
-
-<p>The package is located in the
-"<A HREF=".">%%PORT%%</A>"
-directory.
-The current source version of the package is
-"%%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>
-
-<p>Problem reports, updates or suggestions for this package should be
-reported with
-<a href="http://www.NetBSD.org/support/send-pr.html">send-pr.</a></p>
-
-<p>
-The following security vulnerabilities are known for %%PORT%%
-%%VULDATE%%
-:
-<ul>
-%%VULNERABILITIES%%
+<ul class="package-data">
+<li><strong>Source version:</strong> <samp>%%PKG%%</samp></li>
+<li><strong>Maintainer:</strong> <em>%%MAINTAINER%%</em></li>
+<li><strong>Website:</strong> %%HOMEPAGE%%</li>
+<li><strong>License:</strong> %%LICENSE%%</li>
</ul>
-The <a href="../../pkgtools/pkg_install/README.html">pkg_admin audit</a>
-command locates any installed package which has been mentioned in
-security advisories as having vulnerabilities.
-Please note the vulnerabilities database might not be fully accurate,
-and not every bug is exploitable with every configuration.
-</p>
-
-<p>
-This package requires the following package(s) to build:
+<section>
+<h2>Build dependencies</h2>
%%BUILD_DEPENDS%%
-</p>
-<p>
-This package requires the following package(s) to run:
-%%RUN_DEPENDS%%
-</p>
+</section>
-<p>
-This package supports the following build-time options:
-</p>
-<dl>
-%%OPTIONS%%
-</dl>
+<section>
+<h2>Runtime dependencies</h2>
+%%RUN_DEPENDS%%
+</section>
-<p>
-Available binary packages that can be installed with pkgin(1) or pkg_add(1)
-for each architecture:
+<section>
+<h2>Available binary packages</h2>
<table>
%%BIN_PKGS%%
</table>
<p>
+Binary packages can be installed with
+<a href="../../pkgtools/pkgin/README.html">pkgin</a> or pkg_add(1).
+
The NetBSD packages collection is also designed to permit
easy <a href="../../doc/pkgsrc.html">installation from source</a>.
</p>
+</section>
+
+<section>
+<h2>Available build options</h2>
+<dl>
+%%OPTIONS%%
+</dl>
+</section>
+
+<section>
+<h2>Known vulnerabilities</h2>
+<ul>
+%%VULNERABILITIES%%
+</ul>
+<p>
+The <a href="../../pkgtools/pkg_install/README.html">pkg_admin audit</a>
+command locates any installed package which has been mentioned in
+security advisories as having vulnerabilities.
+</p>
+<p>
+Please note the vulnerabilities database might not be fully accurate,
+and not every bug is exploitable with every configuration.
+<p>
+</section>
+
+<hr noshade>
+
+<p>Problem reports, updates or suggestions for this package should be
+reported with
+<a href="http://www.NetBSD.org/support/send-pr.html">send-pr.</a></p>
<hr noshade>
[
diff -r 10f3e4cbb49d -r 12089577df93 templates/main.css
--- a/templates/main.css Mon Feb 22 04:24:12 2021 +0000
+++ b/templates/main.css Mon Feb 22 05:10:18 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.css,v 1.1 2021/02/21 10:15:24 nia Exp $ */
+/* $NetBSD: main.css,v 1.2 2021/02/22 05:10:18 nia Exp $ */
body {
font-family: sans-serif;
@@ -33,3 +33,8 @@
float: right;
border: 0;
}
+
+.package-data {
+ list-style-type: none;
+ padding-left: 0;
+}
Home |
Main Index |
Thread Index |
Old Index