xref: /openbsd-src/share/man/man1/portgen.1 (revision cd0489233f19cacb2bf562713b279b52ec1dc439)
1.\" $OpenBSD: portgen.1,v 1.9 2022/08/13 07:14:07 kmos Exp $
2.\"
3.\" Copyright (c) 2015 Giannis Tsaraias <tsg@openbsd.org>
4.\" Copyright (c) 2015 Vadim Zhukov <zhuk@openbsd.org>
5.\"
6.\" Permission to use, copy, modify, and distribute this software for any
7.\" purpose with or without fee is hereby granted, provided that the above
8.\" copyright notice and this permission notice appear in all copies.
9.\"
10.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17.\"
18.Dd $Mdocdate: August 13 2022 $
19.Dt PORTGEN 1
20.Os
21.Sh NAME
22.Nm portgen
23.Nd port modules on the fly
24.Sh SYNOPSIS
25.Nm portgen
26.Op Fl m Ar makeopt
27.Ar type
28.Ar module-name
29.Sh DESCRIPTION
30The
31.Nm
32utility creates ports for the given
33.Ar module-name
34from
35.Ar type
36module framework.
37The module is downloaded, analyzed and translated into a port.
38Any missing dependencies are handled recursively.
39New ports will land under ${PORTSDIR}/mystuff.
40The
41.Ev PORTSDIR
42value will be taken from current user environment, and defaults to
43.Pa /usr/ports .
44.Pp
45The options are as follows:
46.Bl -tag -width Ds
47.It Fl m Ar makeopt
48Pass
49.Ar makeopt
50to
51.Xr make 1
52invocations while resolving missing dependencies, mostly useful with
53.Sq FETCH_PACKAGES=
54to avoid building everything from scratch.
55.El
56.Pp
57The
58.Nm
59utility currently supports the following
60.Ar type
61values:
62.Pp
63.Bl -inset -offset indent -compact
64.It Cm p5
65for Perl modules on CPAN.
66.It Cm ruby
67for Ruby gems.
68.It Cm go
69for Go modules.
70.El
71.Pp
72A
73.Cm go
74module may be used with an
75.Ar @version
76suffix to specify a tag or branch to port.
77The default suffix is
78.Ar @latest ,
79which is interpreted as the latest release.
80.Pp
81The following packages must be installed prior to the invocation of
82.Nm :
83.Pp
84.Bl -item -offset indent -compact
85.It
86.Cm sqlports
87.It
88.Cm p5-DBI
89.It
90.Cm p5-DBD-SQLite
91.El
92.Sh EXIT STATUS
93.Ex -std
94.Sh EXAMPLES
95The following command will download the latest version of Config::AutoConf
96from CPAN, parse it and create a port for it:
97.Bd -ragged -offset indent
98.Nm
99p5 Config::AutoConf
100.Ed
101.Sh SEE ALSO
102.Xr port-modules 5 ,
103.Xr ports 7
104.Sh HISTORY
105The
106.Nm
107utility first appeared in
108.Ox 5.9
109as a result of Google Summer of Code 2015.
110.Sh AUTHORS
111.An Giannis Tsaraias Aq Mt tsg@openbsd.org
112.Sh CAVEATS
113Not every module could be converted to a port.
114