Mon Mar 8 16:37:59 2021 UTC ()
genreadme: Reorganize information for clarity.

Move the navigation to the top and reword it slightly. This makes it
more immediately visible. I'm not sure if this justifies a "Skip to content"
button yet.

Give the binary package table headers.


(nia)
diff -r1.47 -r1.48 pkgsrc/mk/scripts/genreadme.awk
diff -r1.10 -r1.11 pkgsrc/templates/README.all
diff -r1.15 -r1.16 pkgsrc/templates/README.category
diff -r1.37 -r1.38 pkgsrc/templates/README.pkg
diff -r1.23 -r1.24 pkgsrc/templates/README.top
diff -r1.5 -r1.6 pkgsrc/templates/main.css

cvs diff -r1.47 -r1.48 pkgsrc/mk/scripts/genreadme.awk (expand / switch to unified diff)

--- pkgsrc/mk/scripts/genreadme.awk 2021/02/24 08:16:32 1.47
+++ pkgsrc/mk/scripts/genreadme.awk 2021/03/08 16:37:59 1.48
@@ -1,15 +1,15 @@ @@ -1,15 +1,15 @@
1#!/usr/bin/awk -f 1#!/usr/bin/awk -f
2# $NetBSD: genreadme.awk,v 1.47 2021/02/24 08:16:32 nia Exp $ 2# $NetBSD: genreadme.awk,v 1.48 2021/03/08 16:37:59 nia Exp $
3# 3#
4# Copyright (c) 2002-2021 The NetBSD Foundation, Inc. 4# Copyright (c) 2002-2021 The NetBSD Foundation, Inc.
5# All rights reserved. 5# All rights reserved.
6# 6#
7# This code is derived from software contributed to The NetBSD Foundation 7# This code is derived from software contributed to The NetBSD Foundation
8# by Dan McMahill. 8# by Dan McMahill.
9# 9#
10# Redistribution and use in source and binary forms, with or without 10# Redistribution and use in source and binary forms, with or without
11# modification, are permitted provided that the following conditions 11# modification, are permitted provided that the following conditions
12# are met: 12# are met:
13# 1. Redistributions of source code must retain the above copyright 13# 1. Redistributions of source code must retain the above copyright
14# notice, this list of conditions and the following disclaimer. 14# notice, this list of conditions and the following disclaimer.
15# 2. Redistributions in binary form must reproduce the above copyright 15# 2. Redistributions in binary form must reproduce the above copyright
@@ -714,25 +714,25 @@ function load_cache_file( file, pkgfile, @@ -714,25 +714,25 @@ function load_cache_file( file, pkgfile,
714 } 714 }
715 715
716 # close the cache file 716 # close the cache file
717 close( file ); 717 close( file );
718} 718}
719 719
720function lookup_cache( d, binpkgs) { 720function lookup_cache( d, binpkgs) {
721 if( debug ) printf("lookup_cache( %s ): pkg_count = %d\n", 721 if( debug ) printf("lookup_cache( %s ): pkg_count = %d\n",
722 d, pkg_count[d]); 722 d, pkg_count[d]);
723 723
724 binpkgs_file = TMPDIR "/binpkgs"; 724 binpkgs_file = TMPDIR "/binpkgs";
725 spipe = SORT " > " binpkgs_file; 725 spipe = SORT " > " binpkgs_file;
726 for(i=1 ; i<=pkg_count[d]; i=i+1) { 726 for(i=1 ; i<=pkg_count[d]; i=i+1) {
727 printf("<tr><td>%s:<td><a href=\"%s/%s\">%s</a><td>(%s %s)\n", 727 printf("<tr><td>%s %s</td><td>%s</td><td><a href=\"%s/%s\">%s</a></td></tr>\n",
728 march_list[d, i], PKG_URL, pkgfile_list[d, i], pkgnm_list[d, i], 728 opsys_list[d, i], osver_list[d, i], march_list[d, i],
729 opsys_list[d, i], osver_list[d, i]) | spipe; 729 PKG_URL, pkgfile_list[d, i], pkgnm_list[d, i]) | spipe;
730 } 730 }
731 if( pkg_count[d] == 0 ) { 731 if( pkg_count[d] == 0 ) {
732 printf("<tr><td><em>(none)</em></td></tr>\n") | spipe; 732 printf("<tr><td><em>(none)</em></td></tr>\n") | spipe;
733 } 733 }
734 734
735 close( spipe ); 735 close( spipe );
736} 736}
737 737
738 738

