Scroll to navigation

CPANSPEC(1) User Contributed Perl Documentation CPANSPEC(1)

NAME

cpanspec - Generate a spec file for a CPAN module

SYNOPSIS

cpanspec [options] [file [...]]

 Options:
   --help       -h      Help message
   --old        -o      Be more compatible with old RHL/FC releases
   --license    -l      Include generated license texts if absent in source
   --noprefix   -n      Don't add perl- prefix to package name
   --force      -f      Force overwriting existing spec
   --packager   -p      Name and email address of packager (for changelog)
   --release    -r      Release of package (defaults to 0)
   --epoch      -e      Epoch of package
   --disttag    -d      Disttag (defaults to %{?dist})
   --srpm       -s      Build a source rpm
   --build      -b      Build source and binary rpms
   --cpan       -c      CPAN mirror URL
   --verbose    -v      Be more verbose
   --prefer-macros  -m  Prefer macros over environment variables in the spec
 Long options:
   --follow             Process build dependencies
   --filter-requires    Specify Requires to remove
   --filter-provides    Specify Provides to remove
   --add-requires       Add Requires for this item
   --add-provides       Add Provides for this item
   --add-buildrequires  Add BuildRequires for this item
   --old-file=s         Old archive file for extraction of changelog difference
   --skip-changes       Do not create or update .changes file
   --version            Print the version number and exit

DESCRIPTION

cpanspec will generate a spec file to build a rpm from a CPAN-style Perl module distribution.

OPTIONS

Print a brief help message and exit.
Be more compatible with old RHL/FC releases. With this option enabled, the generated spec file
  • Defines perl_vendorlib or perl_vendorarch.
  • Includes explicit dependencies for core Perl modules.
  • Uses "%check || :" instead of just %check.
  • Includes a hack to remove LD_RUN_PATH from Makefile.
Generate COPYING and Artistic license texts if the source doesn't seem to include them.
Don't add perl- prefix to the name of the package. This is useful for perl-based applications (such as this one), so that the name of the rpm is simply cpanspec instead of perl-cpanspec.
Force overwriting an existing spec file. Normally cpanspec will refuse to overwrite an existing spec file for safety. This option removes that safety check. Please use with caution.
The name and email address of the packager. Overrides the %packager macro in "~/.rpmmacros".
The release number of the package. Defaults to 0.
The epoch number of the package. By default, this is undefined, so no epoch will be used in the generated spec.
Disttag (a string to append to the release number), used to differentiate builds for various releases. Defaults to the semi-standard (for Fedora) string "%{?dist}".
Build a source rpm from the generated spec file.
Build source and binary rpms from the generated spec file. Please be aware that this is likely to fail! Even if it succeeds, the generated rpm will almost certainly need some work to make rpmlint happy.
The URL to a CPAN mirror. If not specified with this option or the CPAN environment variable, defaults to <https://cpan.metacpan.org/>.
Be more verbose.
Prefer the macro form of common spec constructs over the environment variable form (e.g. %{buildroot} vs $RPM_BUILD_ROOT).
Add build dependencies to the list of modules to process.
Specify Requires to remove.
Specify Provides to remove.
Add Requires for this item.
Add Provides for this item.
Add BuildRequires for this item.
Print the version number and exit.

AUTHOR

Steven Pritchard <steve@kspei.com>

SEE ALSO

perl(1), cpan2rpm(1), cpanflute2(1)

2024-03-06 perl v5.38.2