Changes of Revision 3
[-] | Changed | perl-macros.changes |
x 1
2 ------------------------------------------------------------------- 3 +Tue Nov 30 14:24:26 UTC 2010 - coolo@novell.com 4 + 5 +- require perl-devel on fedora too 6 + 7 +------------------------------------------------------------------- 8 +Tue Nov 30 10:11:51 UTC 2010 - coolo@novell.com 9 + 10 +- add a not so nice hack to make sure we overwrite perl's macros 11 + on older suse distributions 12 +- sync perl macros with perl 13 + 14 +------------------------------------------------------------------- 15 +Mon Nov 29 17:55:53 UTC 2010 - coolo@novell.com 16 + 17 +- some more fixes for fedora builds 18 + 19 +------------------------------------------------------------------- 20 +Mon Nov 29 15:34:55 UTC 2010 - coolo@novell.com 21 + 22 +- sync macros from perl package 23 + 24 +------------------------------------------------------------------- 25 +Mon Nov 29 11:53:33 CET 2010 - kukuk@suse.de 26 + 27 +- Install as macros.perl.suse on non openSUSE distributions 28 + 29 +------------------------------------------------------------------- 30 +Mon Nov 29 09:30:39 UTC 2010 - kukuk@suse.de 31 + 32 +- Add %perl_make_install 33 + 34 +------------------------------------------------------------------- 35 Fri Feb 12 10:47:12 UTC 2010 - chris@computersalat.de 36 37 - fix for mandir 38 |
||
[-] | Changed | perl-macros.spec ^ |
41 1
2 Source1: README 3 BuildRoot: %{_tmppath}/%{name}-%{version}-build 4 Provides: perl_gen_filelist 5 +%if 0%{?fedora} 6 +Requires: perl(ExtUtils::MakeMaker) 7 +Requires: perl(Test::More) 8 +Requires: perl-devel 9 +%endif 10 +Requires: perl 11 + 12 13 %description 14 This package provides perl rpm macros. 15
16 17 %build 18 19 +%if 0%{?suse_version} 20 +%if %suse_version < 1140 21 +%post 22 +# most evil hack ever - rpm does not sort the macros, so we need to rename the old one 23 +cp %{_sysconfdir}/rpm/macros.suse-perl %{_sysconfdir}/rpm/macros.perl 24 +%endif 25 +%endif 26 + 27 %install 28 -%{__install} -D -m644 %{S:0} ${RPM_BUILD_ROOT}%{_sysconfdir}/rpm/macros.perl 29 +# make sure it overwrites macros.perl if sorted alphabetically 30 +%{__install} -D -m644 %{S:0} ${RPM_BUILD_ROOT}%{_sysconfdir}/rpm/macros.suse-perl 31 %clean 32 %{__rm} -rf $RPM_BUILD_ROOT 33 34 %files 35 %defattr(-,root,root) 36 %doc README 37 -%{_sysconfdir}/rpm/macros.perl 38 +%{_sysconfdir}/rpm/macros.* 39 40 %changelog 41 |
||
[+] | Changed | macros.perl ^ |
@@ -1,7 +1,53 @@ +# macros.perl file +# macros for perl module building. handle with care. + +# Useful perl macros (from Artur Frysiak <wiget@t17.ds.pwr.wroc.pl>) +# +%perl_sitearch %(eval "`%{__perl} -V:installsitearch`"; echo $installsitearch) +%perl_sitelib %(eval "`%{__perl} -V:installsitelib`"; echo $installsitelib) +%perl_vendorarch %(eval "`%{__perl} -V:installvendorarch`"; echo $installvendorarch) +%perl_vendorlib %(eval "`%{__perl} -V:installvendorlib`"; echo $installvendorlib) +%perl_archlib %(eval "`%{__perl} -V:installarchlib`"; echo $installarchlib) +%perl_privlib %(eval "`%{__perl} -V:installprivlib`"; echo $installprivlib) + +# More useful perl macros (from Raul Dias <rsd@swi.com.br>) +# +%perl_version %(perl -V:version | sed "s!.*='!!;s!'.*!!") +%perl_man1ext %(perl -V:man1ext | sed "s!.*='!!;s!'.*!!") +%perl_man3ext %(perl -V:man3ext | sed "s!.*='!!;s!'.*!!") +%perl_man1dir %(perl -V:man1dir | sed "s!.*='!!;s!'.*!!") +%perl_man3dir %(perl -V:man3dir | sed "s!.*='!!;s!'.*!!") +%perl_installman1dir %(perl -V:installman1dir | sed "s!.*='!!;s!'.*!!") +%perl_installman3dir %(perl -V:installman3dir | sed "s!.*='!!;s!'.*!!") +%perl_installarchlib %(perl -V:installarchlib | sed "s!.*='!!;s!'.*!!") +%perl_prefix %{buildroot} + +# Macro to encapsulate perl requires (empty for fedora and suse > 11.3) +# we keep the complicated form even here to easy sync the other macros with +# perl-macros package +# +%perl_requires() \ +%if 0%{?suse_version} > 0 && 0%{?suse_version} < 1700 \ +Requires: perl = %{perl_version} \ +%endif + +# suse specific macros +# %perl_make_install make DESTDIR=$RPM_BUILD_ROOT install_vendor -# macro: perl_gen_filelist +%perl_process_packlist(n:) \ + if test -n "$RPM_BUILD_ROOT" -a -d $RPM_BUILD_ROOT%perl_vendorarch/auto; then \ + find $RPM_BUILD_ROOT%perl_vendorarch/auto -name .packlist -print0 | xargs -0 -r rm \ + if [ %{_target_cpu} == noarch ]; then \ + find $RPM_BUILD_ROOT%perl_vendorarch/auto -depth -type d -print0 | xargs -0 -r rmdir \ + fi \ + fi \ + rm -f $RPM_BUILD_ROOT%{perl_archlib}/perllocal.pod \ + %nil + +# macro: perl_gen_filelist (from Christian <chris@computersalat.de>) # do the rpmlint happy filelist generation # with %dir in front of directories +# %perl_gen_filelist(n)\ FILES=%{name}.files\ # fgen_dir func\ @@ -39,7 +85,10 @@ \ # build filelist\ for i in ${all_dir[@]}; do\ - # do not add "%dir %{perl_vendorarch}/auto", included in perl package\ + # do not add "dir {perl_vendorlib/arch}/auto", included in perl package\ + if [ "${i}" = "auto" ]; then\ + continue\ + fi\ if [ "%{perl_vendorlib}/${i}" = "%{perl_vendorarch}/auto" ]; then\ continue\ else\ |