Ports,
The bsd community maintains a huge collection of reviewed and stable sources for open source software. The ports collection contains a framework of Makefiles and descriptions containing enough information to build the port from source. Using the ports collection on a bsd box is as simple as changing to the port’s working directory and typing make &&make install.
The ports collection can be retrieved in one of two ways. You can get the port collection in its entirety at ftp://ftp.freebsd.org/pub/FreeBSD/ports/ports-current/ports.tar.gz or you can pull the individual port from the cvs tree. http://www.freebsd.org/cgi/cvsweb.cgi/ports/$category/$port/$port.tar.gz?tarball=1
The structure of the ports tree is:
- /usr/ports/<category>/<package>
The port’s directory itself contains the following
-
- Makefile
— Contains most of the information required to build the package. Key variables include.- PORTNAME
- PORTVERSION
- PORTREVISION
- CATEGORIES
- PKGNAMEPREFIX
- DISTFILES
- BUILD_DEPENDS
- RUN_DEPENDS
- CONFIGURE_ARGS
- CONFIGURE_ENV
- MAKE_ARGS
- MAKE_ENV
- pkg-plist
— This file contains a manifest of the files to be installed. It includes directory information and weather or not the directory should be cleared out or not. - pkg-descr
— This file contains the package description - distinfo
— contains the filenames, sizes and checksums for the source - files/
contains any file not in the distribution and patches needed to build the file on xxxBSD- patch-xx
- Makefile