cvs diff -r1.10 -r1.11 pkgsrc/templates/README.all (expand / switch to unified diff)

--- pkgsrc/templates/README.all 2021/02/24 08:16:32 1.10
+++ pkgsrc/templates/README.all 2021/03/08 16:37:59 1.11
@@ -1,35 +1,39 @@ @@ -1,35 +1,39 @@
1<!-- $NetBSD: README.all,v 1.10 2021/02/24 08:16:32 nia Exp $ --> 1<!-- $NetBSD: README.all,v 1.11 2021/03/08 16:37:59 nia Exp $ -->
2<!-- generated by pkgsrc/mk/scripts/mkreadme --> 2<!-- generated by pkgsrc/mk/scripts/mkreadme -->
3<!doctype html> 3<!doctype html>
4<html lang="en"> 4<html lang="en">
5<head> 5<head>
6<meta charset="utf-8"> 6<meta charset="utf-8">
7<link href="templates/main.css" rel="stylesheet"> 7<link href="templates/main.css" rel="stylesheet">
8<title>All NetBSD Packages</title> 8<title>All NetBSD Packages</title>
9</head> 9</head>
10<body> 10<body>
11 11
12<a href="http://www.mckusick.com/beastie/mainpage/copyright.html"> 12<a href="http://www.mckusick.com/beastie/mainpage/copyright.html">
13<img src="templates/pkg-daemon.gif" alt="Daemon Power" id="logo"> 13<img src="templates/pkg-daemon.gif" alt="Daemon Power" id="logo">
14</a> 14</a>
15<h1>The NetBSD Packages Collection</h1> 15<h1>The NetBSD Packages Collection</h1>
16 16
 17<nav>
 18<p>
 19[
 20<a href="README.html"> Go to top of packages tree</a>
 21]
 22</p>
 23<p></p> <!-- spacing hack for older browsers -->
 24</nav>
 25
17<p> 26<p>
18The following list contains all 27The following list contains all
19%%NPKGS%% 28%%NPKGS%%
20packages currently available 29packages currently available
21in the NetBSD Packages Collection, sorted alphabetically. 30in the NetBSD Packages Collection, sorted alphabetically.
22Please select an entry for more details! 31Please select an entry for more details!
23</p> 32</p>
24 33
25<hr> 34<hr>
26<dl> 35<dl>
27%%PKGS%% 36%%PKGS%%
28</dl> 37</dl>
29 
30<hr> 
31[ 
32<a href="README.html"> Go to top of packages tree</a> 
33] 
34</body> 38</body>
35</html> 39</html>

cvs diff -r1.15 -r1.16 pkgsrc/templates/README.category (expand / switch to unified diff)

--- pkgsrc/templates/README.category 2021/02/22 09:40:48 1.15
+++ pkgsrc/templates/README.category 2021/03/08 16:37:59 1.16
@@ -1,37 +1,41 @@ @@ -1,37 +1,41 @@
1<!-- $NetBSD: README.category,v 1.15 2021/02/22 09:40:48 nia Exp $ --> 1<!-- $NetBSD: README.category,v 1.16 2021/03/08 16:37:59 nia Exp $ -->
2<!-- generated by pkgsrc/mk/scripts/mkreadme --> 2<!-- generated by pkgsrc/mk/scripts/mkreadme -->
3<!doctype html> 3<!doctype html>
4<html lang="en"> 4<html lang="en">
5<head> 5<head>
6<meta charset="utf-8"> 6<meta charset="utf-8">
7<link href="../templates/main.css" rel="stylesheet"> 7<link href="../templates/main.css" rel="stylesheet">
8<title>%%CATEGORY%% - The NetBSD Packages Collection</title> 8<title>%%CATEGORY%% - The NetBSD Packages Collection</title>
9</head> 9</head>
10<body> 10<body>
11 11
12<a href="http://www.mckusick.com/beastie/mainpage/copyright.html"> 12<a href="http://www.mckusick.com/beastie/mainpage/copyright.html">
13<img src="../templates/pkg-daemon.gif" alt="Daemon Power" id="logo"> 13<img src="../templates/pkg-daemon.gif" alt="Daemon Power" id="logo">
14</a> 14</a>
15<h1><em>%%CATEGORY%%</em> - The NetBSD Packages Collection</h1> 15<h1><em>%%CATEGORY%%</em> - The NetBSD Packages Collection</h1>
16 16
 17<nav>
 18<p>
 19[
 20<a href="../README.html"> Back to list of categories</a>
 21|
 22<a href="../README-all.html"> List all packages</a>
 23]
 24</p>
 25<p></p> <!-- spacing hack for older browsers -->
 26</nav>
 27
