xref: /openbsd-src/share/man/man1/portgen.1 (revision c1a45aed656e7d5627c30c92421893a76f370ccb)
1.\" $OpenBSD: portgen.1,v 1.8 2022/01/13 18:39:14 jmc 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: January 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 py
67for Python modules on PyPI.
68.It Cm ruby
69for Ruby gems.
70.It Cm go
71for Go modules.
72.El
73.Pp
74A
75.Cm go
76module may be used with an
77.Ar @version
78suffix to specify a tag or branch to port.
79The default suffix is
80.Ar @latest ,
81which is interpreted as the latest release.
82.Pp
83The following packages must be installed prior to the invocation of
84.Nm :
85.Pp
86.Bl -item -offset indent -compact
87.It
88.Cm sqlports
89.It
90.Cm p5-DBI
91.It
92.Cm p5-DBD-SQLite
93.El
94.Sh EXIT STATUS
95.Ex -std
96.Sh EXAMPLES
97The following command will download the latest version of Config::AutoConf
98from CPAN, parse it and create a port for it:
99.Bd -ragged -offset indent
100.Nm
101p5 Config::AutoConf
102.Ed
103.Sh SEE ALSO
104.Xr port-modules 5 ,
105.Xr ports 7
106.Sh HISTORY
107The
108.Nm
109utility first appeared in
110.Ox 5.9
111as a result of Google Summer of Code 2015.
112.Sh AUTHORS
113.An Giannis Tsaraias Aq Mt tsg@openbsd.org
114.Sh CAVEATS
115Not every module could be converted to a port.
116