From 03a37474e338a17739c8db4b73d93f57a8d69d13 Mon Sep 17 00:00:00 2001 From: Steven Pritchard Date: Mon, 4 Sep 2006 18:51:23 +0000 Subject: [PATCH] Rework spec to look more like current cpanspec output. --- Text-Autoformat-filter-provides.sh | 4 ++++ filter-provides.sh | 9 -------- perl-Text-Autoformat.spec | 33 ++++++++++++++++-------------- 3 files changed, 22 insertions(+), 24 deletions(-) create mode 100644 Text-Autoformat-filter-provides.sh delete mode 100755 filter-provides.sh diff --git a/Text-Autoformat-filter-provides.sh b/Text-Autoformat-filter-provides.sh new file mode 100644 index 0000000..93c81a1 --- /dev/null +++ b/Text-Autoformat-filter-provides.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +@@PERL_PROV@@ "$@" | sed -e '/^perl(Hang)$/d' \ + -e '/^perl(NullHang)$/d' diff --git a/filter-provides.sh b/filter-provides.sh deleted file mode 100755 index d00a08e..0000000 --- a/filter-provides.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -if [ -x /usr/lib/rpm/redhat/find-provides ]; then - FINDPROV=/usr/lib/rpm/redhat/find-provides -else - FINDPROV=/usr/lib/rpm/find-provides -fi - -$FINDPROV $* | grep -v 'perl(\(Null\)\?Hang)' diff --git a/perl-Text-Autoformat.spec b/perl-Text-Autoformat.spec index 829fd4d..f1f3b30 100644 --- a/perl-Text-Autoformat.spec +++ b/perl-Text-Autoformat.spec @@ -1,22 +1,21 @@ Name: perl-Text-Autoformat Version: 1.13 -Release: 3%{?dist} -Summary: Text::Autoformat Perl module +Release: 4%{?dist} +Summary: Automatic text wrapping and reformatting License: Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/Text-Autoformat/ -Source0: http://www.cpan.org/modules/by-module/Text/Text-Autoformat-%{version}.tar.gz - -# Filter out perl(Hang) and perl(NullHang) auto-provides. -Source1: filter-provides.sh -%define _use_internal_dependency_generator 0 -%define __find_provides %{SOURCE1} - +Source0: http://www.cpan.org/authors/id/D/DC/DCONWAY/Text-Autoformat-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch -BuildRequires: perl(Text::Reform) +BuildRequires: perl(Text::Reform) >= 1.11 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 + %description Text::Autoformat provides intelligent formatting of plaintext without the need for any kind of embedded mark-up. The module recognizes Internet @@ -32,6 +31,9 @@ the built-in Perl format() mechanism. %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} + %build %{__perl} Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} @@ -42,25 +44,26 @@ rm -rf $RPM_BUILD_ROOT make pure_install PERL_INSTALL_ROOT=$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 \; +find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \; chmod -R u+rwX,go+rX,go-w $RPM_BUILD_ROOT/* -perldoc -t perlartistic > Artistic - %check make test %clean -rm -rf $RPM_BUILD_ROOT +rm -rf $RPM_BUILD_ROOT %{__perl_provides} %files %defattr(-,root,root,-) -%doc Changes README Artistic +%doc Changes README %{perl_vendorlib}/* %{_mandir}/man3/* %changelog +* Fri Sep 01 2006 Steven Pritchard 1.13-4 +- Rework spec to look more like current cpanspec output. + * Mon Sep 05 2005 Steven Pritchard 1.13-3 - Minor spec cleanup. - Add Artistic.