A team of compulsive hackers who have forgotten to eat in a frantic attempt to make a deadline? Something unpleasant lurking in the FreeBSD attic? No, a skeleton here is a minimal framework that supplies everything needed to make the ports magic work.
The most important component of a skeleton is the Makefile. This contains various statements that specify how the port should be compiled and installed. Here is the Makefile for bash:-
# New ports collection makefile for: bash
# Version required: 1.14.5
# Date created: 21 August 1994
# Whom: jkh
#
# Makefile,v 1.13 1995/10/04 14:45:01 asami Exp
#
DISTNAME= bash-1.14.5
CATEGORIES= shells
MASTER_SITES= ftp://slc2.ins.cwru.edu/pub/dist/
MAINTAINER= ache@FreeBSD.ORG
post-install:
.if !defined(NOMANCOMPRESS)
gzip -9nf ${PREFIX}/man/man1/bash.1 ${PREFIX}/man/man1/bash_builtins.1
.endif
.include <bsd.port.mk>
The lines beginning with a "#" sign are comments for the benefit of human readers (as in most Unix script files).
`DISTNAME" specifies the name of the tarball, but without the extension.
`CATEGORIES" states what kind of program this is.
`MASTER_SITES" is the URL(s) of the master FTP site, which is used to retrieve the tarball if it is not available on the local system. This is a site which is regarded as reputable, and is normally the one from which the program is officially distributed (in so far as any software is "officially" distributed on the Internet).
`MAINTAINER" is the email address of the person who is
responsible for updating the skeleton if, for example a new version
of the program comes out. (Note: The title of "maintainer"
is mainly an administrative one; it does not mean the person
concerned is responsible for supporting the program. If you have any
problems with a port, please mail
FreeBSD ports mailing list
<freebsd-ports@FreeBSD.ORG> and not the maintainer. Thank you!)
Skipping over the next few lines for a minute, the line
.include <bsd.port.mk>says that the other statements and commands needed for this port are in a standard file called `bsd.port.mk". As these are the same for all ports, there is no point in duplicating them all over the place, so they are kept in a single standard file.
This is probably not the place to go into a detailed examination of how Makefiles work; suffice it to say that the lines starting with `post-install" over-ride the instructions in bsd.port.mk about what to do after installing the program, so that the man pages can be compressed after they have been put in their final destination.
The file containing the checksum for the port is called "md5", after the MD5 algorithm used for ports checksums. It lives in a directory with the slightly confusing name of "files".
This directory can also contain other miscellaneous files that are required by the port and do not belong anywhere else.
This directory contains the patches needed to make everything work properly under FreeBSD.
This program contains three quite useful files:-