.\" port.1 .\" .\" Copyright (c) 2002 Apple Computer, Inc. .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form 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. .\" 3. Neither the name of Apple Computer, Inc. nor the names of its .\" contributors may be used to endorse or promote products derived from .\" this software without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 COPYRIGHT OWNER OR CONTRIBUTORS 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 SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" .Dd August 24, 2002 .Dt PORT 1 "Apple Computer, Inc." .Os .Sh NAME .Nm port .Nd build darwin ports .Sh SYNOPSIS .Nm .Op Fl vdqfonausbck .Op Fl D Ar portdir .Ar target .Op Ar portname .Op Ar options ... .Op Ar variants ... .Nm .Ic provides .Ar file .Sh DESCRIPTION .Nm is designed to read and execute the build instructions of a darwin port. If no .Ar portdir or .Ar portname is specified, the current working directory is assumed. If no .Ar target is specified, the usage is displayed. Port .Ar options are specified as key=value pairs and take precedence over individual port options and system-wide settings. Port .Ar variants are specified as +name, which indicates the variant is desired, and -name, which indicates the variant is not desired. In case of ambiguities, a port can be fully specified with the format .Ar version_revision+variants .Sh OPTIONS .Bl -tag -width -indent .It Fl v verbose mode (generate verbose messages) .It Fl d debug mode (generate debugging messages; implies .Fl v ) .It Fl q quiet mode (suppress messages) .It Fl c autoclean mode (execute clean after install) .It Fl k keep mode (don't autoclean after install) .It Fl D specify .Ar portdir .It Fl f force mode (ignore state file) .It Fl o honor state files older than Portfile .El .Sh TARGETS .Nm knows several targets. The most important is the "install" target, which installs the supplied port to its final destination on the system. .Pp The other targets are: .Pp .Dl uninstall .Dl deactivate .Dl activate .Dl clean .Dl distclean .Dl search .Dl list .Dl contents .Dl deps .Dl variants .Dl info .Pp Besides the main targets .Nm takes each single stage of the port building process as a possible target. These stages (besides "install") are: .Pp .Dl fetch .Dl extract .Dl patch .Dl configure .Dl build .Dl destroot .Dl test .Pp There are also targets for packaging ports: .Pp .Dl pkg .Dl mpkg .Dl dmg .Dl rpmpackage .Pp Additionally, the .Ic provides command determines which port owns a given file. .Sh EXAMPLES Invoking .Nm with the "install" target on the "vim" port: .Pp .Dl "port install vim .Pp To uninstall a port, invoke .Nm with the "uninstall" target: .Pp .Dl "port uninstall vim .Pp To clean up after the port was build: .Pp .Dl "port clean vim .Pp To remove a port's distfiles: .Pp .Dl "port distclean vim .Pp To deactivate a port (in image mode): .Pp .Dl "port deactivate vim .Pp To reactivate a port previously deactivated (in image mode): .Pp .Dl "port activate vim .Pp A port can be installed if another version/variant is installed but deactivated. To reactivate one of the installed version of a port previously deactivated (in image mode): .Pp .Dl "port activate vim 6.2.532_0+aqua .Pp To build and "install" vim into an intermediate destination root (or "destroot") .Pp .Dl "port destroot vim" .Pp This can be useful during development of a new port, for testing, or for creating an "installation" of a port which can be subsequently packaged or copied elsewhere without having to modify the host system. .Pp Using .Nm to list all available ports: .Pp .Dl "port search .+ .Pp or: .Pp .Dl "port list .Pp To look for a specific port, supply a search string: .Pp .Dl "port search vim .Pp To list the files (table of contents) installed by a given port (in this case apr): .Pp .Dl "port contents apr" .Pp To list a port's dependencies: .Pp .Dl "port deps exim" .Pp To list installed ports: .Pp .Dl "port installed" .Pp To list a port's variants: .Pp .Dl "port variants php" .Pp To view all of a port's metadata: .Pp .Dl "port info vim" .Pp The following demonstrates invoking .Nm with the "extract" target on portdir "textproc/figlet" and extract.suffix set to ".tgz": .Pp .Dl "port extract -d textproc/figlet extract.suffix=.tgz" .Pp To package a port as an OS X package, use the "pkg" target: .Pp .Dl "port pkg gimp" .Pp or use .Nm with the 'dmg' target to create an internet-enabled disk image containing an OS X package: .Pp .Dl "port dmg gimp" .Pp To build an RPM from a port, use the "rpmpackage" target instead: .Pp .Dl "port rpmpackage gimp" .Pp .Sh DIAGNOSTICS .Ex -std .Sh AUTHORS .An Landon Fuller Aq landonf@opendarwin.org .An Kevin Van Vechten Aq kevin@opendarwin.org .An Jordan K. Hubbard Aq jkh@opendarwin.org