ArchLUG Kwiki - www.archlug.org

Download the RSS XML Feed for this site

Download the RSS XML Feed for this site

Subscribe to this channel with Amphetadesk

Subscribe to this channel with RadioUserland

Add to Google

Building CPAN ModulesAsRPMs


To build a CPAN module as an RPM

Use cpanspec.

$ cpanspec -b -v String::Random
Updating /home/steve/.cpan/sources/modules/02packages.details.txt.gz...
Fetching /home/steve/.cpan/sources/modules/02packages.details.txt.gz from http://www.cpan.org//modules/02packages.details.txt.gz...
/home/steve/.cpan/sources/modules/02packages.details.txt.gz is up to date.
Fetching String-Random-0.20.tar.gz from http://www.cpan.org//authors/id/S/ST/STEVE/String-Random-0.20.tar.gz...
Building rpms from perl-String-Random.spec
[...]
Wrote: /home/steve/tmp/cpanspec/perl-String-Random-0.20-1.src.rpm
Wrote: /home/steve/tmp/cpanspec/noarch/perl-String-Random-0.20-1.noarch.rpm
Executing(%clean): /bin/sh -e /home/steve/src/redhat/tmp/rpm-tmp.19562
+ umask 022
+ cd /home/steve/tmp/cpanspec
+ cd String-Random-0.20
+ rm -rf /home/steve/src/redhat/tmp/perl-String-Random-0.20-1-root-steve
+ exit 0
$ ls -F
String-Random-0.20/        perl-String-Random-0.20-1.src.rpm
String-Random-0.20.tar.gz  perl-String-Random.spec
noarch/

(perl-String-Random-0.20-1.noarch.rpm is in the noarch directory.)

FWIW, the generated spec file may need a bit of work to actually build, but cpanspec can usually do the vast majority of the work for you.


Valid XHTML 1.0! Valid CSS!
InterTran (www.tranexp.com)
InterTran (www.tranexp.com)

Please MOVE AND HOLD your MOUSE CURSOR over any WORD in the translated web page in order to see a pop-up window with ALTERNATIVE TRANSLATIONS. Translations provided by: www.tranexp.com