This section tells you how to do a quick port. In many cases, it is not enough, but we'll see.
First, get the original tarball and put it into
${DISTDIR}, which defaults to
/usr/ports/distfiles.
Note: The following assumes that the software compiled out-of-the-box, i.e., there was absolutely no change required for the port to work on your FreeBSD box. If you needed to change something, you'll have to refer to the next section too.
The minimal Makefile would look something like this:
# New ports collection makefile for: oneko
# Version required: 1.1b
# Date created: 5 December 1994
# Whom: asami
#
# $Id: porting.sgml,v 1.2.4.2 1995/10/12 03:16:25 jfieber Exp $
#
DISTNAME= oneko-1.1b
CATEGORIES+= games
MASTER_SITES= ftp://ftp.cs.columbia.edu/archives/X11R5/contrib/
MAINTAINER= asami@FreeBSD.ORG
USE_IMAKE= yes
.include <bsd.port.mk>
See if you can figure it out. Don't worry about the contents
of the $Id$ line, it will be filled in
automatically by CVS when the port is imported to our main
ports tree.
There are three required description files that are
required for any port, whether they actually package or not.
They are COMMENT, DESCR, and
PLIST, and reside in the pkg subdirectory.
This is the one-line description of the port. It is recommended to have the name of the package at the beginning, as in:
oneko-1.1b, a cat chasing a mouse all over the screen
This is a longer description of the port. One to a few
paragraphs concisely explaining what the port does is
sufficient. Note: This is not a manual nor an
in-depth description on how to use or compile the port.
In particular, please do not just copy the README
file here, unless, of course, it's a concise description
of the port.
It is recommended that you sign the name at the end of this file, and also state the version number, as in:
This is a port of oneko, in which a cat chases a poor mouse all over
the screen.
:
(etc.)
:
This is version 1.1b.
- Satoshi
asami@cs.berkeley.edu
This file lists all the files installed by the port. It
is also called the `packing list' because the package is
generated by packing the files listed here. The pathnames
are relative to the installation prefix (usually
/usr/local or /usr/X11R6).
Here is a small example:
bin/oneko
man/man1/oneko.1.gz
lib/X11/app-defaults/Oneko
lib/X11/oneko/cat1.xpm
lib/X11/oneko/cat2.xpm
lib/X11/oneko/mouse.xpm
Just type `make makesum'. The ports make rules
will automatically generate the file files/md5.
You should make sure that the port rules do exactly what
you want it to do, including packaging up the port. Try
doing `make install', `make package' and
then `pkg_delete -d <pkgname>' and see if all
the files are correctly deleted. Then do a `pkg_add
<pkgname>.tgz' and see if everything re-appears
and works correctly.
Now that you're happy with your port, the only thing
remaining is to put it in the main FreeBSD ports tree and
make everybody else happy about it too. To accomplish this,
pack the necessary files (everything described in this
section -- in particular do not include the
original source tarball or the `work' subdirectory)
into a .tar.gz file, stick it in the directory
ftp://ftp.freebsd.org/pub/FreeBSD/incoming/
and send mail to ports@freebsd.org. We will take a
look, get back to you if necessary, and put it in the tree.
Your name will also appear in the list of `Additional
FreeBSD contributors' on the FreeBSD Handbook and other
files. Isn't that great?!? :)