Here we list the individual Portfile components for an application that conforms to the standard configure, make, and make install steps of most open source application installs.
Modeline
This should be the first line of a Portfile. It sets the correct editing options for vim and emacs. See Port Style for more information. Its use is optional and up to the port maintainer.
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
Subversion ID tag line
This must be a Portfile's second line (or the first, if a modeline is not used). When a port is committed to the repository, ID tags are expanded to include the filename and the revision number, date and time, and author of the last commit.
# $Id$
PortSystem line
This statement is required for all ports.
PortSystem 1.0
Port name
name rrdtool
Port version
version 1.2.23
Port categories
A port may belong to more than one category, but the first (primary) category should match the directory name in the ports tree where the Portfile is to reside.
categories net
Platform statement
platforms darwin
Port maintainers
A port's maintainers are the people who have agreed to take
responsibility for keeping the port up-to-date. The
maintainers keyword lists the maintainers' email
addresses, preferrably in the obfuscated form which hides them
from spambots. For more, see the full explanation of the maintainers keyword in
the Global Keywords section
of the Portfile Reference
chapter.
maintainers jdoe \
example.org:julesvernePort description
description Round Robin Database
Port long_description
long_description RRDtool is a system to store and display time-series \
dataA port's application homepage
homepage http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/
A port's download URLs
master_sites http://oss.oetiker.ch/rrdtool/pub/ \
ftp://ftp.pucpr.br/rrdtool/Port checksums
The checksums specified in a Portfile are checked with the fetched tarball for security. For the best security, use rmd160 and sha256 checksum types.
checksums rmd160 7bbfce4fecc2a8e1ca081169e70c1a298ab1b75a \
sha256 2829fcb7393bac85925090b286b1f9c3cd3fbbf8e7f35796ef4131322509aa53To find the correct checksums for a port's distribution file, follow this example:
%%openssl rmd160 rrdtool-1.2.23.tar.gz%%openssl sha256 rrdtool-1.2.23.tar.gz
RIPEMD160( ... rrdtool-1.2.23.tar.gz)= 7bbfce4fecc2a8e1ca081169e70c1a298ab1b75a SHA256( ... rrdtool-1.2.23.tar.gz)= 2829fcb7393bac85925090b286b1f9c3cd3fbbf8e7f35796ef4131322509aa53
Port dependencies
A port's dependencies are ports that must be installed before another port is installed.
depends_lib port:perl5.8 \
port:tcl \
port:zlibPort configure arguments (optional)
configure.args --enable-perl-site-install \
--mandir=${prefix}/share/man