Changeset 3070 for trunk/doc


Ignore:
Timestamp:
Jul 20, 2003, 5:00:53 PM (16 years ago)
Author:
fkr
Message:

Bug: #705
Submitted by: wb@… (Will Barton)
Reviewed by:
Approved by:
Obtained from:

documentation of the new mirror_sites api for the guide.

Location:
trunk/doc/guide
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/guide/Makefile

    r2759 r3070  
    1 # $Id: Makefile,v 1.6 2003/06/06 16:05:21 michaelm Exp $
     1# $Id: Makefile,v 1.7 2003/07/20 17:00:51 fkr Exp $
    22
    33# To build DarwinPorts  guide files from the source docbook xml.
     
    2727# set XML_DEBUG_CATALOG= to see catalog debugging info
    2828
    29 
    3029SOURCEDIR?=             xml
    31 DOCBOOK_XSL?=           ${PREFIX}/share/xsl/docbook-xsl/1.61.0
     30DOCBOOK_XSL?=           ${prefix}/share/xsl/docbook-xsl/1.61.0
    3231HTMLDIR?=               html
    3332XHTMLDIR?=              xhtml
    3433STYLESHEET?=            ${DOCBOOK_XSL}/html/chunk.xsl
    3534XSTYLESHEET?=           ${DOCBOOK_XSL}/xhtml/chunk.xsl
    36 XML_CATALOG_FILES?=    ${PREFIX}/etc/xml/catalog
     35XML_CATALOG_FILES?=    ${prefix}/etc/xml/catalog
    3736XML_DEBUG_CATALOG?=
    3837
     
    6968        rm -fr ${HTMLDIR} ${XHTMLDIR}
    7069       
    71 include ../../base/Mk/dports.mk
     70include ../../base/Mk/dports.autoconf.mk
  • trunk/doc/guide/xml/details.xml

    r2742 r3070  
    346346        <sect1>
    347347                <title>Fetch phase</title>
    348                 <para></para>
     348         
     349             
    349350                <variablelist> 
    350351                        <varlistentry id="master_sites">
     
    355356                                        include the name of the file being retrieved.</para>
    356357                                       
    357                                         <para><userinput></userinput></para>
    358                                        
    359358                                        <para>If you have multiple sites you should break up
    360359                                        long lines with escapend newlines. </para>
    361                                         <para><programlisting><userinput>master_sites
    362                                         http://www.somesite.org/files/ \
    363                     http://www.somemirror.org/somesite_org/files/</userinput>
    364                     </programlisting></para>
     360               
     361                <programlisting><userinput>master_sites   http://www.somesite.org/files/ \
     362               http://www.somemirror.org/somesite_org/files/</userinput></programlisting>
    365363
    366364                                        <tip><para>Always put the trailing forward solidus at the
     
    370368                                        <para>If you need to retrieve files from different
    371369                                        sites you can label the urls with tags.</para>
    372                                         <para><programlisting><userinput>
    373                                         master_sites http://www.somesite.org/files/:source \
    374                                         http://www.someothersite.org/somesite_extras/:extras/
    375                                         </userinput></programlisting></para>
    376 
     370
     371                <programlisting><userinput>master_sites   http://www.somesite.org/files/:source \
     372               http://www.someothersite.org/somesite_extras/:extras</userinput></programlisting>
     373              </listitem>
     374            </varlistentry>
     375                       
     376            <varlistentry id='master_sites_subdir'>
     377              <term>master_sites.mirror_subdir</term>
     378             
     379              <listitem>
     380                <para>Subdirectory to add to mirror sites taken from a
     381                  mirror sites list.  Please see the section below on
     382                  Mirror Site Lists for more details.</para>
    377383                                </listitem>
    378384                        </varlistentry>
     
    380386                                <varlistentry id='patchsites'>
    381387                                        <term>patch_sites</term>
     388             
    382389                                        <listitem>
    383390                                                <para>List sites from which to download patchfiles
    384391                                                from, syntax is the same as master_sites. See the
    385392                                                Patch phase below for more information. </para>
    386                                                 <para><userinput>
    387                                                 patch_sites    ftp://ftp.patchcityrepo.com/pub/magic/patches
    388                                                 </userinput></para>
    389 
     393
     394                <programlisting><userinput>patch_sites    ftp://ftp.patchcityrepo.com/pub/magic/patches</userinput></programlisting>
    390395                                        </listitem>
    391396                                </varlistentry>
    392397                               
     398            <varlistentry id='patchsites_subdir'>
     399              <term>patch_sites.mirror_subdir</term>
     400             
     401              <listitem>
     402                <para>Subdirectory to add to mirror sites taken from a
     403                  mirror sites list.  Please see the section below on
     404                  Mirror Site Lists for more details.</para>
     405              </listitem>
     406            </varlistentry>
    393407                </variablelist>
     408         
     409          <sect2>
     410            <title>Mirror Site Lists</title>
     411
     412            <para>Mirror site lists are, as one might guess, predefined
     413              lists of mirror sites for use in
     414              <varname>master_sites</varname> or
     415              <varname>patch_sites</varname>.  The basic usage of mirror
     416              site lists in a <filename>Portfile</filename> is:</para>
     417
     418            <programlisting><userinput>master_sites                sourceforge http://distfiles.opendarwin.org/
     419master_sites.mirror_subdir  ${name}</userinput></programlisting>
     420
     421            <para>Where '<varname>sourceforge</varname>' is the name of
     422              the mirror list which specifies SourceForge mirrors.
     423              <varname>master_sites.mirror_subdir</varname> is used to
     424              specify the subdirectory of <emphasis>all</emphasis> sites
     425              in in any mirror lists in which the file is found.  The
     426              above example is equivalent to:</para>
     427
     428            <programlisting><userinput>master_sites  http://us.dl.sourceforge.net/${name}/ \
     429              http://eu.dl.sourceforge.net/${name}/ \
     430              ftp://us.dl.sourceforge.net/pub/sourceforge/${name}/ \
     431              ...
     432              http://distfiles.opendarwin.org/</userinput></programlisting>
     433
     434            <para>There are two potential problems when using mirror
     435              site lists as described above.  First, if you are using
     436              multiple mirror site lists, such as
     437              <varname>sourceforge</varname> and <varname>gnu</varname>,
     438              the subdirectory might not always be the same.  Second, if
     439              you have multiple distfiles and are using distfile tags to
     440              specify which site in <varname>master_sites</varname> to
     441              download which file from.</para>
     442           
     443            <para>Fortunately DarwinPorts also provides a much more
     444              powerful and flexible syntax for mirror site lists.</para>
     445
     446            <programlisting><userinput>distfiles                   file_one.tar.gz:tagone file_two.tar.gz:tagtwo file_three.tar.gz
     447master_sites                sourceforge::tagone gnu:directory:tagtwo \
     448                            http://distfiles.opendarwin.org/
     449master_sites.mirror_subdir  ${name}</userinput></programlisting>
     450
     451            <para>At first glance, this example is probably quite
     452              confusing.  Basically, the advanced syntax is
     453              <varname>list:subdirectory:tag</varname>.  The above
     454              example shows the many ways this can be used.  The above
     455              example will:</para>
     456
     457            <itemizedlist>
     458              <listitem>
     459                <para>Look for <filename>file_one.tar.gz</filename>
     460                  in:</para>
     461
     462                <programlisting>http://us.dl.sourceforge.net/${name}/
     463http://eu.dl.sourceforge.net/${name}/
     464ftp://us.dl.sourceforge.net/pub/sourceforge/${name}/
     465...</programlisting>
     466              </listitem>
     467
     468              <listitem>
     469                <para>Look for <filename>file_two.tar.gz</filename>
     470                  in:</para>
     471
     472                <programlisting>ftp://ftp.gnu.org/gnu/directory/${name}/
     473ftp://gatekeeper.dec.com/pub/GNU/directory/${name}/
     474ftp://ftp.uu.net/archive/systems/gnu/directory/${name}/
     475...</programlisting>
     476              </listitem>
     477
     478              <listitem>
     479                <para>Look for <filename>file_three.tar.gz</filename>
     480                  in:</para>
     481
     482                <programlisting>http://distfiles.opendarwin.org/</programlisting>
     483              </listitem>
     484            </itemizedlist>
     485
     486            <para>There are a few important points to remember when
     487              using this syntax.  The subdirectory specified with the
     488              list
     489              (<varname>gnu:<emphasis>directory</emphasis></varname>) is
     490              appended to all of the mirror sites in that list
     491              <emphasis>before</emphasis> the
     492              <varname>master_sites.mirror_subdir</varname>, and
     493              <varname>master_sites.mirror_subdir</varname> is
     494              <emphasis>always</emphasis> appended to the end of the
     495              mirror site.  When using tags, you are not required to
     496              specify a subdirectory
     497              (<varname>sourceforge::tagone</varname>).
     498              <varname>master_sites.mirror_subdir</varname> is also not
     499              required when specifying a subdirectory with the
     500              list.</para>
     501
     502            <para>The original example could also be have been written
     503              using this syntax without the need of
     504              <varname>master_sites.mirror_subdir</varname> like
     505              this:</para>
     506
     507            <programlisting><userinput>master_sites   sourceforge:${name} http://distfiles.opendarwin.org/</userinput></programlisting>
     508
     509            <para>The mirror site lists functionality also works exactly
     510              the same for <varname>patch_sites</varname> and
     511              <varname>patch_sites.mirror_subdir</varname>.</para>
     512
     513            <para>Below is a list of the mirror site lists that can be
     514              used.</para>
     515
     516            <itemizedlist>
     517              <listitem><para><varname>apache</varname></para></listitem>
     518              <listitem><para><varname>gnome</varname></para></listitem>
     519              <listitem><para><varname>gnu</varname></para></listitem>
     520              <listitem><para><varname>isc</varname></para></listitem>
     521              <listitem><para><varname>kde</varname></para></listitem>
     522              <listitem><para><varname>perl_cpan</varname></para></listitem>
     523              <listitem><para><varname>ruby</varname></para></listitem>
     524              <listitem><para><varname>sourceforge</varname></para></listitem>
     525              <listitem><para><varname>sunsite</varname></para></listitem>
     526              <listitem><para><varname>tcltk</varname></para></listitem>
     527              <listitem><para><varname>xcontrib</varname></para></listitem>
     528              <listitem><para><varname>xfree</varname></para></listitem>
     529            </itemizedlist>
     530          </sect2>
    394531        </sect1>
     532
    395533        <sect1>
    396534                <title>Integrity checking phase</title>
  • trunk/doc/guide/xml/quick.xml

    r2743 r3070  
    384384    </sect2>
    385385     
     386    <sect2 id="mirror_sites">
     387      <title>Mirror Site Lists</title>
     388
     389      <para>It is possible to use predefined lists of mirror sites in
     390        your <filename>Portfile</filename>, such as SourceForge or GNU
     391        mirrors.  A full list of mirror site types is available in
     392        Chapter 3, 'Fetch phase'.  The straight-forward usage is:</para>
     393
     394      <programlisting>master_sites                sourceforge http://distfiles.opendarwin.org/
     395master_sites.mirror_subdir  ${name}</programlisting>
     396
     397      <para>This will search all of the mirror sites for SourceForge and
     398        then http://distfiles.opendarwin.org, appending
     399        <varname>${name}</varname> to the end of each SoureForge mirror
     400        site in the list, for example:</para>
     401
     402      <programlisting>http://us.dl.sourceforge.net/${name}
     403ftp://us.dl.sourceforge.net/pub/sourceforge/${name}</programlisting>
     404
     405      <para>You can also use the mirror site lists in
     406        <varname>patch_sites</varname> and use
     407        <varname>patch_sites.mirror_subdir</varname> to specify the
     408        subdirectory.  For more information and advanced usage of mirror
     409        site lists (i.e. distfile tags, multiple lists with different
     410        subdirectories), please see Chapter 3, 'Fetch Phase'.</para>
     411    </sect2>
     412
    386413    <sect2 id="additional options">
    387414      <title>Additional Options</title>
     
    572599      <title>Expat <filename>Portfile</filename></title>
    573600      <programlisting><![CDATA[########################### libxslt Portfile ##################################
    574 # $Id: quick.xml,v 1.12 2003/06/04 15:58:10 michaelm Exp $
     601# $Id: quick.xml,v 1.13 2003/07/20 17:00:53 fkr Exp $
    575602
    576603PortSystem      1.0
     
    600627
    601628<programlisting><![CDATA[###########################neon Portfile####################################
    602 # $Id: quick.xml,v 1.12 2003/06/04 15:58:10 michaelm Exp $
     629# $Id: quick.xml,v 1.13 2003/07/20 17:00:53 fkr Exp $
    603630         
    604631PortSystem 1.0
Note: See TracChangeset for help on using the changeset viewer.