Date: Sat, 20 Oct 2001 16:57:46 +0200 (CEST) From: Cyrille Lefevre <clefevre@citeweb.net> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/31389: tidy readme templates + port readme enhancements Message-ID: <200110201457.f9KEvkh77056@gits.dyndns.org>
next in thread | raw e-mail | index | archive | help
>Number: 31389 >Category: ports >Synopsis: tidy readme templates + port readme enhancements >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Oct 20 08:00:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Cyrille Lefevre >Release: FreeBSD 4.4-RC i386 >Organization: ACME >Environment: System: FreeBSD gits 4.4-RC FreeBSD 4.4-RC #7: Thu Sep 20 12:40:17 CEST 2001 root@gits:/disk2/4.x-stable/src/sys/compile/CUSTOM i386 >Description: first of all, README.* files have been run through tidy since they aren't HTML compliant at all. Mk/bsd.port.mk / ${.CURDIR}/README.html ^A and ^B have been replaced by | to avoid printing problems. long lines have been wrapped. useless use of cat deleted. %%EMAIL%%, %%MAINTAINER%% (not used yet), and %%WEBSITE%% added. pretty-print-www-site target added. Templates/README.* run throught tidy -i since they are malformed HTML. Templates/README.port %%PKG%% moved. %%WEBSITE%%, %%EMAIL%% and port mailing-list added. >How-To-Repeat: cd /usr/ports/textproc/dico make readme >Fix: Index: Mk/bsd.port.mk =================================================================== RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v retrieving revision 1.383 diff -u -r1.383 bsd.port.mk --- Mk/bsd.port.mk 2001/10/09 07:37:34 1.383 +++ Mk/bsd.port.mk 2001/10/20 14:52:48 @@ -2839,16 +2839,25 @@ ${.CURDIR}/README.html: @${ECHO_MSG} "===> Creating README.html for ${PKGNAME}" - @${CAT} ${TEMPLATES}/README.port | \ - ${SED} -e 's%%PORT%%'`${ECHO} ${.CURDIR} | ${SED} -e 's.*/\([^/]*/[^/]*\)$$\1'`'g' \ - -e 's%%PKG%%${PKGNAME}g' \ + @${SED} -e 's|%%PORT%%|'$$(${ECHO} ${.CURDIR} | \ + ${SED} -e 's|.*/\([^/]*/[^/]*\)$$|\1|')'|g' \ + -e 's|%%PKG%%|${PKGNAME}|g' \ -e '/%%COMMENT%%/r${COMMENT}' \ -e '/%%COMMENT%%/d' \ - -e 's%%DESCR%%'"`${ECHO} ${DESCR} | ${SED} -e 's${.CURDIR}/'`"'' \ - -e 's%%BUILD_DEPENDS%%'"`cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} pretty-print-build-depends-list`"'' \ - -e 's%%RUN_DEPENDS%%'"`cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} pretty-print-run-depends-list`"'' \ - -e 's%%TOP%%'"`${ECHO} ${CATEGORIES} | ${SED} -e 'sa .*aa' -e 'sa[^/]*a..ag'`"'/..' \ - >> $@ + -e 's|%%DESCR%%|'"$$(${ECHO} ${DESCR} | \ + ${SED} -e 's|${.CURDIR}/||')"'|' \ + -e 's|%%EMAIL%%|'"$$(${ECHO} "${MAINTAINER}" | \ + ${SED} -e 's/([^)]*)//;s/.*<//;s/>.*//')"'|g' \ + -e 's|%%MAINTAINER%%|${MAINTAINER}|g' \ + -e 's|%%WEBSITE%%|'"$$(cd ${.CURDIR} && ${MAKE} \ + ${__softMAKEFLAGS} pretty-print-www-site)"'|' \ + -e 's|%%BUILD_DEPENDS%%|'"$$(cd ${.CURDIR} && ${MAKE} \ + ${__softMAKEFLAGS} pretty-print-build-depends-list)"'|' \ + -e 's|%%RUN_DEPENDS%%|'"$$(cd ${.CURDIR} && ${MAKE} \ + ${__softMAKEFLAGS} pretty-print-run-depends-list)"'|' \ + -e 's|%%TOP%%|'"$$(${ECHO} ${CATEGORIES} | \ + ${SED} -e 's| .*||' -e 's|[^/]*|..|g')"'/..|' \ + ${TEMPLATES}/README.port >> $@ # The following two targets require an up-to-date INDEX in ${PORTSDIR} @@ -2869,6 +2878,16 @@ @${ECHO} -n `${GREP} '^${PKGNAME}|' ${PORTSDIR}/INDEX | awk -F\| '{print $$9;}'` @${ECHO} '" to run.' .endif +.endif + +.if !target(pretty-print-www-site) +pretty-print-www-site: + @www_site=$$(cd ${.CURDIR} && ${MAKE} ${__softMAKEFLAGS} www-site); \ + if [ -n "$${www_site}" ]; then \ + ${ECHO} -n " and/or visit the "; \ + ${ECHO} -n "<a href=\"$${www_site}\">web site</a>"; \ + ${ECHO} " for futher informations"; \ + fi .endif # Generate packing list. Also tests to make sure all required package Index: Templates/README.category =================================================================== RCS file: /home/ncvs/ports/Templates/README.category,v retrieving revision 1.3 diff -u -r1.3 README.category --- Templates/README.category 2000/10/14 11:03:19 1.3 +++ Templates/README.category 2001/10/20 14:29:29 @@ -1,27 +1,35 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> + <html> -<title> The FreeBSD Ports Collection (%%CATEGORY%%)</title> -<head><h1> The FreeBSD Ports Collection ("%%CATEGORY%%")</h1> </head> <hr> -<body> + <head> + <title>The FreeBSD Ports Collection (%%CATEGORY%%)</title> + </head> + + <body> + <h1>The FreeBSD Ports Collection ("%%CATEGORY%%")</h1> + <hr> -<p>You are now in the directory "%%CATEGORY%%". + <p>You are now in the directory "%%CATEGORY%%".</p> -<p>This is the one-line description for this category: + <p>This is the one-line description for this category:</p> + <hr> -<p><hr><p> + <p> %%COMMENT%% -<p><hr> + </p> + <hr> -<p> + <p> %%DESCR%% + </p> -<p>Here are the one-line descriptions for each items in this directory: - -<p><hr> -<p><pre> + <p>Here are the one-line descriptions for each items in this + directory:</p> + <hr> +<pre> %%SUBDIR%% </pre> - -<p><hr><p> -<a href="../README.html"> Go to parent directory</a> -</body> + <hr> + <a href="../README.html">Go to parent directory</a> + </body> </html> Index: Templates/README.port =================================================================== RCS file: /home/ncvs/ports/Templates/README.port,v retrieving revision 1.3 diff -u -r1.3 README.port --- Templates/README.port 2000/10/01 17:27:40 1.3 +++ Templates/README.port 2001/10/20 14:51:10 @@ -1,30 +1,43 @@ +<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN"> + <html> -<title> The FreeBSD Ports Collection (%%PORT%%)</title> -<head><h1> The FreeBSD Ports Collection ("%%PORT%%")</h1> </head> <hr> -<body> + <head> + <title>The FreeBSD Ports Collection (%%PORT%%)</title> + </head> + + <body> + <h1>The FreeBSD Ports Collection (%%PORT%%)</h1> + <hr> -<p>You are now in the directory for the port "%%PORT%%" (package name "%%PKG%%"). + <p>You are now in the directory for the port "%%PORT%%".</p> -<p>This is the one-line description for this port: + <p>The package name of this port is "%%PKG%%".</p> -<p><hr><p> + <p>This is the one-line description for this port:</p> + <hr> + + <p> %%COMMENT%% -<p><hr> + </p> + <hr> + + <p>Please read the "<a href="%%DESCR%%">description file</a>" for a + longer description%%WEBSITE%%.</p> -<p>Please read the "<a href="%%DESCR%%">description file</a>" for a -longer description. + <p>If needed, you may contact the <a href= + "mailto:%%EMAIL%%">maintainer</a> of this port or the port <a href= + "mailto:port@FreeBSD.org">mailing-list</a>.</p> -<p>Go to the <a href="%%TOP%%/README.html">top of the ports tree</a> for -a summary on how to use the ports collection. + <p>%%BUILD_DEPENDS%%</p> -<p> -%%BUILD_DEPENDS%% -<p> -%%RUN_DEPENDS%% - -<p><hr><p> -<a href="../README.html"> Go up one level</a> -| -<a href="%%TOP%%/README.html"> Go to top of ports tree</a> -</body> + <p>%%RUN_DEPENDS%%</p> + + <p>Go to the <a href="%%TOP%%/README.html">top of the ports tree</a> for + a summary on how to use the ports collection.</p> + <hr> + + <p><a href="../README.html">Go up one level</a> | <a href= + "%%TOP%%/README.html">Go to top of ports tree</a></p> + </body> </html> + Index: Templates/README.top =================================================================== RCS file: /home/ncvs/ports/Templates/README.top,v retrieving revision 1.3 diff -u -r1.3 README.top --- Templates/README.top 2000/08/18 17:18:25 1.3 +++ Templates/README.top 2001/10/20 14:14:14 @@ -1,29 +1,33 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN"> + <html> -<title> The FreeBSD Ports Collection</title> -<head><h1> The FreeBSD Ports Collection </h1> </head> <hr> -<body> - -<p>You are at the top of the ports tree. - -<p> -For information on how to use the ports tree, please look at "The -Ports Collection" section of the FreeBSD handbook <a -href="file://localhost/usr/share/doc/handbook/handbook.html"> on your -own FreeBSD machine</a> or <a -href="http://www.FreeBSD.org/handbook/ports.html"> at the FreeBSD web -site</a>. - -<p> - -Also, if you would like to contribute a new port or fix an existing -one, please refer to the <a -href="http://www.FreeBSD.org/porters-handbook/index.html"> Porting -Guidelines</a> section of the most current handbook. -<p>Here are the one-line descriptions for each of the directories: + <head> + <title>The FreeBSD Ports Collection</title> + </head> + + <body> + <h1>The FreeBSD Ports Collection</h1> + <hr> + + <p>You are at the top of the ports tree.</p> + + <p>For information on how to use the ports tree, please look at "The + Ports Collection" section of the FreeBSD handbook <a href= + "file://localhost/usr/share/doc/handbook/handbook.html">on your own + FreeBSD machine</a> or <a href= + "http://www.FreeBSD.org/handbook/ports.html">at the FreeBSD web + site</a>.</p> + + <p>Also, if you would like to contribute a new port or fix an existing + one, please refer to the <a href= + "http://www.FreeBSD.org/porters-handbook/index.html">Porting + Guidelines</a> section of the most current handbook.</p> -<p><hr> -<p><pre> + <p>Here are the one-line descriptions for each of the directories:</p> + <hr> +<pre> %%SUBDIR%% -</pre><p><hr> -</body> +</pre> + <hr> + </body> </html> >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110201457.f9KEvkh77056>