Rework spec to look more like current cpanspec output.

epel9
Steven Pritchard 19 years ago
parent 7c95b38cb5
commit 03a37474e3

@ -0,0 +1,4 @@
#!/bin/sh
@@PERL_PROV@@ "$@" | sed -e '/^perl(Hang)$/d' \
-e '/^perl(NullHang)$/d'

@ -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)'

@ -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 <steve@kspei.com> 1.13-4
- Rework spec to look more like current cpanspec output.
* Mon Sep 05 2005 Steven Pritchard <steve@kspei.com> 1.13-3
- Minor spec cleanup.
- Add Artistic.

Loading…
Cancel
Save