pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/doc/guide import The pkgsrc guide, the docbook convers...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/cb080fdeefd4
branches:  trunk
changeset: 482181:cb080fdeefd4
user:      grant <grant%pkgsrc.org@localhost>
date:      Thu Oct 21 14:27:36 2004 +0000

description:
import The pkgsrc guide, the docbook conversion/replacement of
Packages.txt; Packages.txt will be going away.

this package contains the source files and a mechanism to install
pkgsrc/doc/pkgsrc.{html,txt} which are distributed with pkgsrc. it
uses the same docbook infrastructure that is used to build the
documentation on www.NetBSD.org.

diffstat:

 doc/guide/DESCR                              |     4 +
 doc/guide/Makefile                           |    97 +
 doc/guide/PLIST                              |     2 +
 doc/guide/distinfo                           |     4 +
 doc/guide/files/Makefile                     |    42 +
 doc/guide/files/binary.xml                   |   421 +++++++
 doc/guide/files/build.xml                    |   710 ++++++++++++
 doc/guide/files/buildlink.xml                |   571 ++++++++++
 doc/guide/files/chapters.ent                 |    24 +
 doc/guide/files/components.xml               |   400 +++++++
 doc/guide/files/debug.xml                    |   130 ++
 doc/guide/files/examples.xml                 |   202 +++
 doc/guide/files/faq.xml                      |   537 +++++++++
 doc/guide/files/features.xml                 |  1246 ++++++++++++++++++++++
 doc/guide/files/fixes.xml                    |  1425 ++++++++++++++++++++++++++
 doc/guide/files/ftp-layout.xml               |    94 +
 doc/guide/files/getting.xml                  |    59 +
 doc/guide/files/introduction.xml             |   227 ++++
 doc/guide/files/logs.xml                     |   111 ++
 doc/guide/files/options.xml                  |   152 ++
 doc/guide/files/pkgsrc.xml                   |    86 +
 doc/guide/files/platforms.xml                |   463 ++++++++
 doc/guide/files/plist.xml                    |   293 +++++
 doc/guide/files/share/catalog                |     4 +
 doc/guide/files/share/default-html-chunk.xsl |    11 +
 doc/guide/files/share/default-html.xsl       |    11 +
 doc/guide/files/share/default.dsl            |    15 +
 doc/guide/files/submit.xml                   |   193 +++
 doc/guide/files/using.xml                    |   286 +++++
 29 files changed, 7820 insertions(+), 0 deletions(-)

diffs (truncated from 7936 to 300 lines):

