Plankton has asked for the wisdom of the Perl Monks concerning the following question:

Dear Wise Monks,

I am trying to use cpan2rpm to make RPM's from CPAN modules. The issue I am having is that the Perl executable I need use is /apps/non-standard/perl/bin/perl but cpan2rpm generates scripts that uses /apps/bin/perl. I tried making a symbolic link like so:

# cd /usr/bin # rm perl # ln -s /apps/non-standard/perl/bin/perl perl
But cpan2rpm generates a RPM build script that fails with ...
+ find /var/tmp/perl-Algorithm-Interval2Prefix-0.02-root/usr -type d - +depth -exec rmdir '{}' ';' error: Bad exit status from /var/tmp/rpm-tmp.90654 (%install)
The files and directories under /var/tmp/perl-Algorithm-Interval2Prefix-0.02-root/ are
# ls -l /var/tmp/perl-Algorithm-Interval2Prefix-0.02-root/ total 4 drwxr-xr-x 3 root root 4096 Mar 12 10:44 apps
So how can I get cpan2rpm use something besides /usr/bin/perl ?
  • Comment on How to get cpan2rpm to use /apps/non-standard/perl/bin/perl instead of /usr/bin/perl ?
  • Select or Download Code

Replies are listed 'Best First'.
Re: How to get cpan2rpm to use /apps/non-standard/perl/bin/perl instead of /usr/bin/perl ?
by Plankton (Vicar) on Mar 12, 2010 at 21:40 UTC
    Ooh! I found that I needed to create a ~/.rpmmacros file like so:
    # cat .rpmmacros %_prefix /apps