[perl-Readonly-XS] Spec clean-up

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

 



commit ff0f62c29bb457217079e81081c3a48c6c919c76
Author: Paul Howarth <paul@xxxxxxxxxxxx>
Date:   Thu Mar 1 12:48:43 2012 +0000

    Spec clean-up
    
    - Drop -tests subpackage (general lack of interest in this), but include
      them as documentation for the main package
    - Don't use macros for commands
    - No need to remove empty directories from buildroot
    - Add buildreqs for Perl core modules that might be dual-lived
    - Rename makefile patch to include module name and version
    - Fix script interpreter for test suite since we're packaging it
    - Add filter for doc-file dependencies if we don't have %perl_default_filter
    - Make %files list more explicit
    - Use tabs

 .gitignore                                         |    9 +-
 Readonly-XS-1.05-interpreter.patch                 |    8 +
 makefile.pl.patch => Readonly-XS-1.05-prereq.patch |    4 +-
 perl-Readonly-XS.spec                              |  148 +++++++++++---------
 4 files changed, 96 insertions(+), 73 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index b814b8b..1fcc1fd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1 @@
-Readonly-XS-1.05.tar.gz
-clog
-*.rpm
-*.gz
-*.tar
-Readonly-XS-*
-.build*
-x86_64
+/Readonly-XS-[0-9.]*.tar.gz
diff --git a/Readonly-XS-1.05-interpreter.patch b/Readonly-XS-1.05-interpreter.patch
new file mode 100644
index 0000000..60becca
--- /dev/null
+++ b/Readonly-XS-1.05-interpreter.patch
@@ -0,0 +1,8 @@
+--- t/test.t
++++ t/test.t
+@@ -1,4 +1,4 @@
+-#!perl
++#!/usr/bin/perl
+ 
+ # Test suite for Readonly::XS.
+ 
diff --git a/makefile.pl.patch b/Readonly-XS-1.05-prereq.patch
similarity index 78%
rename from makefile.pl.patch
rename to Readonly-XS-1.05-prereq.patch
index 558a1b5..d2c77dc 100644
--- a/makefile.pl.patch
+++ b/Readonly-XS-1.05-prereq.patch
@@ -1,5 +1,5 @@
---- Makefile.PL.orig	2006-10-06 08:44:30.403840967 -0700
-+++ Makefile.PL	2006-10-06 08:44:42.180431002 -0700
+--- Makefile.PL
++++ Makefile.PL
 @@ -5,7 +5,7 @@
  WriteMakefile(
      'NAME'		=> 'Readonly::XS',
diff --git a/perl-Readonly-XS.spec b/perl-Readonly-XS.spec
index 2b0439e..5dcbfbb 100644
--- a/perl-Readonly-XS.spec
+++ b/perl-Readonly-XS.spec
@@ -1,66 +1,88 @@
-Name:           perl-Readonly-XS
-Version:        1.05
-Release:        9%{?dist}
-Summary:        Companion module for Readonly
-Group:          Development/Libraries
-License:        GPL+ or Artistic
-URL:            http://search.cpan.org/dist/Readonly-XS/
-Source0:        http://search.cpan.org/CPAN/authors/id/R/RO/ROODE/Readonly-XS-%{version}.tar.gz
-Patch0:         makefile.pl.patch
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
-
-BuildRequires:  perl(ExtUtils::MakeMaker)
-BuildRequires:  perl(Test::More)
-
-Requires:       perl(Readonly) >= 1.02
-
+Name:		perl-Readonly-XS
+Version:	1.05
+Release:	10%{?dist}
+Summary:	Companion module for Readonly
+Group:		Development/Libraries
+License:	GPL+ or Artistic
+URL:		http://search.cpan.org/dist/Readonly-XS/
+Source0:	http://search.cpan.org/CPAN/authors/id/R/RO/ROODE/Readonly-XS-%{version}.tar.gz
+Patch0:		Readonly-XS-1.05-prereq.patch
+Patch1:		Readonly-XS-1.05-interpreter.patch
+BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
+# Build
+BuildRequires:	perl(ExtUtils::MakeMaker)
+# Module
+BuildRequires:	perl(strict)
+BuildRequires:	perl(vars)
+BuildRequires:	perl(warnings)
+BuildRequires:	perl(XSLoader)
+# Test suite
+BuildRequires:	perl(Test::More)
+# Runtime
+Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
+Requires:	perl(Readonly) >= 1.02
+
+# Obsolete/provide old -tests subpackage (can be removed in F19 development cycle)
+Obsoletes:	perl-Readonly-XS-tests < %{version}-%{release}
+Provides:	perl-Readonly-XS-tests = %{version}-%{release}
+
+# Don't provide the private XS.so() lib
 %{?perl_default_filter}
-%{?perl_subpackage_tests_default}
 
 %description
 Readonly::XS is a companion module for Readonly, to speed up read-only
 scalar variables.
 
-
 %prep
 %setup -q -n Readonly-XS-%{version}
+
+# Build process does not actually need perl(Readonly)
 %patch0
 
+# Fix script interpreter for test suite since we're packaging it
+%patch1
+
+# Avoid doc-file dependencies from tests if we don't have %%perl_default_filter
+%global perl_reqfilt /bin/sh -c "%{__perl_requires} | grep -Fvx 'perl(Test::More)'"
+%define __perl_requires %{perl_reqfilt}
 
 %build
-%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
+perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
 make %{?_smp_mflags}
 
-
 %install
 rm -rf %{buildroot}
-
 make pure_install DESTDIR=%{buildroot}
 find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
 find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
-find %{buildroot} -type d -depth -exec rmdir {} 2>/dev/null ';'
-
-%{_fixperms} %{buildroot}/*
-
+%{_fixperms} %{buildroot}
 
 %check
 make test
 
-
 %clean
 rm -rf %{buildroot}
 
-
 %files
 %defattr(-,root,root,-)
-%doc README Changes
-%{perl_vendorarch}/auto/*
+%doc README Changes t/
+%{perl_vendorarch}/auto/Readonly/
 %{perl_vendorarch}/Readonly/
-%{_mandir}/man3/*.3*
-
+%{_mandir}/man3/Readonly::XS.3pm*
 
 %changelog
+* Thu Mar  1 2012 Paul Howarth <paul@xxxxxxxxxxxx> - 1.05-10
+- Drop -tests subpackage (general lack of interest in this), but include
+  them as documentation for the main package
+- Don't use macros for commands
+- No need to remove empty directories from buildroot
+- Add buildreqs for Perl core modules that might be dual-lived
+- Rename makefile patch to include module name and version
+- Fix script interpreter for test suite since we're packaging it
+- Add filter for doc-file dependencies if we don't have %%perl_default_filter
+- Make %%files list more explicit
+- Use tabs
+
 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@xxxxxxxxxxxxxxxxxxxxxxx> - 1.05-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 
@@ -71,25 +93,25 @@ rm -rf %{buildroot}
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 
 * Tue Dec 21 2010 Marcela Maslanova <mmaslano@xxxxxxxxxx> - 1.05-6
-- 661697 rebuild for fixing problems with vendorach/lib
+- Rebuild to fix problems with vendorarch/lib (#661697)
 
 * Thu May 06 2010 Marcela Maslanova <mmaslano@xxxxxxxxxx> - 1.05-5
 - Mass rebuild with perl-5.12.0
 
-* Sun Feb 21 2010 Chris Weyl <cweyl@xxxxxxxxxxxxxxx> 1.05-4
-- add perl_default_filter, etc
+* Sun Feb 21 2010 Chris Weyl <cweyl@xxxxxxxxxxxxxxx> - 1.05-4
+- Add perl_default_filter, etc
 - PERL_INSTALL_ROOT => DESTDIR
 
 * Mon Dec  7 2009 Stepan Kasal <skasal@xxxxxxxxxx> - 1.05-3
-- rebuild against perl 5.10.1
+- Rebuild against perl 5.10.1
 
 * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@xxxxxxxxxxxxxxxxxxxxxxx> - 1.05-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 
-* Fri Feb 27 2009 Chris Weyl <cweyl@xxxxxxxxxxxxxxx> 1.05-1
-- update to 1.05
-- filter our provides to prevent private lib from showing up
-- drop patch1; incorporated upstream as of 1.05
+* Fri Feb 27 2009 Chris Weyl <cweyl@xxxxxxxxxxxxxxx> - 1.05-1
+- Update to 1.05
+- Filter our provides to prevent private lib from showing up
+- Drop patch1; incorporated upstream as of 1.05
 
 * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@xxxxxxxxxxxxxxxxxxxxxxx> - 1.04-12
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
@@ -100,45 +122,45 @@ rm -rf %{buildroot}
 * Mon Feb 18 2008 Fedora Release Engineering <rel-eng@xxxxxxxxxxxxxxxxx> - 1.04-10.2
 - Autorebuild for GCC 4.3
 
-* Mon Jan 14 2008 Tom "spot" Callaway <tcallawa@xxxxxxxxxx> 1.04-9.2
-- patch Carp::croak call for new perl
+* Mon Jan 14 2008 Tom "spot" Callaway <tcallawa@xxxxxxxxxx> - 1.04-9.2
+- Patch Carp::croak call for new perl
 
-* Mon Jan 14 2008 Tom "spot" Callaway <tcallawa@xxxxxxxxxx> 1.04-9
-- rebuild for new perl
+* Mon Jan 14 2008 Tom "spot" Callaway <tcallawa@xxxxxxxxxx> - 1.04-9
+- Rebuild for new perl
 
-* Tue Oct 16 2007 Tom "spot" Callaway <tcallawa@xxxxxxxxxx> 1.04-8.2
-- add BR: perl(Test::More)
+* Tue Oct 16 2007 Tom "spot" Callaway <tcallawa@xxxxxxxxxx> - 1.04-8.2
+- Add BR: perl(Test::More)
 
-* Tue Oct 16 2007 Tom "spot" Callaway <tcallawa@xxxxxxxxxx> 1.04-8.1
-- correct license tag
-- add BR: perl(ExtUtils::MakeMaker)
+* Tue Oct 16 2007 Tom "spot" Callaway <tcallawa@xxxxxxxxxx> - 1.04-8.1
+- Correct license tag
+- Add BR: perl(ExtUtils::MakeMaker)
 
-* Tue Aug 21 2007 Chris Weyl <cweyl@xxxxxxxxxxxxxxx> 1.04-8
-- bump
+* Tue Aug 21 2007 Chris Weyl <cweyl@xxxxxxxxxxxxxxx> - 1.04-8
+- Bump
 
-* Fri Oct 06 2006 Chris Weyl <cweyl@xxxxxxxxxxxxxxx> 1.04-7
-- bump for missing patch...
+* Fri Oct 06 2006 Chris Weyl <cweyl@xxxxxxxxxxxxxxx> - 1.04-7
+- Bump for missing patch...
 
-* Fri Oct 06 2006 Chris Weyl <cweyl@xxxxxxxxxxxxxxx> 1.04-6
-- drop br on perl(Readonly), patch Makefile.PL as well
-- rework spec to use macros
+* Fri Oct 06 2006 Chris Weyl <cweyl@xxxxxxxxxxxxxxx> - 1.04-6
+- Drop br on perl(Readonly), patch Makefile.PL as well
+- Rework spec to use macros
 
-* Thu Oct 05 2006 Christian Iseli <Christian.Iseli@xxxxxxxx> 1.04-5
-- rebuilt for unwind info generation, broken in gcc-4.1.1-21
+* Thu Oct 05 2006 Christian Iseli <Christian.Iseli@xxxxxxxx> - 1.04-5
+- Rebuilt for unwind info generation, broken in gcc-4.1.1-21
 
-* Tue Sep 19 2006 Chris Weyl <cweyl@xxxxxxxxxxxxxxx> 1.04-4
-- bump for mass rebuild
+* Tue Sep 19 2006 Chris Weyl <cweyl@xxxxxxxxxxxxxxx> - 1.04-4
+- Bump for mass rebuild
 
 * Thu Dec 08 2005 Michael A. Peters <mpeters@xxxxxxx> - 1.04-3
-- proper version on perl(Readonly) BuildRequires & Requires
+- Proper version on perl(Readonly) BuildRequires & Requires
 
 * Thu Dec 08 2005 Michael A. Peters <mpeters@xxxxxxx> - 1.04-1
 - New Version
 - BuildRequires perl(Readonly), remove explicit requires on
-- perl-Readonly version
+  perl-Readonly version
 
 * Thu Dec 08 2005 Michael A. Peters <mpeters@xxxxxxx> - 1.03-2
 - Fix license and BuildRequires
 
 * Sat Nov 12 2005 Michael A. Peters <mpeters@xxxxxxx> - 1.03-1
-- created spec file
+- Created spec file
--
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