1.\" 2.\" FreeBSD install - a package for the installation and maintainance 3.\" of non-core utilities. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer. 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 14.\" Jordan K. Hubbard 15.\" |
16.\" $FreeBSD: head/usr.sbin/pkg_install/add/pkg_add.1 152329 2005-11-12 11:45:01Z krion $ |
17.\" |
18.Dd November 12, 2005 |
19.Dt PKG_ADD 1 20.Os 21.Sh NAME 22.Nm pkg_add 23.Nd a utility for installing software package distributions 24.Sh SYNOPSIS 25.Nm 26.Op Fl vInfrRMS 27.Op Fl t Ar template 28.Op Fl p Ar prefix |
29.Op Fl P Ar prefix |
30.Op Fl C Ar chrootdir 31.Ar pkg-name Op Ar pkg-name ... 32.Sh DESCRIPTION 33The 34.Nm 35command is used to extract packages that have been previously created 36with the 37.Xr pkg_create 1 --- 85 unchanged lines hidden (view full) --- 123may then wish to look into the use of 124.Cm MASTER 125and 126.Cm SLAVE 127modes (see the 128.Fl M 129and 130.Fl S |
131options). If the 132.Fl p 133flag appears after any 134.Fl P 135flag on the command line, it overrides it's effect, causing 136.Nm 137not to use the given 138.Ar prefix 139recursively. 140.It Fl P Ar prefix 141Does the same as the 142.Fl p 143option, except that the given 144.Ar prefix 145is also used recursively for the dependency packages, if any. If the 146.Fl P 147flag appears after any 148.Fl p 149flag on the command line, it overrides it's effect, causing 150.Nm 151to use the given 152.Ar prefix 153recursively. |
154.It Fl t Ar template 155Use 156.Ar template 157as the input to 158.Xr mktemp 3 159when creating a 160.Dq staging area . 161By default, this is the string --- 214 unchanged lines hidden (view full) --- 376.Fl e 377.Fl p 378.Pa prefix 379.Ed 380where 381.Pa prefix 382is either the prefix specified with the 383.Fl p |
384or 385.Fl P 386flag or, 387if neither flag was specified, the name of the first directory named by a |
388.Cm @cwd 389directive within this package. 390.It 391If a 392.Ar post-install 393script exists for the package, it is then executed as 394.Bd -ragged -offset indent -compact 395.Cm script --- 44 unchanged lines hidden (view full) --- 440.It 441Finally, the staging area is deleted and the program terminates. 442.El 443.Pp 444All the scripts are called with the environment variable 445.Ev PKG_PREFIX 446set to the installation prefix (see the 447.Fl p |
448and 449.Fl P 450options above). |
451This allows a package author to write a script 452that reliably performs some action on the directory where the package 453is installed, even if the user might change it with the 454.Fl p |
455or 456.Fl P 457flags to |
458.Cm pkg_add . 459.Sh ENVIRONMENT 460The value of the 461.Ev PKG_PATH 462is used if a given package cannot be found. 463The environment variable 464should be a series of entries separated by colons. 465Each entry --- 102 unchanged lines hidden --- |