output.p 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. --- output.orig.spec 2010-03-17 21:15:02.000000000 +0800
  2. +++ output.spec 2010-03-17 21:15:02.000000000 +0800
  3. @@ -14,6 +14,7 @@ License: BSD
  4. URL: http://www.testpkg.org/
  5. Source0: http://www.testpkg.org/testpkg-%{version}.tar.gz
  6. Source100: testpkg.yaml
  7. +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
  8. %description
  9. Sample package for spectacle testings, which will be used as
  10. @@ -41,7 +42,13 @@ This package contains development files
  11. # >> build pre
  12. # << build pre
  13. -
  14. +if test -f Makefile.PL; then
  15. +%{__perl} Makefile.PL INSTALLDIRS=vendor
  16. +make %{?jobs:-j%jobs}
  17. +else
  18. +%{__perl} Build.PL --installdirs vendor
  19. +./Build
  20. +fi
  21. # >> build post
  22. # << build post
  23. @@ -49,6 +56,15 @@ This package contains development files
  24. rm -rf %{buildroot}
  25. # >> install pre
  26. # << install pre
  27. +if test -f Makefile.PL; then
  28. +make pure_install PERL_INSTALL_ROOT=%{buildroot}
  29. +else
  30. +./Build install --installdirs vendor
  31. +fi
  32. +find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
  33. +find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'
  34. +find %{buildroot} -type f -name '*.bs' -empty -exec rm -f {} ';'
  35. +%{_fixperms} %{buildroot}/*
  36. # >> install post
  37. # << install post