zoryn-gen-opam2spec(1)

ZORYN-GEN-OPAM2SPEC(1) Zoryn Manual ZORYN-GEN-OPAM2SPEC(1)

NAME

zoryn-gen-opam2spec - Generate spec file from opam.

SYNOPSIS

zoryn gen opam2spec [OPTION]… [OPAM-FILE]

DESCRIPTION

Generate RPM spec file from opam file. Can work with local opam files or clone package from opam repository.

Supports single-package and multi-package opam projects. For multi-package projects, creates combined spec with all subpackages.

Generated spec includes BuildRequires from opam dependencies (checking RDB for existing packages), proper License from opam metadata, and %check section for packages with tests.

Also generates .gear/rules file with appropriate tar and spec directives, and detects tag prefix from upstream git.

With --sync, compares existing spec file BuildRequires with opam dependencies and shows what needs to be added or removed.

ARGUMENTS

OPAM-FILE
Opam file to use (auto-detect if omitted).

OPTIONS

-C DIR
Change to directory DIR before running.
--clone=NAME
Clone package from opam repository.
-d, --debug
Enable debug output.
--get-version=VERSION
Specific opam version to fetch (default: latest).
--no-check
Don't generate %%check section.
--no-rdb-check
Don't check dependencies in Sisyphus.
--no-rules
Don't generate .gear/rules.
-o FILE, --output=FILE
Output spec file.
--prefix=PREFIX (absent=ocaml-)
Package prefix (default: ocaml-).
--sync
Compare BuildRequires in spec with opam dependencies and show diff.
--tag-prefix=PREFIX
Tag prefix (v or empty).
-V VERSION
Override version.

COMMON OPTIONS

--help[=FMT] (default=auto)
Show this help in format FMT. The value FMT must be one of auto, pager, groff or plain. With auto, the format is pager or plain whenever the TERM env var is dumb or undefined.
--version
Show version information.

EXIT STATUS

zoryn gen opam2spec exits with:

0
on success.
123
on indiscriminate errors reported on standard error.
124
on command line parsing errors.
125
on unexpected internal errors (bugs).

EXAMPLES

Generate spec from opam file in current directory:


zoryn gen opam2spec

Clone package from opam repository and generate spec:


zoryn gen opam2spec --clone cmdliner

Clone specific version of package:


zoryn gen opam2spec --clone cmdliner --get-version 1.2.0

Generate with custom prefix (empty for non-OCaml):


zoryn gen opam2spec --prefix '' foo.opam

Specify output file:


zoryn gen opam2spec -o .gear/mypackage.spec

Compare spec with opam dependencies:


zoryn gen opam2spec --sync

SEE ALSO

zoryn(1)

Zoryn 0.46.0