17<p> 28<p>
18%%DESCR%% 29%%DESCR%%
19</p> 30</p>
20 31
21<p>Here are the one-line descriptions for each of the 32<p>There are
22%%NUMITEMS%% 33%%NUMITEMS%%
23items in this directory:</p> 34packages in this category:</p>
24 35
25<hr> 36<hr>
26<dl> 37<dl>
27%%SUBDIR%% 38%%SUBDIR%%
28</dl> 39</dl>
29 
30<hr> 
31[ 
32<a href="../README.html"> Go to top of packages tree</a> 
33| 
34<a href="../README-all.html"> List all packages</a> 
35] 
36</body> 40</body>
37</html> 41</html>

cvs diff -r1.37 -r1.38 pkgsrc/templates/README.pkg (expand / switch to unified diff)

--- pkgsrc/templates/README.pkg 2021/02/22 09:40:48 1.37
+++ pkgsrc/templates/README.pkg 2021/03/08 16:37:59 1.38
@@ -1,32 +1,47 @@ @@ -1,32 +1,47 @@
1<!-- $NetBSD: README.pkg,v 1.37 2021/02/22 09:40:48 nia Exp $ --> 1<!-- $NetBSD: README.pkg,v 1.38 2021/03/08 16:37:59 nia Exp $ -->
2<!-- generated by pkgsrc/mk/scripts/mkreadme --> 2<!-- generated by pkgsrc/mk/scripts/mkreadme -->
3<!doctype html> 3<!doctype html>
4<html lang="en"> 4<html lang="en">
5<head> 5<head>
6<meta charset="utf-8"> 6<meta charset="utf-8">
7<link href="../../templates/main.css" rel="stylesheet"> 7<link href="../../templates/main.css" rel="stylesheet">
 8<!-- make tables not look terrible on mobile... -->
 9<meta name="viewport" content="width=device-width, initial-scale=1">
8<title>%%PORT%% - The NetBSD Packages Collection</title> 10<title>%%PORT%% - The NetBSD Packages Collection</title>
9</head> 11</head>
10<body> 12<body>
11 13
12<a href="http://www.mckusick.com/beastie/mainpage/copyright.html"> 14<a href="http://www.mckusick.com/beastie/mainpage/copyright.html">
13<img src="../../templates/pkg-daemon.gif" alt="Daemon Power" id="logo"> 15<img src="../../templates/pkg-daemon.gif" alt="Daemon Power" id="logo">
14</a> 16</a>
15<h1><em>%%PORT%%</em> - The NetBSD Packages Collection</h1> 17<h1><em>%%PORT%%</em> - The NetBSD Packages Collection</h1>
16 18
 19<nav>
 20<p>
 21[
 22<a href="../README.html"> Back to category</a>
 23|
 24<a href="../../README.html"> List of categories</a>
 25|
 26<a href="../../README-all.html"> List all packages</a>
 27]
 28</p>
 29<p></p> <!-- spacing hack for older browsers -->
 30</nav>
 31