diff -r 3aa83a5b78dc -r cb080fdeefd4 doc/guide/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/guide/DESCR   Thu Oct 21 14:27:36 2004 +0000
@@ -0,0 +1,4 @@
+The pkgsrc guide is a package containing the pkgsrc user and developer
+documentation. It is written in DocBook/XML and supports a number of
+outputs including PostScript, PDF, browsable (split) HTML, a single
+HTML file and plain text.
diff -r 3aa83a5b78dc -r cb080fdeefd4 doc/guide/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/guide/Makefile        Thu Oct 21 14:27:36 2004 +0000
@@ -0,0 +1,97 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/10/21 14:27:37 grant Exp $
+#
+
+DISTNAME=              htdocs-share-20041021
+PKGNAME=               pkgsrc-guide-${PKGVERSION}
+CATEGORIES=            # empty
+MASTER_SITES=          ${MASTER_SITE_LOCAL}
+
+MAINTAINER=            packages%NetBSD.org@localhost
+HOMEPAGE=              http://www.NetBSD.org/Documentation/pkgsrc/
+COMMENT=               The pkgsrc guide
+
+# the "install-doc" target installs pkgsrc/doc/pkgsrc.{html,txt} which
+# both need to be committed to CVS.
+
+PKGVERSION!=           date '+%Y%m%d'
+DIST_SUBDIR=           ${PKGBASE}
+NO_CONFIGURE=          # defined
+NO_MTREE=              # defined
+USE_LANGUAGES=         # empty
+
+PLIST_SRC=             ${WRKDIR}/PLIST_DYNAMIC
+DOCDIR=                        ${PREFIX}/share/doc/pkgsrc
+
+BUILD_DEFS+=           OUTPUTS
+OUTPUTS?=              html html-split ascii
+
+# the html is needed to build the ascii version.
+.if !empty(OUTPUTS:Mascii)
+OUTPUTS+=              html
+.endif
+
+# html output
+BUILD_DEPENDS+=                docbook>=4.0:../../textproc/docbook
+BUILD_DEPENDS+=                docbook-xml>=4.0:../../textproc/docbook-xml
+BUILD_DEPENDS+=                docbook-xsl>=1.62.4:../../textproc/docbook-xsl
+BUILD_DEPENDS+=                dsssl-docbook-modular>=1.54:../../textproc/dsssl-docbook-modular
+BUILD_DEPENDS+=                opensp>=1.5:../../textproc/opensp
+BUILD_DEPENDS+=                libxslt>=1.0.30:../../textproc/libxslt
+
+.if !empty(OUTPUTS:Mhtml*)
+BUILD_DEPENDS+=                tidy>=20021108:../../www/tidy
+.endif
+
+.if !empty(OUTPUTS:Mascii)
+BUILD_DEPENDS+=                w3m>=0.4:../../www/w3m
+.endif
+
+.if !empty(OUTPUTS:Mps) || !empty(OUTPUTS:Mpdf)
+BUILD_DEPENDS+=                openjade>=1.3.2:../../textproc/openjade
+BUILD_DEPENDS+=                tex-jadetex>=3.13:../../print/tex-jadetex
+USE_GHOSTSCRIPT=       build
+GHOSTSCRIPT_REQD=      7.05
+.  include "../../mk/ghostscript.mk"
+.endif
+
+pre-extract:
+       @cd ${FILESDIR} && ${PAX} -rw . ${WRKSRC}
+
+do-build:
+.for _output_ in ${OUTPUTS}
+       @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} ${_output_}
+.endfor
+
+do-install:
+       ${INSTALL_DATA_DIR} ${DOCDIR}
+.if !empty(OUTPUTS:Mhtml) || !empty(OUTPUTS:Mhtml-split)
+       ${INSTALL_DATA} ${WRKSRC}/*.html ${DOCDIR}
+       ${INSTALL_DATA} ${WRKDIR}/htdocs/NetBSD.css ${DOCDIR}
+.endif
+.if !empty(OUTPUTS:Mascii)
+       ${INSTALL_DATA} ${WRKSRC}/pkgsrc.txt ${DOCDIR}
+.endif
+.if !empty(OUTPUTS:Mpdf)
+       ${INSTALL_DATA} ${WRKSRC}/pkgsrc.ps ${DOCDIR}
+       ${INSTALL_DATA} ${WRKSRC}/pkgsrc.pdf ${DOCDIR}
+.endif
+
+post-install:
+       @${FIND} ${DOCDIR} \( -type f -o -type l \) -print              \
+               | ${SORT} | ${SED} -e "s,${PREFIX}/,,g"                 \
+               >> ${PLIST_SRC}
+       @${FIND} ${DOCDIR} -type d -print                               \
+               | ${SORT} -r | ${SED} -e "s,${PREFIX}/,@dirrm ,g"       \
+               >> ${PLIST_SRC}
+
+# install the single-file HTML and ascii output into the pkgsrc doc/
+# directory, for distribution with pkgsrc.
+#
+# note that this uses ${CP} and not ${INSTALL_DATA} because this
+# shouldn't be done as root.
+#
+install-doc: build
+       ${CP} ${WRKSRC}/pkgsrc.html ${_PKGSRCDIR}/doc
+       ${CP} ${WRKSRC}/pkgsrc.txt ${_PKGSRCDIR}/doc
+
+.include "../../mk/bsd.pkg.mk"
diff -r 3aa83a5b78dc -r cb080fdeefd4 doc/guide/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/guide/PLIST   Thu Oct 21 14:27:36 2004 +0000
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2004/10/21 14:27:37 grant Exp $
+@comment this PLIST automatically generated
diff -r 3aa83a5b78dc -r cb080fdeefd4 doc/guide/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/guide/distinfo        Thu Oct 21 14:27:36 2004 +0000
@@ -0,0 +1,4 @@
+$NetBSD: distinfo,v 1.1.1.1 2004/10/21 14:27:36 grant Exp $
+
+SHA1 (pkgsrc-guide/htdocs-share-20041021.tar.gz) = f1aae7efc7a31d703dfb14633fa5ac6620923137
+Size (pkgsrc-guide/htdocs-share-20041021.tar.gz) = 27822 bytes
diff -r 3aa83a5b78dc -r cb080fdeefd4 doc/guide/files/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/guide/files/Makefile  Thu Oct 21 14:27:36 2004 +0000
@@ -0,0 +1,42 @@
+# $NetBSD: Makefile,v 1.1.1.1 2004/10/21 14:27:37 grant Exp $
+
+WEB_PREFIX=    ${.CURDIR}/../htdocs
+
+DOC=   pkgsrc
+
+SRCS=  pkgsrc.xml
+SRCS+= binary.xml
+SRCS+= build.xml
+SRCS+= buildlink.xml
+SRCS+= components.xml
+SRCS+= debug.xml
+SRCS+= examples.xml
+SRCS+= faq.xml
+SRCS+= fixes.xml
+SRCS+= ftp-layout.xml
+SRCS+= getting.xml
+SRCS+= introduction.xml
+SRCS+= logs.xml
+SRCS+= options.xml
+SRCS+= platforms.xml
+SRCS+= plist.xml
+SRCS+= submit.xml
+SRCS+= using.xml
+
+# entities
+SRCS+= chapters.ent
+
+# Make deeper TOC:
+XSL_DBX_WITH_TOC_SECTION_DEPTH?= 2 
+
+
+all:   # doing this as depends doesn't work
+       -${MAKE} html-split
+       -${MAKE} html
+       -${MAKE} ascii
+       -${MAKE} pdf
+
+netbsd.pdf: pdf
+netbsd.txt: ascii
+
+.include "${WEB_PREFIX}/share/mk/doc.docbook.mk"
diff -r 3aa83a5b78dc -r cb080fdeefd4 doc/guide/files/binary.xml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/doc/guide/files/binary.xml        Thu Oct 21 14:27:36 2004 +0000
@@ -0,0 +1,421 @@
+<!-- $NetBSD: binary.xml,v 1.1.1.1 2004/10/21 14:27:40 grant Exp $ -->
+
+<chapter id="binary">
+  <title>Creating binary packages</title>
+
+  <sect1>
+    <title>Building a single binary package</title>
+
+    <para>Once you have built and installed a package, you can create a
+      <emphasis>binary package</emphasis> which can be installed on another
+      system with &man.pkg.add.1;  This saves having to build the same package on
+      a group of hosts and wasting CPU time. It also provides a simple means
+      for others to install your package, should you distribute it.</para>
+
+    <para>To create a binary package, change into the appropriate
+      directory in pkgsrc, and run <command>make package</command>:</para>
+
+    <screen>&rprompt; <userinput>cd misc/figlet</userinput>
+&rprompt; <userinput>make package</userinput></screen>
+
+    <para>This will build and install your package (if not already done), and then
+      build a binary package from what was installed. You can then use the
+      <command>pkg_*</command> tools to manipulate it. Binary packages are
+      created by default in <filename>/usr/pkgsrc/packages</filename>, in the
+      form of a gzipped tar file. See <xref linkend="logs.package"/> for
+      a continuation of the above <pkg>misc/figlet</pkg> example.</para>
+
+    <para>See <xref linkend="submit"/> for information on how to submit such a
+      binary package.</para>
+  </sect1>
+
+  <sect1>
+    <title>Settings for creation of binary packages</title>
+
+    <para>See <xref linkend="build.helpful-targets"/>.</para>
+  </sect1>
+
+  <sect1 id="bulkbuild">
+    <title>Doing a bulk build of all packages</title>
+
+    <para>If you want to get a full set of precompiled binary packages, this section
+      describes how to get them. Beware that the bulk build will remove all
+      currently installed packages from your system! Having a FTP server
+      configured either on the machine doing the bulk builds or on a nearby NFS
+      server can help to make the packages available to everyone. See
+      &man.ftpd.8; for
+      more information. If you use a remote NFS server's storage, be sure to not
+      actually compile on NFS storage, as this slows things down a lot.</para>
+
+    <sect2 id="binary.configuration">
+      <title>Configuration</title>
+
+      <sect3 id="binary.mk.conf">
+       <title>/etc/mk.conf</title>
+
+       <para>You may want to set things in <filename>/etc/mk.conf</filename>.
+         Look at <filename>pkgsrc/mk/bsd.pkg.defaults.mk</filename> for
+         details of the default settings. You will want to ensure that
+         <varname>ACCEPTABLE_LICENSES</varname> meet your local policy.
+         As used in this example, <varname>_ACCEPTABLE=yes</varname>
+         accepts <emphasis>all</emphasis> licenses.</para>
+
+       <programlisting>PACKAGES?=      ${_PKGSRCDIR}/packages/${MACHINE_ARCH}
+WRKOBJDIR?=     /usr/tmp/pkgsrc   # build here instead of in pkgsrc
+BSDSRCDIR=      /usr/src
+BSDXSRCDIR=     /usr/xsrc         # for x11/xservers
+OBJHOSTNAME?=   yes               # use work.`hostname`
+FAILOVER_FETCH= yes               # insist on the correct checksum
+PKG_DEVELOPER?= yes
+_ACCEPTABLE=    yes</programlisting>
+      </sect3>
+
+      <sect3>
+       <title><filename>build.conf</filename></title>
+
+       <para>In <filename>pkgsrc/mk/bulk</filename>, copy
+         <filename>build.conf-example</filename> to
+         <filename>build.conf</filename> and
+         edit it, following the comments in that file. This is the config
+         file that determines where log files are generated after the build,
+         where to mail the build report to, where your pkgsrc tree is located and
+         which user to &man.su.8; to to do a <command>cvs update</command>.</para>
+      </sect3>
+
+      <sect3>
+       <title><filename>pre-build.local</filename></title>
+
+       <para>It is possible to configure the bulk build to perform certain site
+         specific tasks at the end of the pre-build stage.  If the file
+         <filename>pre-build.local</filename> exists in
+         <filename>/usr/pkgsrc/mk/bulk</filename> it will be executed
+         (as a sh(1) script) at the end of the usual pre-build stage.  An
+         example use of <filename>pre-build.local</filename> is to have the
+         line:</para>
+
+       <screen>&rprompt; <userinput>echo "I do not have enough disk space to build this pig." \
+    &gt; pkgsrc/games/crafty-book-enormous/$BROKENF</userinput></screen>
+
+       <para>to prevent the system from trying to build a particular package
+         which requires nearly 3 GB of disk space.</para>
+      </sect3>
+    </sect2>
+
+    <sect2>
+      <title>Other environmental considerations</title>
+
+      <para>As <filename>/usr/pkg</filename> will be completely deleted at the
+       start of bulk builds, make sure your login shell is placed somewhere
+       else. Either drop it into <filename>/usr/local/bin</filename>
+       (and adjust your login shell in the passwd file), or (re-)install
+       it via &man.pkg.add.1; from
+       <filename>/etc/rc.local</filename>, so you can login after a reboot
+       (remember that your current process won't die if the package is
+       removed, you just can't start any new instances of the shell any more).
+       Also, if you use &os; earlier than 1.5, or you still want to use the
+       pkgsrc version of ssh for some reason, be sure to install ssh before
+       starting it from <filename>rc.local</filename>:</para>
+
+      <programlisting>( cd /usr/pkgsrc/security/ssh ; make bulk-install )
+if [ -f        /usr/pkg/etc/rc.d/sshd ]; then
+    /usr/pkg/etc/rc.d/sshd
+fi</programlisting>
+
+      <para>Not doing so will result in you being not able to log in via ssh
+       after the bulk build is finished or if the machine gets rebooted
+       or crashes. You have been warned! :)</para>
+    </sect2>



Home | Main Index | Thread Index | Old Index