Extract the "Order of Variables in Port Makefiles" into its own chapter.
Translators, the only changed things are the xml:id's. Sponsored by: Absolight, The FreeBSD Foundation
This commit is contained in:
parent
80b1776453
commit
6fa1478dc3
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=50619
6 changed files with 478 additions and 451 deletions
|
@ -33,6 +33,7 @@ SRCS+= upgrading/chapter.xml
|
|||
SRCS+= security/chapter.xml
|
||||
SRCS+= porting-dads/chapter.xml
|
||||
SRCS+= porting-samplem/chapter.xml
|
||||
SRCS+= order/chapter.xml
|
||||
SRCS+= keeping-up/chapter.xml
|
||||
SRCS+= uses/chapter.xml
|
||||
SRCS+= versions/chapter.xml
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
&chap.security;
|
||||
&chap.porting-dads;
|
||||
&chap.porting-samplem;
|
||||
&chap.order;
|
||||
&chap.keeping-up;
|
||||
&chap.uses;
|
||||
&chap.versions;
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
<!ENTITY chap.security SYSTEM "security/chapter.xml">
|
||||
<!ENTITY chap.porting-dads SYSTEM "porting-dads/chapter.xml">
|
||||
<!ENTITY chap.porting-samplem SYSTEM "porting-samplem/chapter.xml">
|
||||
<!ENTITY chap.order SYSTEM "order/chapter.xml">
|
||||
<!ENTITY chap.keeping-up SYSTEM "keeping-up/chapter.xml">
|
||||
<!ENTITY chap.uses SYSTEM "uses/chapter.xml">
|
||||
<!ENTITY chap.versions SYSTEM "versions/chapter.xml">
|
||||
|
|
15
en_US.ISO8859-1/books/porters-handbook/order/Makefile
Normal file
15
en_US.ISO8859-1/books/porters-handbook/order/Makefile
Normal file
|
@ -0,0 +1,15 @@
|
|||
#
|
||||
# Build the Porters Handbook with just the content from this chapter.
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
CHAPTERS= order/chapter.xml
|
||||
|
||||
VPATH= ..
|
||||
|
||||
MASTERDOC= ${.CURDIR}/../${DOC}.${DOCBOOKSUFFIX}
|
||||
|
||||
DOC_PREFIX?= ${.CURDIR}/../../../..
|
||||
|
||||
.include "../Makefile"
|
460
en_US.ISO8859-1/books/porters-handbook/order/chapter.xml
Normal file
460
en_US.ISO8859-1/books/porters-handbook/order/chapter.xml
Normal file
|
@ -0,0 +1,460 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!--
|
||||
The FreeBSD Documentation Project
|
||||
|
||||
$FreeBSD$
|
||||
-->
|
||||
|
||||
<chapter xmlns="http://docbook.org/ns/docbook"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0"
|
||||
xml:id="porting-order">
|
||||
|
||||
<title>Order of Variables in Port Makefiles</title>
|
||||
|
||||
<para>The first sections of the <filename>Makefile</filename>
|
||||
must always come in the same order. This standard makes it so
|
||||
everyone can easily read any port without having to search for
|
||||
variables in a random order.</para>
|
||||
|
||||
<para>The first line of a <filename>Makefile</filename> is always
|
||||
a comment containing the <application>Subversion</application>
|
||||
version control ID, followed by an empty line. In new ports, it
|
||||
looks like this:</para>
|
||||
|
||||
<programlisting># $FreeBSD$
|
||||
</programlisting>
|
||||
|
||||
<para>In existing ports, <application>Subversion</application>
|
||||
has expanded it to look like this:</para>
|
||||
|
||||
<programlisting># $FreeBSD: head/ports-mgmt/pkg/Makefile 437007 2017-03-26 21:25:47Z bapt $
|
||||
</programlisting>
|
||||
|
||||
<note>
|
||||
<para>The sections and variables described here are mandatory in
|
||||
a ordinary port. In a slave port, many sections variables and
|
||||
can be skipped.</para>
|
||||
</note>
|
||||
|
||||
<important>
|
||||
<para>Each following block must be separated from the previous
|
||||
block by a single blank line.</para>
|
||||
|
||||
<para>In the following blocks, only set the variables that are
|
||||
required by the port. Define these variables in the order
|
||||
they are shown here.</para>
|
||||
</important>
|
||||
|
||||
<sect1 xml:id="porting-order-portname">
|
||||
<title><varname>PORTNAME</varname> Block</title>
|
||||
|
||||
<para>This block is the most important. It defines the port
|
||||
name, version, distribution file location, and category. The
|
||||
variables must be in this order:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-portname"><varname>PORTNAME</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-portname"><varname>PORTVERSION</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-distversion"><varname>DISTVERSIONPREFIX</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-distversion"><varname>DISTVERSION</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-distversion"><varname>DISTVERSIONSUFFIX</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-portrevision"><varname>PORTREVISION</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-portepoch"><varname>PORTEPOCH</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-categories"><varname>CATEGORIES</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-master_sites"><varname>MASTER_SITES</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-master_sites-shorthand"><varname>MASTER_SITE_SUBDIR</varname></link>
|
||||
(deprecated)</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="porting-pkgnameprefix-suffix"><varname>PKGNAMEPREFIX</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="porting-pkgnameprefix-suffix"><varname>PKGNAMESUFFIX</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-distversion"><varname>DISTNAME</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-extract_sufx"><varname>EXTRACT_SUFX</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-distfiles-definition"><varname>DISTFILES</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-dist_subdir"><varname>DIST_SUBDIR</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-extract_only"><varname>EXTRACT_ONLY</varname></link></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<important>
|
||||
<para>Only one of <varname>PORTVERSION</varname> and
|
||||
<varname>DISTVERSION</varname> can be used.</para>
|
||||
</important>
|
||||
</sect1>
|
||||
|
||||
<sect1 xml:id="porting-order-patch">
|
||||
<title><varname>PATCHFILES</varname> Block</title>
|
||||
|
||||
<para>This block is optional. The variables are:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="porting-patchfiles"><varname>PATCH_SITES</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="porting-patchfiles"><varname>PATCHFILES</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="porting-patchfiles"><varname>PATCH_DIST_STRIP</varname></link></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</sect1>
|
||||
|
||||
<sect1 xml:id="porting-order-maintainer">
|
||||
<title><varname>MAINTAINER</varname> Block</title>
|
||||
|
||||
<para>This block is mandatory. The variables are:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-maintainer"><varname>MAINTAINER</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-comment"><varname>COMMENT</varname></link></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</sect1>
|
||||
|
||||
<sect1 xml:id="porting-order-license">
|
||||
<title><varname>LICENSE</varname> Block</title>
|
||||
|
||||
<para>This block is optional, although it is highly recommended.
|
||||
The variables are:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="licenses-license"><varname>LICENSE</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="licenses-license_comb"><varname>LICENSE_COMB</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="licenses-license_groups"><varname>LICENSE_GROUPS</varname></link>
|
||||
or
|
||||
<varname>LICENSE_GROUPS_<replaceable>NAME</replaceable></varname></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="licenses-license_name"><varname>LICENSE_NAME</varname></link>
|
||||
or
|
||||
<varname>LICENSE_NAME_<replaceable>NAME</replaceable></varname></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="licenses-license_text"><varname>LICENSE_TEXT</varname></link>
|
||||
or
|
||||
<varname>LICENSE_TEXT_<replaceable>NAME</replaceable></varname></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="licenses-license_file"><varname>LICENSE_FILE</varname></link>
|
||||
or
|
||||
<varname>LICENSE_FILE_<replaceable>NAME</replaceable></varname></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="licenses-license_perms"><varname>LICENSE_PERMS</varname></link>
|
||||
or
|
||||
<varname>LICENSE_PERMS_<replaceable>NAME</replaceable></varname></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="licenses-license_distfiles"><varname>LICENSE_DISTFILES</varname></link>
|
||||
or
|
||||
<varname>LICENSE_DISTFILES_<replaceable>NAME</replaceable></varname></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>If there are multiple licenses, sort the different
|
||||
LICENSE_<replaceable>VAR</replaceable>_<replaceable>NAME</replaceable>
|
||||
variables by license name.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 xml:id="porting-order-broken">
|
||||
<title>Generic
|
||||
<varname>BROKEN</varname>/<varname>IGNORE</varname>/<varname>DEPRECATED</varname>
|
||||
Messages</title>
|
||||
|
||||
<para>This block is optional. The variables are:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="dads-deprecated">DEPRECATED</link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="dads-deprecated">EXPIRATION_DATE</link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link linkend="dads-noinstall">FORBIDDEN</link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link linkend="dads-noinstall">BROKEN</link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link linkend="dads-noinstall">BROKEN_<replaceable>*</replaceable></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link linkend="dads-noinstall">IGNORE</link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link linkend="dads-noinstall">IGNORE_<replaceable>*</replaceable></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link linkend="dads-noinstall">ONLY_FOR_ARCHS</link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link linkend="dads-noinstall">ONLY_FOR_ARCHS_REASON<replaceable>*</replaceable></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link linkend="dads-noinstall">NOT_FOR_ARCHS</link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link linkend="dads-noinstall">NOT_FOR_ARCHS_REASON<replaceable>*</replaceable></link></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<note>
|
||||
<para><varname>BROKEN<replaceable>*</replaceable></varname>
|
||||
and <varname>IGNORE<replaceable>*</replaceable></varname>
|
||||
can be any generic variables, for example,
|
||||
<varname>IGNORE_amd64</varname>,
|
||||
<varname>BROKEN_FreeBSD_10</varname>,
|
||||
<varname>BROKEN_SSL</varname>, etc.</para>
|
||||
|
||||
<para>If the port is marked BROKEN when some conditions are
|
||||
met, and such conditions can only be tested after including
|
||||
<filename>bsd.port.options.mk</filename> or
|
||||
<filename>bsd.port.pre.mk</filename>, then those variables
|
||||
should be set later, in <xref
|
||||
linkend="porting-order-rest"/>.</para>
|
||||
</note>
|
||||
</sect1>
|
||||
|
||||
<sect1 xml:id="porting-order-depends">
|
||||
<title>The Dependencies Block</title>
|
||||
|
||||
<para>This block is optional. The variables are:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-fetch_depends"><varname>FETCH_DEPENDS</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-extract_depends"><varname>EXTRACT_DEPENDS</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-patch_depends"><varname>PATCH_DEPENDS</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-build_depends"><varname>BUILD_DEPENDS</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-lib_depends"><varname>LIB_DEPENDS</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-run_depends"><varname>RUN_DEPENDS</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<!-- FIXME: write a section about tests -->
|
||||
<para><varname>TEST_DEPENDS</varname></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</sect1>
|
||||
|
||||
<sect1 xml:id="porting-order-uses">
|
||||
<title><varname>USES</varname> and
|
||||
<varname>USE_<replaceable>x</replaceable></varname></title>
|
||||
|
||||
<para>Start this section with defining <varname>USES</varname>,
|
||||
and then possible
|
||||
<varname>USE_<replaceable>x</replaceable></varname>.</para>
|
||||
|
||||
<para>Keep related variables close together. For example, if
|
||||
using <link
|
||||
linkend="makefile-master_sites-github"><varname>USE_GITHUB</varname></link>,
|
||||
always put the
|
||||
<varname>GH_<replaceable>*</replaceable></varname> variables
|
||||
right after it.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 xml:id="porting-order-variables">
|
||||
<title>Standard <filename>bsd.port.mk</filename> Variables</title>
|
||||
|
||||
<para>This section block is for variables that can be defined in
|
||||
<filename>bsd.port.mk</filename> that do not belong in any
|
||||
of the previous section blocks.</para>
|
||||
|
||||
<para>Order is not important, however try to keep similar variables together.
|
||||
For example uid and gid variables <varname>USERS</varname> and <varname>GROUPS</varname>.
|
||||
Configuration variables <varname>CONFIGURE_<replaceable>*</replaceable></varname> and
|
||||
<varname><replaceable>*</replaceable>_CONFIGURE</varname>. List of files, and directories
|
||||
<varname>PORTDOCS</varname> and <varname>PORTEXAMPLES</varname>.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 xml:id="porting-order-options">
|
||||
<title>Options</title>
|
||||
|
||||
<para>If the port uses the <link
|
||||
linkend="makefile-options">options framework</link>, define
|
||||
<varname>OPTIONS_DEFINE</varname> and
|
||||
<varname>OPTIONS_DEFAULT</varname> first, then the other
|
||||
<varname>OPTIONS_<replaceable>*</replaceable></varname>
|
||||
variables first, then the
|
||||
<varname><replaceable>*</replaceable>_DESC</varname>
|
||||
descriptions, then the options helpers. Try and sort all of
|
||||
those alphabetically.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 xml:id="porting-order-rest">
|
||||
<title>The Rest of the Variables</title>
|
||||
|
||||
<para>And then, the rest of the variables that are not
|
||||
mentioned in the previous blocks.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 xml:id="porting-order-targets">
|
||||
<title>The Targets</title>
|
||||
|
||||
<para>After all the variables are defined, the optional
|
||||
&man.make.1; targets can be defined. Keep
|
||||
<literal>pre-<replaceable>*</replaceable></literal> before
|
||||
<literal>post-<replaceable>*</replaceable></literal> and in
|
||||
the same order as the different stages run:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><varname>fetch</varname></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><varname>extract</varname></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><varname>patch</varname></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><varname>configure</varname></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><varname>build</varname></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><varname>install</varname></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><varname>test</varname></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</sect1>
|
||||
</chapter>
|
|
@ -112,455 +112,4 @@ pre-install:
|
|||
[and then the epilogue]
|
||||
|
||||
.include <bsd.port.mk></programlisting>
|
||||
|
||||
<sect1 xml:id="porting-samplem-order">
|
||||
<title>Order of Variables in Port Makefiles</title>
|
||||
|
||||
<para>The first sections of the <filename>Makefile</filename>
|
||||
must always come in the same order. This standard makes it so
|
||||
everyone can easily read any port without having to search for
|
||||
variables in a random order.</para>
|
||||
|
||||
<para>The first line of a <filename>Makefile</filename> is always
|
||||
a comment containing the <application>Subversion</application>
|
||||
version control ID, followed by an empty line. In new ports, it
|
||||
looks like this:</para>
|
||||
|
||||
<programlisting># $FreeBSD$
|
||||
</programlisting>
|
||||
|
||||
<para>In existing ports, <application>Subversion</application>
|
||||
has expanded it to look like this:</para>
|
||||
|
||||
<programlisting># $FreeBSD: head/ports-mgmt/pkg/Makefile 437007 2017-03-26 21:25:47Z bapt $
|
||||
</programlisting>
|
||||
|
||||
<note>
|
||||
<para>The sections and variables described here are mandatory in
|
||||
a ordinary port. In a slave port, many sections variables and
|
||||
can be skipped.</para>
|
||||
</note>
|
||||
|
||||
<important>
|
||||
<para>Each following block must be separated from the previous
|
||||
block by a single blank line.</para>
|
||||
|
||||
<para>In the following blocks, only set the variables that are
|
||||
required by the port. Define these variables in the order
|
||||
they are shown here.</para>
|
||||
</important>
|
||||
|
||||
<sect2 xml:id="porting-samplem-portname">
|
||||
<title><varname>PORTNAME</varname> Block</title>
|
||||
|
||||
<para>This block is the most important. It defines the port
|
||||
name, version, distribution file location, and category. The
|
||||
variables must be in this order:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-portname"><varname>PORTNAME</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-portname"><varname>PORTVERSION</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-distversion"><varname>DISTVERSIONPREFIX</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-distversion"><varname>DISTVERSION</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-distversion"><varname>DISTVERSIONSUFFIX</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-portrevision"><varname>PORTREVISION</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-portepoch"><varname>PORTEPOCH</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-categories"><varname>CATEGORIES</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-master_sites"><varname>MASTER_SITES</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-master_sites-shorthand"><varname>MASTER_SITE_SUBDIR</varname></link>
|
||||
(deprecated)</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="porting-pkgnameprefix-suffix"><varname>PKGNAMEPREFIX</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="porting-pkgnameprefix-suffix"><varname>PKGNAMESUFFIX</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-distversion"><varname>DISTNAME</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-extract_sufx"><varname>EXTRACT_SUFX</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-distfiles-definition"><varname>DISTFILES</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-dist_subdir"><varname>DIST_SUBDIR</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-extract_only"><varname>EXTRACT_ONLY</varname></link></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<important>
|
||||
<para>Only one of <varname>PORTVERSION</varname> and
|
||||
<varname>DISTVERSION</varname> can be used.</para>
|
||||
</important>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="porting-samplem-patch">
|
||||
<title><varname>PATCHFILES</varname> Block</title>
|
||||
|
||||
<para>This block is optional. The variables are:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="porting-patchfiles"><varname>PATCH_SITES</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="porting-patchfiles"><varname>PATCHFILES</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="porting-patchfiles"><varname>PATCH_DIST_STRIP</varname></link></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="porting-samplem-maintainer">
|
||||
<title><varname>MAINTAINER</varname> Block</title>
|
||||
|
||||
<para>This block is mandatory. The variables are:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-maintainer"><varname>MAINTAINER</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-comment"><varname>COMMENT</varname></link></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="porting-samplem-license">
|
||||
<title><varname>LICENSE</varname> Block</title>
|
||||
|
||||
<para>This block is optional, although it is highly recommended.
|
||||
The variables are:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="licenses-license"><varname>LICENSE</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="licenses-license_comb"><varname>LICENSE_COMB</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="licenses-license_groups"><varname>LICENSE_GROUPS</varname></link>
|
||||
or
|
||||
<varname>LICENSE_GROUPS_<replaceable>NAME</replaceable></varname></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="licenses-license_name"><varname>LICENSE_NAME</varname></link>
|
||||
or
|
||||
<varname>LICENSE_NAME_<replaceable>NAME</replaceable></varname></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="licenses-license_text"><varname>LICENSE_TEXT</varname></link>
|
||||
or
|
||||
<varname>LICENSE_TEXT_<replaceable>NAME</replaceable></varname></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="licenses-license_file"><varname>LICENSE_FILE</varname></link>
|
||||
or
|
||||
<varname>LICENSE_FILE_<replaceable>NAME</replaceable></varname></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="licenses-license_perms"><varname>LICENSE_PERMS</varname></link>
|
||||
or
|
||||
<varname>LICENSE_PERMS_<replaceable>NAME</replaceable></varname></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="licenses-license_distfiles"><varname>LICENSE_DISTFILES</varname></link>
|
||||
or
|
||||
<varname>LICENSE_DISTFILES_<replaceable>NAME</replaceable></varname></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<para>If there are multiple licenses, sort the different
|
||||
LICENSE_<replaceable>VAR</replaceable>_<replaceable>NAME</replaceable>
|
||||
variables by license name.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="porting-samplem-broken">
|
||||
<title>Generic
|
||||
<varname>BROKEN</varname>/<varname>IGNORE</varname>/<varname>DEPRECATED</varname>
|
||||
Messages</title>
|
||||
|
||||
<para>This block is optional. The variables are:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="dads-deprecated">DEPRECATED</link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="dads-deprecated">EXPIRATION_DATE</link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link linkend="dads-noinstall">FORBIDDEN</link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link linkend="dads-noinstall">BROKEN</link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link linkend="dads-noinstall">BROKEN_<replaceable>*</replaceable></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link linkend="dads-noinstall">IGNORE</link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link linkend="dads-noinstall">IGNORE_<replaceable>*</replaceable></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link linkend="dads-noinstall">ONLY_FOR_ARCHS</link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link linkend="dads-noinstall">ONLY_FOR_ARCHS_REASON<replaceable>*</replaceable></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link linkend="dads-noinstall">NOT_FOR_ARCHS</link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link linkend="dads-noinstall">NOT_FOR_ARCHS_REASON<replaceable>*</replaceable></link></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
|
||||
<note>
|
||||
<para><varname>BROKEN<replaceable>*</replaceable></varname>
|
||||
and <varname>IGNORE<replaceable>*</replaceable></varname>
|
||||
can be any generic variables, for example,
|
||||
<varname>IGNORE_amd64</varname>,
|
||||
<varname>BROKEN_FreeBSD_10</varname>,
|
||||
<varname>BROKEN_SSL</varname>, etc.</para>
|
||||
|
||||
<para>If the port is marked BROKEN when some conditions are
|
||||
met, and such conditions can only be tested after including
|
||||
<filename>bsd.port.options.mk</filename> or
|
||||
<filename>bsd.port.pre.mk</filename>, then those variables
|
||||
should be set later, in <xref
|
||||
linkend="porting-samplem-rest"/>.</para>
|
||||
</note>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="porting-samplem-depends">
|
||||
<title>The Dependencies Block</title>
|
||||
|
||||
<para>This block is optional. The variables are:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-fetch_depends"><varname>FETCH_DEPENDS</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-extract_depends"><varname>EXTRACT_DEPENDS</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-patch_depends"><varname>PATCH_DEPENDS</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-build_depends"><varname>BUILD_DEPENDS</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-lib_depends"><varname>LIB_DEPENDS</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><link
|
||||
linkend="makefile-run_depends"><varname>RUN_DEPENDS</varname></link></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<!-- FIXME: write a section about tests -->
|
||||
<para><varname>TEST_DEPENDS</varname></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="porting-samplem-uses">
|
||||
<title><varname>USES</varname> and
|
||||
<varname>USE_<replaceable>x</replaceable></varname></title>
|
||||
|
||||
<para>Start this section with defining <varname>USES</varname>,
|
||||
and then possible
|
||||
<varname>USE_<replaceable>x</replaceable></varname>.</para>
|
||||
|
||||
<para>Keep related variables close together. For example, if
|
||||
using <link
|
||||
linkend="makefile-master_sites-github"><varname>USE_GITHUB</varname></link>,
|
||||
always put the
|
||||
<varname>GH_<replaceable>*</replaceable></varname> variables
|
||||
right after it.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="porting-samplem-variables">
|
||||
<title>Standard <filename>bsd.port.mk</filename> Variables</title>
|
||||
|
||||
<para>This section block is for variables that can be defined in
|
||||
<filename>bsd.port.mk</filename> that do not belong in any
|
||||
of the previous section blocks.</para>
|
||||
|
||||
<para>Order is not important, however try to keep similar variables together.
|
||||
For example uid and gid variables <varname>USERS</varname> and <varname>GROUPS</varname>.
|
||||
Configuration variables <varname>CONFIGURE_<replaceable>*</replaceable></varname> and
|
||||
<varname><replaceable>*</replaceable>_CONFIGURE</varname>. List of files, and directories
|
||||
<varname>PORTDOCS</varname> and <varname>PORTEXAMPLES</varname>.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="porting-samplem-options">
|
||||
<title>Options</title>
|
||||
|
||||
<para>If the port uses the <link
|
||||
linkend="makefile-options">options framework</link>, define
|
||||
<varname>OPTIONS_DEFINE</varname> and
|
||||
<varname>OPTIONS_DEFAULT</varname> first, then the other
|
||||
<varname>OPTIONS_<replaceable>*</replaceable></varname>
|
||||
variables first, then the
|
||||
<varname><replaceable>*</replaceable>_DESC</varname>
|
||||
descriptions, then the options helpers. Try and sort all of
|
||||
those alphabetically.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="porting-samplem-rest">
|
||||
<title>The Rest of the Variables</title>
|
||||
|
||||
<para>And then, the rest of the variables that are not
|
||||
mentioned in the previous blocks.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="porting-samplem-targets">
|
||||
<title>The Targets</title>
|
||||
|
||||
<para>After all the variables are defined, the optional
|
||||
&man.make.1; targets can be defined. Keep
|
||||
<literal>pre-<replaceable>*</replaceable></literal> before
|
||||
<literal>post-<replaceable>*</replaceable></literal> and in
|
||||
the same order as the different stages run:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><varname>fetch</varname></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><varname>extract</varname></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><varname>patch</varname></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><varname>configure</varname></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><varname>build</varname></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><varname>install</varname></para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><varname>test</varname></para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</sect2>
|
||||
</sect1>
|
||||
</chapter>
|
||||
|
|
Loading…
Reference in a new issue