17<details open> 32<details open>
18<summary><em>%%COMMENT%%</em></summary> 33<summary><em>%%COMMENT%%</em></summary>
19<p></p> <!-- spacing hack for older browsers with no details support --> 34<p></p> <!-- spacing hack for older browsers -->
20<pre> 35<pre>
21%%DESCR%% 36%%DESCR%%
22</pre> 37</pre>
23</details> 38</details>
24 39
25<ul class="package-data"> 40<ul class="package-data">
26<li><strong>Source version:</strong> <samp>%%PKG%%</samp></li> 41<li><strong>Source version:</strong> <samp>%%PKG%%</samp></li>
27<li><strong>Maintainer:</strong> <em>%%MAINTAINER%%</em></li> 42<li><strong>Maintainer:</strong> <em>%%MAINTAINER%%</em></li>
28<li><strong>Website:</strong> %%HOMEPAGE%%</li> 43<li><strong>Website:</strong> %%HOMEPAGE%%</li>
29<li><strong>License:</strong> %%LICENSE%%</li> 44<li><strong>License:</strong> %%LICENSE%%</li>
30<li><strong>Package history:</strong> 45<li><strong>Package history:</strong>
31<a href="http://cvsweb.NetBSD.org/bsdweb.cgi/pkgsrc/%%PORT%%/">cvs</a>, 46<a href="http://cvsweb.NetBSD.org/bsdweb.cgi/pkgsrc/%%PORT%%/">cvs</a>,
32<a href="https://anonhg.NetBSD.org/pkgsrc/file/tip/%%PORT%%/">hg</a>, 47<a href="https://anonhg.NetBSD.org/pkgsrc/file/tip/%%PORT%%/">hg</a>,
@@ -34,34 +49,45 @@ @@ -34,34 +49,45 @@
34</ul> 49</ul>
35 50
36<section> 51<section>
37<h2>Build dependencies</h2> 52<h2>Build dependencies</h2>
38%%BUILD_DEPENDS%% 53%%BUILD_DEPENDS%%
39</section> 54</section>
40 55
41<section> 56<section>
42<h2>Runtime dependencies</h2> 57<h2>Runtime dependencies</h2>
43%%RUN_DEPENDS%% 58%%RUN_DEPENDS%%
44</section> 59</section>
45 60
46<section> 61<section>
47<h2>Available binary packages</h2> 62<h2>Binary packages</h2>
48<table> 63<table>
 64<thead>
 65<tr>
 66<th>OS</th><th>Architecture</th><th>Version</th>
 67</tr>
 68</thead>
 69<tbody>
49%%BIN_PKGS%% 70%%BIN_PKGS%%
 71</tbody>
50</table> 72</table>
51 73
52<p> 74<p>
53Binary packages can be installed with 75Binary packages can be installed with the high-level tool
54<a href="../../pkgtools/pkgin/README.html">pkgin</a> or pkg_add(1). 76<a href="../../pkgtools/pkgin/README.html">pkgin</a>
 77(which can be installed with pkg_add)
 78or
 79<a href="//man.NetBSD.org/pkg_add.1">pkg_add(1)</a>
 80(installed by default).
55 81
56The NetBSD packages collection is also designed to permit 82The NetBSD packages collection is also designed to permit
57 easy <a href="../../doc/pkgsrc.html">installation from source</a>. 83 easy <a href="../../doc/pkgsrc.html">installation from source</a>.
58</p> 84</p>
59</section> 85</section>
60 86
61<section> 87<section>
62<h2>Available build options</h2> 88<h2>Available build options</h2>
63<dl> 89<dl>
64%%OPTIONS%% 90%%OPTIONS%%
65</dl> 91</dl>
66</section> 92</section>
67 93
@@ -77,23 +103,15 @@ security advisories as having vulnerabil @@ -77,23 +103,15 @@ security advisories as having vulnerabil
77</p> 103</p>
78<p> 104<p>
79Please note the vulnerabilities database might not be fully accurate, 105Please note the vulnerabilities database might not be fully accurate,
80and not every bug is exploitable with every configuration. 106and not every bug is exploitable with every configuration.
81<p> 107<p>
82</section> 108</section>
83 109
84<hr> 110<hr>
85 111
86<p>Problem reports, updates or suggestions for this package should be 112<p>Problem reports, updates or suggestions for this package should be
87reported with 113reported with
88<a href="http://www.NetBSD.org/support/send-pr.html">send-pr.</a></p> 114<a href="http://www.NetBSD.org/support/send-pr.html">send-pr.</a></p>
89 115
90<hr> 
91[ 
92<a href="../README.html"> Go up one level</a> 
93| 
94<a href="../../README.html"> Go to top of packages tree</a> 
95| 
96<a href="../../README-all.html"> List all packages</a> 
97] 
98</body> 116</body>
99</html> 117</html>

cvs diff -r1.23 -r1.24 pkgsrc/templates/README.top (expand / switch to unified diff)

