# perl library paths %perl_vendor_privlib %(eval "`%__perl -V:installvendorlib`"; echo "$installvendorlib") %perl_vendor_archlib %(eval "`%__perl -V:installvendorarch`"; echo "$installvendorarch") %perl_vendor_autolib %perl_vendor_archlib/auto # MDK compatibility %perl_vendorlib %perl_vendor_privlib %perl_vendorarch %perl_vendor_archlib %makeinstall_std %make_install install DESTDIR=%buildroot # mandirs %perl_vendor_man1dir %_man1dir %perl_vendor_man3dir %_man3dir # build with the same optimization as perl %perl_vendor_optflags %(eval "`%__perl -V:optimize`"; echo "$optimize") # automate various rpmbuild stages # MM stands for ExtUtils::MakeMaker # MB stands for Module::Build # %%build helpers %perl_vendor_build \ _perl_vendor_MB_build() { \ : writing Build script \ %__perl Build.PL installdirs=vendor "$@" ldtest.c \ gcc ldtest.c ${LD_LIBRARY_PATH:+-L$LD_LIBRARY_PATH} -lperl $BLIBS $EXTRA_BLIBS \ LD_BIND_NOW=1 ./a.out \ rm -f ldtest.c ./a.out \ } \ perl_vendor_build() { \ export PERL_EXTUTILS_AUTOINSTALL="${PERL_EXTUTILS_AUTOINSTALL:---skip}" \ export XSUBPP_STATIC_XS=${XSUBPP_STATIC_XS:-1} \ _perl_vendor_fixin \ if [ -f Build.PL ]; then \ _perl_vendor_MB_build "$@" \ else \ _perl_vendor_MM_build "$@" \ fi \ _perl_vendor_check_dso \ } \ perl_vendor_build # %%install helpers %perl_vendor_install \ _perl_vendor_MB_install() { \ : installing \ %__perl Build install destdir=%buildroot installdirs=vendor "$@" &2; then \ %__grep -F 'perl(' .perl.req >>%buildroot/.perl.req; fi \ } \ _perl_vendor_check_buildroot() { \ : prompting for files that contain /usr/local \ find %buildroot -type f -exec %__grep -FH /usr/local {} ';' \ : prompting for files that contain /tmp \ find %buildroot -type f -not -name .packlist -exec %__grep -FH /tmp '{}' ';' \ } \ perl_vendor_install() { \ if [ -f Build.PL ]; then \ _perl_vendor_MB_install "$@" \ else \ _perl_vendor_MM_install "$@" \ fi \ _perl_vendor_check_buildroot \ } \ perl_vendor_install # sugar %perl_fix_local %__subst -p 's,/usr/local\\>,/usr,g' %CPAN() http://search.cpan.org/dist/%1/%nil