Subject: | Problem Building RPMs From Module::Build::Tiny Modules |
Hi,
I'm trying to build an RPM of LWP::Protocol::PSGI. I'm using cpanspec and rpmbuild in a way that works fine for modules based on EU::MM and Module::Build.
$ cpanspec LWP::Protocol::PSGI
This downloads the tarball from CPAN, parses it and builds a .spec file. The spec file contains (among many others) these lines:
%build
%{__perl} Build.PL installdirs=vendor
./Build
%install
rm -rf $RPM_BUILD_ROOT
./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
(Where $RPM_BUILD_ROOT points to a temp directory under my home directory where I build RPMs)
I then use "rpmbuild -ba perl-LWP-Protocol-PSGI.spec" to build the RPM. Part of the output I get is this:
+ rm -rf /home/dave/rpm/BUILDROOT/perl-LWP-Protocol-PSGI-0.06-1.fc19.x86_64
+ ./Build install destdir=/home/dave/rpm/BUILDROOT/perl-LWP-Protocol-PSGI-0.06-1.fc19.x86_64 create_packlist=0
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ERROR: Can't create '/usr/local/share/man/man3'
Do not have write permissions on '/usr/local/share/man/man3'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
at /usr/share/perl5/vendor_perl/Module/Build/Tiny.pm line 104.
error: Bad exit status from /var/tmp/rpm-tmp.Dwt5Jx (%install)
So it seems that M::B::T is ignoring the 'destdir' parameter when deciding where to install the man pages. This is different behavior to that of both EU::MM and Module::Build.