pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc



Module Name:    pkgsrc
Committed By:   nia
Date:           Mon Feb 22 05:10:19 UTC 2021

Modified Files:
        pkgsrc/mk/scripts: genreadme.awk
        pkgsrc/templates: README.category README.pkg main.css

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.43 -r1.44 pkgsrc/mk/scripts/genreadme.awk
cvs rdiff -u -r1.11 -r1.12 pkgsrc/templates/README.category
cvs rdiff -u -r1.31 -r1.32 pkgsrc/templates/README.pkg
cvs rdiff -u -r1.1 -r1.2 pkgsrc/templates/main.css

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/scripts/genreadme.awk
diff -u pkgsrc/mk/scripts/genreadme.awk:1.43 pkgsrc/mk/scripts/genreadme.awk:1.44
--- pkgsrc/mk/scripts/genreadme.awk:1.43        Mon Feb 22 04:24:12 2021
+++ pkgsrc/mk/scripts/genreadme.awk     Mon Feb 22 05:10:18 2021
@@ -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 @@ BEGIN {
        next;
 }
 
+/^maintainer /{
+       maintainer[$2] = $3;
+       gsub(/@/, " AT ", maintainer[$2]);
+       next;
+}
+
 /^comment /{
        dir = $2;
        gsub(/^comment[ \t]*/, "");
@@ -306,18 +312,19 @@ END {
                        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"");

Index: pkgsrc/templates/README.category
diff -u pkgsrc/templates/README.category:1.11 pkgsrc/templates/README.category:1.12
--- pkgsrc/templates/README.category:1.11       Sun Feb 21 10:15:24 2021
+++ pkgsrc/templates/README.category    Mon Feb 22 05:10:18 2021
@@ -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>

Index: pkgsrc/templates/README.pkg
diff -u pkgsrc/templates/README.pkg:1.31 pkgsrc/templates/README.pkg:1.32
--- pkgsrc/templates/README.pkg:1.31    Sun Feb 21 10:15:24 2021
+++ pkgsrc/templates/README.pkg Mon Feb 22 05:10:18 2021
@@ -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%%
+<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>
 
-%%LICENSE%%
+<section>
+<h2>Build dependencies</h2>
+%%BUILD_DEPENDS%%
+</section>
 
-<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>
+<section>
+<h2>Runtime dependencies</h2>
+%%RUN_DEPENDS%%
+</section>
 
-<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>
+<section>
+<h2>Available binary packages</h2>
+<table>
+%%BIN_PKGS%%
+</table>
 
 <p>
-The following security vulnerabilities are known for %%PORT%%
-%%VULDATE%%
-:
+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.
-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:
-%%BUILD_DEPENDS%%
-</p>
-<p>
-This package requires the following package(s) to run:
-%%RUN_DEPENDS%%
-</p>
-
+Please note the vulnerabilities database might not be fully accurate,
+and not every bug is exploitable with every configuration.
 <p>
-This package supports the following build-time options:
-</p>
-<dl>
-%%OPTIONS%%
-</dl>
+</section>
 
-<p>
-Available binary packages that can be installed with pkgin(1) or pkg_add(1)
-for each architecture:
-<table>
-%%BIN_PKGS%%
-</table>
+<hr noshade>
 
-<p>
-The NetBSD packages collection is also designed to permit
-            easy <a href="../../doc/pkgsrc.html">installation from source</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>
 
 <hr noshade>
 [

Index: pkgsrc/templates/main.css
diff -u pkgsrc/templates/main.css:1.1 pkgsrc/templates/main.css:1.2
--- pkgsrc/templates/main.css:1.1       Sun Feb 21 10:15:24 2021
+++ pkgsrc/templates/main.css   Mon Feb 22 05:10:18 2021
@@ -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 @@ th {
        float: right;
        border: 0;
 }
+
+.package-data {
+       list-style-type: none;
+       padding-left: 0;
+}



Home | Main Index | Thread Index | Old Index