Perl Packaging With FPM

dnbert edited this page Dec 9, 2013 · 2 revisions

Perl Packaging With FPM

Basic Example

fpm -t deb -s cpan Fennec

The previous example will download Fennec from CPAN and build a Debian package of the Fennec Perl module locally.

FPM, by default, believes the following to be true:

  1. That your local Perl lib path will be the target Perl lib path
  2. That you want the package name to be prefixed with the word perl
  3. That the dependencies from CPAN are valid and that the naming scheme for those dependencies are prefixed with perl

If you wish to avoid any of those issues you can try:

fpm -t deb -s cpan --cpan-perl-lib-path /usr/share/perl5 Fennec This will change the target path to where perl will be. Your local perl install may be /opt/usr/share/perl5.10 but the package will be constructed so that the module will be installed to /usr/share/perl5

fpm -t deb -s cpan --cpan-package-name-prefix fubar Fennec This will replace the perl default prefix with fubar. The resulting package will be named in the scheme of fubar-fennec-2.10.deb

fpm -t -deb -s cpan --no-depends Fennec This will remove omit dependencies from being added to the package metadata.

A full list of available options for CPAN are listed here:

 --cpan-perl-bin PERL_EXECUTABLE (cpan only) The path to the perl executable you wish to run. (default: "perl")
 --cpan-cpanm-bin CPANM_EXECUTABLE (cpan only) The path to the cpanm executable you wish to run. (default: "cpanm")
 --cpan-mirror CPAN_MIRROR     (cpan only) The CPAN mirror to use instead of the default.
 --[no-]cpan-mirror-only       (cpan only) Only use the specified mirror for metadata. (default: false)
 --cpan-package-name-prefix NAME_PREFIX (cpan only) Name to prefix the package name with. (default: "perl")
 --[no-]cpan-test              (cpan only) Run the tests before packaging? (default: true)
 --cpan-perl-lib-path PERL_LIB_PATH (cpan only) Path of target Perl Libraries
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.