--- pkgsrc/templates/README.top 2021/02/22 09:40:48 1.23
+++ pkgsrc/templates/README.top 2021/03/08 16:37:59 1.24
@@ -1,42 +1,39 @@ @@ -1,42 +1,39 @@
1<!-- $NetBSD: README.top,v 1.23 2021/02/22 09:40:48 nia Exp $ --> 1<!-- $NetBSD: README.top,v 1.24 2021/03/08 16:37:59 nia Exp $ -->
2<!-- generated by pkgsrc/mk/scripts/mkreadme --> 2<!-- generated by pkgsrc/mk/scripts/mkreadme -->
3<!doctype html> 3<!doctype html>
4<html lang="en"> 4<html lang="en">
5<head> 5<head>
6<meta charset="utf-8"> 6<meta charset="utf-8">
7<link href="templates/main.css" rel="stylesheet"> 7<link href="templates/main.css" rel="stylesheet">
8<title>The NetBSD Packages Collection</title> 8<title>The NetBSD Packages Collection</title>
9</head> 9</head>
10<body> 10<body>
11 11
12<a href="http://www.mckusick.com/beastie/mainpage/copyright.html"> 12<a href="http://www.mckusick.com/beastie/mainpage/copyright.html">
13<img src="templates/pkg-daemon.gif" alt="Daemon Power" id="logo"> 13<img src="templates/pkg-daemon.gif" alt="Daemon Power" id="logo">
14</a> 14</a>
15<h1>The NetBSD Packages Collection</h1> 15<h1>The NetBSD Packages Collection</h1>
16 16
17<p> 17<p>
18The packages collection is divided into categories of packages. 18The packages collection is divided into categories of packages.
19A <a href="README-all.html">complete list of all packages</a> 19A <a href="README-all.html">complete list of all packages</a>
20is also available. 20is also available.
21</p> 21</p>
22 22
23<p> 23<p>
 24Prebuilt binary packages can be installed using the high level tool
 25<a href="pkgtools/pkgin/README.html">pkgin</a> or the default
 26<a href="//man.NetBSD.org/pkg_add.1">pkg_add(1)</a>.
 27</p>
 28
 29<p>
24%%DESCR%% 30%%DESCR%%
25</p> 31</p>
26 32
27<hr> 33<hr>
28<dl> 34<dl>
29%%SUBDIR%% 35%%SUBDIR%%
30</dl> 36</dl>
31<hr> 
32 
33Prebuilt binary packages can be installed using 
34<a href="pkgtools/pkgin/README.html">pkgin</a> or pkg_add(8). 
35For more information on how to build packages from pkgsrc, see the 
36<a href="doc/pkgsrc.html">doc/pkgsrc.html</a> document. 
37 
38pkgsrc and binary packages for NetBSD are available on 
39<a href="https://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/">the NetBSD mirrors</a>. 
40 37
41</body> 38</body>
42</html> 39</html>

cvs diff -r1.5 -r1.6 pkgsrc/templates/main.css (expand / switch to unified diff)

--- pkgsrc/templates/main.css 2021/02/22 09:43:58 1.5
+++ pkgsrc/templates/main.css 2021/03/08 16:37:59 1.6
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: main.css,v 1.5 2021/02/22 09:43:58 nia Exp $ */ 1/* $NetBSD: main.css,v 1.6 2021/03/08 16:37:59 nia Exp $ */
2 2
3body { 3body {
4 font-family: sans-serif; 4 font-family: sans-serif;
5 background-color: #fff; 5 background-color: #fff;
6 color: #000; 6 color: #000;
7} 7}
8 8
9body, pre, code, samp { 9body, pre, code, samp {
10 font-size: 16px; 10 font-size: 16px;
11} 11}
12 12
13h1 { 13h1 {
14 font-size: 160%; 14 font-size: 160%;
@@ -53,13 +53,17 @@ hr { @@ -53,13 +53,17 @@ hr {
53#logo { 53#logo {
54 float: right; 54 float: right;
55 border: 0; 55 border: 0;
56} 56}
57 57
58.package-data { 58.package-data {
59 list-style-type: none; 59 list-style-type: none;
60 padding-left: 0; 60 padding-left: 0;
61 padding-top: 1em; 61 padding-top: 1em;
62 padding-bottom: 1em; 62 padding-bottom: 1em;
63 border-top: 1px solid #aaa; 63 border-top: 1px solid #aaa;
64 border-bottom: 1px solid #aaa; 64 border-bottom: 1px solid #aaa;
65} 65}
 66
 67nav {
 68 margin-bottom: 1em;
 69}