- Talk about MASTER_SITES abbreviations and give default values of the widely

used ones

PR:		docs/152645
This commit is contained in:
Pav Lucistnik 2010-11-29 14:13:01 +00:00
parent 6a78ff994c
commit 8eda6a1930
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=36636

View file

@ -2293,28 +2293,132 @@ PORTEPOCH= 1</programlisting>
helping this effort.</para>
<para>If the original tarball is part of one of the popular
archives such as X-contrib, GNU, or Perl CPAN, you may be able
archives such as SourceForge, GNU, or Perl CPAN, you may be able
refer to those sites in an easy compact form using
<makevar>MASTER_SITE_<replaceable>*</replaceable></makevar>
(e.g., <makevar>MASTER_SITE_XCONTRIB</makevar>,
(e.g., <makevar>MASTER_SITE_SOURCEFORGE</makevar>,
<makevar>MASTER_SITE_GNU</makevar> and
<makevar>MASTER_SITE_PERL_CPAN</makevar>). Simply set
<makevar>MASTER_SITES</makevar> to one of these variables and
<makevar>MASTER_SITE_SUBDIR</makevar> to the path within the
archive. Here is an example:</para>
<programlisting>MASTER_SITES= ${MASTER_SITE_XCONTRIB}
MASTER_SITE_SUBDIR= applications</programlisting>
<programlisting>MASTER_SITES= ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= make</programlisting>
<para>Or you can use a condensed format:</para>
<programlisting>MASTER_SITES= GNU/make</programlisting>
<para>These variables are defined in
<filename>/usr/ports/Mk/bsd.sites.mk</filename>. There are
new entries added all the time, so make sure to check the
latest version of this file before submitting a port.</para>
<para>The user can also set the <makevar>MASTER_SITE_*</makevar>
variables in <filename>/etc/make.conf</filename> to override our
choices, and use their favorite mirrors of these popular archives
instead.</para>
<para>Several <emphasis>magic</emphasis> macros exist for popular sites
with a predictable directory structure. For these, just use the
abbreviation and the system will try to guess the correct
subdirectory for you.</para>
<programlisting>MASTER_SITES= SF</programlisting>
<para>If the guess is incorrect, it can be overriden as follows.</para>
<programlisting>MASTER_SITES= SF/stardict/WyabdcRealPeopleTTS/${PORTVERSION}</programlisting>
<table frame="none">
<title>Popular magic <makevar>MASTER_SITES</makevar> macros</title>
<tgroup cols="2">
<thead>
<row>
<entry>Macro</entry>
<entry>Assumed subdirectory</entry>
</row>
</thead>
<tbody>
<row>
<entry><makevar>APACHE_JAKARTA</makevar></entry>
<entry><makevar>/dist/jakarta/${PORTNAME:S,-,,/,}/source</makevar></entry>
</row>
<row>
<entry><makevar>BERLIOS</makevar></entry>
<entry><makevar>/${PORTNAME:L}</makevar></entry>
</row>
<row>
<entry><makevar>CHEESESHOP</makevar></entry>
<entry><makevar>/packages/source/source/${DISTNAME:C/(.).*/\1/}/${DISTNAME:C/(.*)-[0-9].*/\1/}</makevar></entry>
</row>
<row>
<entry><makevar>DEBIAN</makevar></entry>
<entry><makevar>/debian/pool/main/${PORTNAME:C/^((lib)?.).*$/\1/}/${PORTNAME}</makevar></entry>
</row>
<row>
<entry><makevar>GCC</makevar></entry>
<entry><makevar>/pub/gcc/releases/${DISTNAME}</makevar></entry>
</row>
<row>
<entry><makevar>GNOME</makevar></entry>
<entry><makevar>/pub/GNOME/sources/${PORTNAME}/${PORTVERSION:C/^([0-9]+\.[0-9]+).*/\1/}</makevar></entry>
</row>
<row>
<entry><makevar>GNU</makevar></entry>
<entry><makevar>/gnu/${PORTNAME}</makevar></entry>
</row>
<row>
<entry><makevar>MOZDEV</makevar></entry>
<entry><makevar>/pub/mozdev/${PORTNAME:L}</makevar></entry>
</row>
<row>
<entry><makevar>PERL_CPAN</makevar></entry>
<entry><makevar>/pub/CPAN/modules/by-module/${PORTNAME:C/-.*//}</makevar></entry>
</row>
<row>
<entry><makevar>PYTHON</makevar></entry>
<entry><makevar>/ftp/python/${PYTHON_PORTVERSION:C/rc[0-9]//}</makevar></entry>
</row>
<row>
<entry><makevar>RUBYFORGE</makevar></entry>
<entry><makevar>/${PORTNAME:L}</makevar></entry>
</row>
<row>
<entry><makevar>SAVANNAH</makevar></entry>
<entry><makevar>/${PORTNAME:L}</makevar></entry>
</row>
<row>
<entry><makevar>SF</makevar></entry>
<entry><makevar>/project/${PORTNAME:L}/${PORTNAME:L}/${PORTVERSION}</makevar></entry>
</row>
</tbody>
</tgroup>
</table>
</sect2>
<sect2>