[perl-Text-Autoformat] Update to 1.669004

Paul Howarth pghmcfc at fedoraproject.org
Fri Oct 25 15:02:32 UTC 2013


commit c189a753f8924b43f912fcde2525c768e4164e96
Author: Paul Howarth <paul at city-fan.org>
Date:   Fri Oct 25 16:01:59 2013 +0100

    Update to 1.669004
    
    - New upstream release 1.669004
      - Tweaked widow handling to avoid a nasty edge case
    - Specify all dependencies
    - Replace provides filter with a patch that works right back to EL-5
    - Don't need to remove empty directories from the buildroot
    - Drop %defattr, redundant since rpm 4.4
    - Make %files list more explicit
    - Don't use macros for commands

 .gitignore                              |    3 +-
 Text-Autoformat-1.669004-provides.patch |   26 +++++++++++++
 Text-Autoformat-filter-provides.sh      |    4 --
 perl-Text-Autoformat.spec               |   63 +++++++++++++++++++------------
 sources                                 |    2 +-
 5 files changed, 67 insertions(+), 31 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 4965030..0a32bb0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1 @@
-Text-Autoformat-v1.14.0.tar.gz
-/Text-Autoformat-1.669002.tar.gz
+/Text-Autoformat-[0-9.]*.tar.gz
diff --git a/Text-Autoformat-1.669004-provides.patch b/Text-Autoformat-1.669004-provides.patch
new file mode 100644
index 0000000..39e269b
--- /dev/null
+++ b/Text-Autoformat-1.669004-provides.patch
@@ -0,0 +1,26 @@
+Separating "package" and package names by a newline results in
+rpm provides not being generated for the package, which is
+exactly what we want in these cases, as they're private modules.
+
+--- lib/Text/Autoformat.pm
++++ lib/Text/Autoformat.pm
+@@ -649,7 +649,8 @@
+     return 1;
+ }
+ 
+-package Hang;
++package # hide from rpm
++    Hang;
+ use strict;
+ 
+ # ROMAN NUMERALS
+@@ -851,7 +852,8 @@
+ 
+ sub empty { 0 }
+ 
+-package NullHang;
++package # hide from rpm
++    NullHang;
+ use strict;
+ 
+ sub new       { bless {}, $_[0] }
diff --git a/perl-Text-Autoformat.spec b/perl-Text-Autoformat.spec
index 608c1bd..909ccb5 100644
--- a/perl-Text-Autoformat.spec
+++ b/perl-Text-Autoformat.spec
@@ -1,23 +1,31 @@
 Name:           perl-Text-Autoformat
-Version:        1.669002
-Release:        9%{?dist}
+Version:        1.669004
+Release:        1%{?dist}
 Summary:        Automatic text wrapping and reformatting
 License:        GPL+ or Artistic
 Group:          Development/Libraries
 URL:            http://search.cpan.org/dist/Text-Autoformat/
 Source0:        http://www.cpan.org/authors/id/D/DC/DCONWAY/Text-Autoformat-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch0:         Text-Autoformat-1.669004-provides.patch
+BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
 BuildArch:      noarch
+# Module Build
 BuildRequires:  perl(Module::Build)
-BuildRequires:  perl(Test::More)
+BuildRequires:  perl(warnings)
+# Module Runtime
+BuildRequires:  perl(Carp)
+BuildRequires:  perl(Data::Dumper)
+BuildRequires:  perl(Exporter)
+BuildRequires:  perl(overload)
+BuildRequires:  perl(strict)
 BuildRequires:  perl(Text::Reform) >= 1.11
-BuildRequires:  perl(version)
-Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
-
-# Filter out perl(Hang) and perl(NullHang) auto-provides.
-Source99:       Text-Autoformat-filter-provides.sh
-%global real_perl_provides %{__perl_provides}
-%define __perl_provides %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)-filter-provides
+BuildRequires:  perl(Text::Tabs)
+BuildRequires:  perl(utf8)
+BuildRequires:  perl(vars)
+# Test Suite
+BuildRequires:  perl(Test::More)
+# Runtime
+Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
 
 %description
 Text::Autoformat provides intelligent formatting of plaintext without the
@@ -32,37 +40,44 @@ the built-in Perl format() mechanism.
 
 %prep
 %setup -q -n Text-Autoformat-%{version}
-chmod a-x lib/Text/Autoformat.pm Changes README
 
-sed -e 's,@@PERL_PROV@@,%{real_perl_provides},' %{SOURCE99} > %{__perl_provides}
-chmod +x %{__perl_provides}
+# Drop bogus exec bits
+chmod -c -x config.*
+
+# Hide private modules from rpm
+%patch0
 
 %build
-%{__perl} Build.PL installdirs=vendor
+perl Build.PL installdirs=vendor
 ./Build
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
 ./Build install destdir=$RPM_BUILD_ROOT create_packlist=0
-
-find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
-
-%{_fixperms} $RPM_BUILD_ROOT/*
+%{_fixperms} $RPM_BUILD_ROOT
 
 %check
 ./Build test
 
 %clean
-rm -rf $RPM_BUILD_ROOT %{__perl_provides}
+rm -rf $RPM_BUILD_ROOT
 
 %files
-%defattr(-,root,root,-)
 %doc Changes README config.emacs config.vim
-%{perl_vendorlib}/*
-%{_mandir}/man3/*
+%{perl_vendorlib}/Text/
+%{_mandir}/man3/Text::Autoformat.3pm*
 
 %changelog
+* Fri Oct 25 2013 Paul Howarth <paul at city-fan.org> - 1.669004-1
+- Update to 1.669004
+  - Tweaked widow handling to avoid a nasty edge case
+- Specify all dependencies
+- Replace provides filter with a patch that works right back to EL-5
+- Don't need to remove empty directories from the buildroot
+- Drop %%defattr, redundant since rpm 4.4
+- Make %%files list more explicit
+- Don't use macros for commands
+
 * Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.669002-9
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 
diff --git a/sources b/sources
index 92992c2..9013d0d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-c2c400207f49a769e32b5b1b660b07f7  Text-Autoformat-1.669002.tar.gz
+7a7881ca625fa71e551c1f43910f2865  Text-Autoformat-1.669004.tar.gz



More information about the perl-devel mailing list