Given this %install section in the spec file:
...
%prep
%global
%setup
%build
/usr/bin/perl/bin/perl Makefile.PL INSTALLDIRS=vendor
make
make test
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT > %{_topdir}/%{name}.install.out
...
if you get this error:
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.7597
+ umask 022
+ cd /users/red/tasks/perl-5.14-for-cel5.03/platform/vendor_perl/perl-XML-SAX/BUILD
+ cd perl-XML-SAX-0.99
+ rm -rf /users/red/tasks/perl-5.14-for-cel5.03/platform/vendor_perl/perl-XML-SAX/BUILDROOT/perl-XML-SAX-0.99-1.i386
+ make install DESTDIR=/users/red/tasks/perl-5.14-for-cel5.03/platform/vendor_perl/perl-XML-SAX/BUILDROOT/perl-XML-SAX-0.99-1.i386
Can't locate XML/SAX/ParserFactory.pm in @INC (@INC contains: /usr/bin/perl-5.14.1/lib/eman_perl/i686-linux-thread-multi /usr/bin/perl-5.14.1/lib/eman_perl /usr/bin/perl-5.14.1/lib/vendor_perl/5.14.1/i686-linux-thread-multi /usr/bin/perl-5.14.1/lib/vendor_perl/5.14.1 /usr/bin/perl-5.14.1/lib/5.14.1/i686-linux-thread-multi /usr/bin/perl-5.14.1/lib/5.14.1 /usr/bin/perl-5.14.1/lib/site_perl .) at /usr/bin/perl-5.14.1/lib/vendor_perl/5.14.1/XML/SAX.pm line 18.
BEGIN failed--compilation aborted at /usr/bin/perl-5.14.1/lib/vendor_perl/5.14.1/XML/SAX.pm line 18.
Compilation failed in require.
BEGIN failed--compilation aborted.
make[1]: *** [install_sax_pureperl] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.7597 (%install)
RPM build errors:
Macro % has illegal name (%define)
Bad exit status from /var/tmp/rpm-tmp.7597 (%install)
make: *** [perl-XML-SAX-0.99-1.i386.rpm] Error 1
You need to add the line ...
export PERL5LIB=${RPM_BUILD_ROOT}/usr/bin/perl-5.14.1/lib/vendor_perl/5.14.1
... so your spec looks like this ...
%prep
%global
%setup
%build
/usr/bin/perl/bin/perl Makefile.PL INSTALLDIRS=vendor
make
make test
%install
rm -rf $RPM_BUILD_ROOT
export PERL5LIB=${RPM_BUILD_ROOT}/usr/bin/perl-5.14.1/lib/vendor_perl/5.14.1
make install DESTDIR=$RPM_BUILD_ROOT > %{_topdir}/%{name}.install.out
No comments:
Post a Comment