Given a module how can I create an rpm of not just the module, but all the module's dependencies?
Start by creating a test module
$ module-starter --author "Evan Carroll" --email "me@evancarroll.com" --module Foo::Bar
Added to MANIFEST: Changes
Added to MANIFEST: ignore.txt
Added to MANIFEST: lib/Foo/Bar.pm
Added to MANIFEST: Makefile.PL
Added to MANIFEST: MANIFEST
Added to MANIFEST: README
Added to MANIFEST: t/00-load.t
Added to MANIFEST: t/manifest.t
Added to MANIFEST: t/pod-coverage.t
Added to MANIFEST: t/pod.t
Added to MANIFEST: xt/boilerplate.t
Created starter directories and files
Now I edit the Makefile.pl
, and add Mojolicious
as a prereq.
...
PREREQ_PM => {
'Mojolicious' => '0'
....
Now I can run
perl Makefile.PL
make dist
But running,
$ sudo cpantorpm -y /tmp/yum /tmp/Foo-Bar/Foo-Bar-0.01.tar.gz
I get this,
error: Failed build dependencies:
perl >= 5.006 is needed by perl-Foo-Bar-0.01-1.noarch
perl(ExtUtils::MakeMaker) is needed by perl-Foo-Bar-0.01-1.noarch
perl(Mojolicious) is needed by perl-Foo-Bar-0.01-1.noarch
That makes sense, but I want it to create RPMs for these requirements. I would like Foo::Bar
to require an rpm that is also generated from cpan that represents Mojolicious, and for a build system to output two RPMs (one rpm for Foo::Bar
which requires the also-provided Mojolicious
RPM).