[perl-PPI] Clean up for modern rpm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



commit 9ba4d5117184a2bac16928933bdad98b8b5d6e5c
Author: Paul Howarth <paul@xxxxxxxxxxxx>
Date:   Thu Jul 21 11:02:40 2011 +0100

    Clean up for modern rpm
    
    - Always run test suite but don't run release tests when bootstrapping
    - Nobody else likes macros for commands
    - Clean up for modern rpm:
      - Drop explicit buildroot tag
      - Drop buildroot cleaning
      - Drop %defattr
      - Use native provides filtering
    - Use a patch rather than scripting iconv to fix character encoding
    - Upstream file permissions no longer need fixing

 PPI-1.215-UTF8.patch |   11 ++++++++
 perl-PPI.spec        |   71 ++++++++++++++++++++++++++-----------------------
 2 files changed, 49 insertions(+), 33 deletions(-)
---
diff --git a/PPI-1.215-UTF8.patch b/PPI-1.215-UTF8.patch
new file mode 100644
index 0000000..3c22cc9
--- /dev/null
+++ b/PPI-1.215-UTF8.patch
@@ -0,0 +1,11 @@
+--- PPI/Changes
++++ PPI/Changes
+@@ -705,7 +705,7 @@
+ 	- Resolved Lexer bug CPAN #13425 ( $p{package} creates a PPI::Statement::Package )
+ 	  Added smarts to resolve word-started statements as ::Expression in subscripts
+ 	- Resolved PDOM bug CPAN #13326 ( problems in index_locations )
+-	  Patch and comprehensive additional tests provided by johanl[�]DarSerMan.com
++	  Patch and comprehensive additional tests provided by johanl[ÄT]DarSerMan.com
+ 	- Removed dependency on Class::Autouse. Just load Tokenizer and Lexer up front.
+ 	- Removed dependency on File::Slurp. Only use it 3 times and it's not worth it
+ 	  when almost all the files we will read are under 50k.
diff --git a/perl-PPI.spec b/perl-PPI.spec
index a89dbe0..d855edf 100644
--- a/perl-PPI.spec
+++ b/perl-PPI.spec
@@ -1,39 +1,42 @@
 Name:           perl-PPI
 Version:        1.215
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Parse, Analyze and Manipulate Perl
 Group:          Development/Libraries
 License:        GPL+ or Artistic
 URL:            http://search.cpan.org/dist/PPI/
 Source0:        http://www.cpan.org/authors/id/A/AD/ADAMK/PPI-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch0:         PPI-1.215-UTF8.patch
 BuildArch:      noarch
 BuildRequires:  perl(ExtUtils::MakeMaker)
-# Perl core modules
 BuildRequires:  perl(List::Util) >= 1.20
 BuildRequires:  perl(Storable) >= 2.17
-BuildRequires:  perl(Test::More) >= 0.86
-BuildRequires:  perl(Digest::MD5) >= 2.35
-# CPAN modules
 BuildRequires:  perl(Clone) >= 0.30
-BuildRequires:  perl(File::Find::Rule) >= 0.32
+BuildRequires:  perl(Digest::MD5) >= 2.35
 BuildRequires:  perl(File::Remove) >= 1.42
 BuildRequires:  perl(IO::String) >= 1.07
 BuildRequires:  perl(List::MoreUtils) >= 0.16
 BuildRequires:  perl(Params::Util) >= 1.00
-%if !%{defined perl_bootstrap}
-BuildRequires:  perl(File::Find::Rule::Perl) >= 1.09
-BuildRequires:  perl(Perl::MinimumVersion) >= 1.25
 BuildRequires:  perl(Task::Weaken)
-BuildRequires:  perl(Test::ClassAPI) >= 1.04
-BuildRequires:  perl(Test::CPAN::Meta) >= 0.17
-BuildRequires:  perl(Test::MinimumVersion) >= 0.101080
+BuildRequires:  perl(Test::More) >= 0.86
 BuildRequires:  perl(Test::NoWarnings) >= 0.084
 BuildRequires:  perl(Test::Object) >= 0.07
-BuildRequires:  perl(Test::Pod) >= 1.44
 BuildRequires:  perl(Test::SubCalls) >= 1.07
+# Circular dependencies in release tests, so don't do them when bootstrapping:
+# Perl::MinimumVersion -> PPI
+%if 0%{!?perl_bootstrap:1}
+BuildRequires:  perl(File::Find::Rule) >= 0.32
+BuildRequires:  perl(File::Find::Rule::Perl) >= 1.09
+BuildRequires:  perl(Perl::MinimumVersion) >= 1.20
+BuildRequires:  perl(Test::ClassAPI) >= 1.03
+BuildRequires:  perl(Test::CPAN::Meta)
+BuildRequires:  perl(Test::MinimumVersion) >= 0.101080
+BuildRequires:  perl(Test::Pod) >= 1.00
 %endif
-Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
+Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
+
+# Filter out redundant unversioned provides
+%global __provides_exclude ^perl\\(PPI::.+\\)$
 
 %description
 Parse, analyze and manipulate Perl (without perl).
@@ -41,40 +44,31 @@ Parse, analyze and manipulate Perl (without perl).
 
 %prep
 %setup -q -n PPI-%{version}
-%{?filter_setup:
-%filter_from_provides /^perl(PPI::.*)$/d
-%?perl_default_filter
-}
-iconv -f iso8859-1 -t utf-8 < Changes > Changes.1
-mv Changes.1 Changes 
-chmod -c 644 lib/PPI/Document/File.pm
+
+# Re-code docs as UTF-8
+%patch0 -p1
 
 
 %build
-%{__perl} Makefile.PL INSTALLDIRS=vendor
+perl Makefile.PL INSTALLDIRS=vendor
 make %{?_smp_mflags}
 
 
 %install
-rm -rf $RPM_BUILD_ROOT
-make pure_install DESTDIR=$RPM_BUILD_ROOT
-find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
-find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
-%{_fixperms} $RPM_BUILD_ROOT
+make pure_install DESTDIR=%{buildroot}
+find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
+find %{buildroot} -type d -depth -exec rmdir {} 2>/dev/null ';'
+%{_fixperms} %{buildroot}
 
 
 %check
-%if !%{defined perl_bootstrap}
 make test
+%if 0%{!?perl_bootstrap:1}
 make test TEST_FILES="xt/*.t" RELEASE_TESTING=1
 %endif
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
 
 %files
-%defattr(-,root,root,-)
 %doc Changes LICENSE README inline2test.conf inline2test.tpl
 %{perl_vendorlib}/PPI/
 %{perl_vendorlib}/PPI.pm
@@ -82,6 +76,17 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Thu Jul 21 2011 Paul Howarth <paul@xxxxxxxxxxxx> - 1.215-3
+- always run test suite but don't run release tests when bootstrapping
+- nobody else likes macros for commands
+- clean up for modern rpm:
+  - drop explicit buildroot tag
+  - drop buildroot cleaning
+  - drop %%defattr
+  - use native provides filtering
+- use a patch rather than scripting iconv to fix character encoding
+- upstream file permissions no longer need fixing
+
 * Tue Jun 28 2011 Marcela Mašláňová <mmaslano@xxxxxxxxxx> - 1.215-2
 - rebuild with Perl 5.14.1
 - use perl_bootstrap macro
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/perl-devel

[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Legacy Announce]     [Fedora PHP Devel]     [Kernel Devel]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Big List of Linux Books]     [Gimp]     [Yosemite Information]
  Powered by Linux