Source string Read only

(itstool) path: chapter/title
13/130
Context English State
Redistributions in compiled form (transformed to other DTDs, converted to PDF, PostScript, RTF and other formats) must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS DOCUMENTATION IS PROVIDED BY THE FREEBSD DOCUMENTATION PROJECT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FREEBSD DOCUMENTATION PROJECT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
FreeBSD is a registered trademark of the FreeBSD Foundation.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Sun, Sun Microsystems, Java, Java Virtual Machine, JDK, JRE, JSP, JVM, Netra, OpenJDK, Solaris, StarOffice, SunOS and VirtualBox are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this document, and the FreeBSD Project was aware of the trademark claim, the designations have been followed by the <quote>™</quote> or the <quote>®</quote> symbol.
Introduction
The FreeBSD Ports Collection is the way almost everyone installs applications ("ports") on FreeBSD. Like everything else about FreeBSD, it is primarily a volunteer effort. It is important to keep this in mind when reading this document.
In FreeBSD, anyone may submit a new port, or volunteer to maintain an existing unmaintained port. No special commit privilege is needed.
Making a New Port
Interested in making a new port, or upgrading existing ports? Great!
What follows are some guidelines for creating a new port for FreeBSD. To upgrade an existing port, read this, then read <xref linkend="port-upgrading"/>.
When this document is not sufficiently detailed, refer to <filename>/usr/ports/Mk/bsd.port.mk</filename>, which is included by all port <filename>Makefile</filename>s. Even those not hacking <filename>Makefile</filename>s daily can gain much knowledge from it. Additionally, specific questions can be sent to the <link xlink:href="http://lists.FreeBSD.org/mailman/listinfo/freebsd-ports">FreeBSD ports mailing list</link>.
Only a fraction of the variables (<varname><replaceable>VAR</replaceable></varname>) that can be overridden are mentioned in this document. Most (if not all) are documented at the start of <filename>/usr/ports/Mk/bsd.port.mk</filename>; the others probably ought to be. Note that this file uses a non-standard tab setting: <application>Emacs</application> and <application>Vim</application> will recognize the setting on loading the file. Both <citerefentry><refentrytitle>vi</refentrytitle><manvolnum>1</manvolnum></citerefentry> and <citerefentry><refentrytitle>ex</refentrytitle><manvolnum>1</manvolnum></citerefentry> can be set to use the correct value by typing <command>:set tabstop=4</command> once the file has been loaded.
Looking for something easy to start with? Take a look at the <link xlink:href="https://wiki.freebsd.org/WantedPorts">list of requested ports</link> and see if you can work on one (or more).
Quick Porting
This section describes how to quickly create a new port. For applications where this quick method is not adequate, the full <quote>Slow Porting</quote> process is described in <xref linkend="slow-porting"/>.
First, get the original tarball and put it into <varname>DISTDIR</varname>, which defaults to <filename>/usr/ports/distfiles</filename>.
These steps assume that the software compiled out-of-the-box. In other words, absolutely no changes were required for the application to work on a FreeBSD system. If anything had to be changed, refer to <xref linkend="slow-porting"/>.
It is recommended to set the <varname>DEVELOPER</varname> <citerefentry><refentrytitle>make</refentrytitle><manvolnum>1</manvolnum></citerefentry> variable in <filename>/etc/make.conf</filename> before getting into porting.
<prompt>#</prompt> <userinput>echo DEVELOPER=yes &gt;&gt; /etc/make.conf</userinput>
This setting enables the <quote>developer mode</quote> that displays deprecation warnings and activates some further quality checks on calling <command>make</command>.
Writing the <filename>Makefile</filename>
The minimal <filename>Makefile</filename> would look something like this:
# $FreeBSD$

PORTNAME= oneko
DISTVERSION= 1.1b
CATEGORIES= games
MASTER_SITES= ftp://ftp.cs.columbia.edu/archives/X11R5/contrib/

MAINTAINER= youremail@example.com
COMMENT= Cat chasing a mouse all over the screen

.include &lt;bsd.port.mk&gt;
In some cases, the <filename>Makefile</filename> of an existing port may contain additional lines in the header, such as the name of the port and the date it was created. This additional information has been declared obsolete, and is being phased out.
Try to figure it out. Do not worry about the contents of the <literal>$FreeBSD$</literal> line, it will be filled in automatically by <application>Subversion</application> when the port is imported to our main ports tree. A more detailed example is shown in the <link linkend="porting-samplem">sample Makefile</link> section.
Writing the Description Files
There are two description files that are required for any port, whether they actually package or not. They are <filename>pkg-descr</filename> and <filename>pkg-plist</filename>. Their <filename>pkg-</filename> prefix distinguishes them from other files.
<filename>pkg-descr</filename>
This is a longer description of the port. One to a few paragraphs concisely explaining what the port does is sufficient.

Loading…

No matching activity found.

Browse all component changes

Glossary

English English
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: chapter/title
Flags
read-only
Source string location
book.translate.xml:214
String age
a year ago
Source string age
a year ago
Translation file
books/porters-handbook.pot, string 24