xref: /openbsd-src/share/man/man7/pkgpath.7 (revision a60abe0dfdc2b531d531145596acaccf89a8729f)
1*a60abe0dSfcambus.\" $OpenBSD: pkgpath.7,v 1.5 2017/03/27 10:37:43 fcambus Exp $
2bd942ac8Sespie.\"
3bd942ac8Sespie.\" Copyright (c) 2011 Marc Espie <espie@openbsd.org>
4bd942ac8Sespie.\"
5bd942ac8Sespie.\" Permission to use, copy, modify, and distribute this software for any
6bd942ac8Sespie.\" purpose with or without fee is hereby granted, provided that the above
7bd942ac8Sespie.\" copyright notice and this permission notice appear in all copies.
8bd942ac8Sespie.\"
9bd942ac8Sespie.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10bd942ac8Sespie.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11bd942ac8Sespie.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12bd942ac8Sespie.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13bd942ac8Sespie.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14bd942ac8Sespie.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15bd942ac8Sespie.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16*a60abe0dSfcambus.Dd $Mdocdate: March 27 2017 $
17bd942ac8Sespie.Dt PKGPATH 7
18bd942ac8Sespie.Os
19bd942ac8Sespie.Sh NAME
20bd942ac8Sespie.Nm pkgpath
21bd942ac8Sespie.Nd ports tree location for a package build
22bd942ac8Sespie.Sh DESCRIPTION
23bd942ac8SespieEach location in the ports tree is uniquely identified through a
24bd942ac8Sespie.Nm ,
25bd942ac8Sespiewhich encodes the directory, flavor and subpackage information
26bd942ac8Sespiethat allows the build of a package.
27bd942ac8SespieThis is not to be confused with
28bd942ac8Sespie.Ev PKG_PATH ,
29bd942ac8Sespiethe list of URLs from which
30bd942ac8Sespie.Xr pkg_add 1
31bd942ac8Sespieretrieves binary packages.
32bd942ac8Sespie.Pp
33bd942ac8SespieEvery
34bd942ac8Sespie.Nm
35bd942ac8Sespieconforms to the pattern
36bd942ac8Sespie.Ar some/directory[,-sub][,flavor...] .
37bd942ac8Sespie.Pp
38bd942ac8SespieThe
39bd942ac8Sespie.Ar some/directory
40bd942ac8Sespiepart refers to the directory part, to find under the
41bd942ac8Sespieportstree, usually in
42bd942ac8Sespie.Pa /usr/ports
43bd942ac8Sespie(or
44*a60abe0dSfcambus.Pa /usr/ports/mystuff
45bd942ac8Sespiefor port developers).
46bd942ac8Sespie.Pp
47bd942ac8SespieThe
48bd942ac8Sespie.Ar ,-sub
49bd942ac8Sespieoptional part refers to a specific subpackage from a
50bd942ac8Sespiemulti-package port.
51bd942ac8SespieIt can be left blank for non multi-package ports, or to get
52bd942ac8Sespiethe default subpackage
53bd942ac8Sespie(usually
54bd942ac8Sespie.Ar -main ) .
55bd942ac8Sespie.Pp
56bd942ac8SespieThe
57bd942ac8Sespie.Ar ,flavor...
58bd942ac8Sespieoptional part refers to the flavors or pseudo-flavors to use
59bd942ac8Sespiewhen building the package.
60bd942ac8SespieIf left blank, it refers to the default flavor.
61bd942ac8SespieAn explicit empty flavor can also be specified to make sure to
62bd942ac8Sespieget an empty flavor, even if it does not correspond to the default
63bd942ac8Sespieflavor.
64bd942ac8Sespie.Pp
65bd942ac8SespieNote that
66bd942ac8Sespie.Ar -sub
67bd942ac8Sespieand
6874298445Sespie.Ar flavor
69bd942ac8Sespieparts can be specified in any order, as all subpackages start with
70bd942ac8Sespiea dash.
71bd942ac8SespieIt is an error to ask for several subs at once, e.g.\&
72bd942ac8Sespie.Ar some/path,-sub1,-sub2 ,
73bd942ac8Sespiethough it won't always be flagged as a problem.
74bd942ac8Sespie.Pp
75bd942ac8SespieFor instance:
76bd942ac8Sespie.Bl -tag -width small
77bd942ac8Sespie.It Ar misc/screen
78bd942ac8SespieA simple directory, default flavor, which happens to be empty.
79bd942ac8Sespie.It Ar misc/screen,static
80bd942ac8SespieSame port,
81bd942ac8Sespie.Ar static
82bd942ac8Sespieflavor.
83bd942ac8Sespie.It Ar x11/kde/libs3
84bd942ac8SespieA multi-package port with no subpackage nor flavor, refers to
85bd942ac8Sespie.Ar x11/kde/libs3,-main .
86bd942ac8Sespie.It Ar net/avahi
87bd942ac8SespieMulti-package port with default flavor.
88bd942ac8SespieWill actually build with FLAVOR="no_gui no_mono no_qt3 no_qt4 bootstrap"
89bd942ac8Sespie(all of which are pseudo-flavors), so that only the main package will build.
90bd942ac8Sespie.It Ar net/avahi,no_mono,-qt3
91bd942ac8SespieBuild avahi with the "no_mono" pseudo-flavor, which will build the
9274298445Sespie-main, -qt3, -qt4, -gui, -gtk, -gtk3, and -ui subpackages, and refer to the
93bd942ac8Sespie.Ar -qt3
94bd942ac8Sespiesubpackage.
95bd942ac8Sespie.It Ar net/avahi,
96bd942ac8Sespie.Ar net/avahi
97bd942ac8Sespiewith an explicit empty flavor, default subpackage
98bd942ac8Sespie.Po
99bd942ac8Sespiewhich happens to be
100bd942ac8Sespie.Ar -main
101bd942ac8Sespie.Pc .
102bd942ac8Sespie.It Ar net/avahi,,-qt4
103bd942ac8Sespie.Ar net/avahi
104bd942ac8Sespiewith an explicit empty flavor,
10562b4362cSzhuk.Ar -qt4
106bd942ac8Sespiesubpackage.
107bd942ac8Sespie.El
108bd942ac8Sespie.Pp
109bd942ac8SespieThe ports tree can iterate over lists of
110bd942ac8Sespie.Nm
111bd942ac8Sespiethrough
112bd942ac8Sespie.Li SUBDIR="pkgpath1 pkgpath2..."
113bd942ac8Sespieor through a full list through
114bd942ac8Sespie.Li SUBDIRLIST=file .
115bd942ac8Sespie.Pp
116bd942ac8Sespie.Xr dpb 1
117bd942ac8Sespiealso handles
118bd942ac8Sespie.Nm
119bd942ac8Sespielists for many options.
120bd942ac8Sespie.Sh NORMALISATION AND THE FULLPATH CONVENTION
121bd942ac8SespieWhen the ports tree handles dependencies, it passes
122bd942ac8Sespie.Nm
123bd942ac8Sespiefrom
124bd942ac8Sespie.Ev BUILD_DEPENDS ,
125bd942ac8Sespie.Ev LIB_DEPENDS ,
126bd942ac8Sespie.Ev RUN_DEPENDS ,
127bd942ac8Sespieand
128702eb08cSgsoares.Ev TEST_DEPENDS
129bd942ac8Sespieto the dependent port for normalisation purposes.
130bd942ac8SespieThat way, the
131bd942ac8Sespie.Nm
132bd942ac8Sespiethat gets recorded in the package doesn't have any "default" flavor
133bd942ac8Sespieor "default" subpackage left: those are always resolved to the correct
134bd942ac8Sespievalue.
135bd942ac8Sespie.Pp
136bd942ac8SespieLikewise, pseudo-flavors vanish from the
137bd942ac8Sespie.Nm pkgpath ,
138bd942ac8Sespiesince they only participate in the build process, but do not intervene
139bd942ac8Sespiein the built package.
140bd942ac8Sespie.Pp
141bd942ac8SespieAs a result, such
142bd942ac8Sespie.Nm
143bd942ac8Sespieare slightly different from the description above, as a flavor left blank
144bd942ac8Sespieis the empty flavor (and not the default flavor).
145bd942ac8SespieThis is the
146bd942ac8Sespie.Qq fullpath convention .
147bd942ac8Sespie.Pp
148bd942ac8SespieTools such as
149bd942ac8Sespie.Xr dpb 1
150bd942ac8Sespiedisplay fullpath pkgpaths,
151bd942ac8Sespieand binary packages store full pkgpaths.
152bd942ac8Sespie.Pp
153bd942ac8Sespie.Ev SUBDIR
154bd942ac8Sespieand
155bd942ac8Sespie.Ev SUBDIRLIST
156bd942ac8Sespiecan be forced to follow the fullpath convention by explicitly passing
157bd942ac8Sespie.Li FULLPATH=Yes
158bd942ac8Sespieto the corresponding
159bd942ac8Sespie.Xr make 1
160bd942ac8Sespieinvocations.
161bd942ac8Sespie.Pp
162bd942ac8SespieMost tools that process binary packages do so.
163bd942ac8Sespie.Sh SEE ALSO
164bd942ac8Sespie.Xr dpb 1 ,
165bd942ac8Sespie.Xr bsd.port.mk 5 ,
166bd942ac8Sespie.Xr library-specs 7 ,
167bd942ac8Sespie.Xr packages 7 ,
168bd942ac8Sespie.Xr packages-specs 7 ,
169bd942ac8Sespie.Xr ports 7
170