fix various package review issues.

This commit is contained in:
Robin Norwood 2007-10-25 05:02:23 +00:00
parent 21d4d55432
commit e5396903d1

View File

@ -1,23 +1,22 @@
Name: perl-URI
Version: 1.35
Release: 3.1
Release: 4%{?dist}
Summary: A Perl module implementing URI parsing and manipulation
Group: Development/Libraries
License: GPL+ or Artistic
URL: http://search.cpan.org/dist/URI/
Source0: http://www.cpan.org/authors/id/G/GA/GAAS/URI-%{version}.tar.gz
Source1: filter-requires-perl-URI.sh
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: perl >= 1:5.6.1
BuildRequires: perl(MIME::Base64)
BuildRequires: perl(ExtUtils::MakeMaker)
# Uncomment the following line when bug #351761 is fixed and perl-Business-ISBN is included in Fedora
# Also be sure to remove Requires filter found in prep section for perl(Business::ISBN)
#BuildRequires: perl(Business::ISBN)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%define __perl_requires %{SOURCE1}
%description
This module implements the URI class. Objects of this class represent
@ -29,10 +28,22 @@ updated by RFC 2732).
%setup -q -n URI-%{version}
chmod 644 uri-test
# Filter unwanted Requires:
cat << \EOF > %{name}-req
#!/bin/sh
%{__perl_requires} $* |\
sed -e '/perl(Business::ISBN)/d'
EOF
%define __perl_requires %{_builddir}/URI-%{version}/%{name}-req
chmod +x %{__perl_requires}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
@ -40,9 +51,16 @@ find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';'
chmod -R u+w $RPM_BUILD_ROOT/*
%check || :
for file in Changes; do
iconv -f iso-8859-1 -t utf-8 < "$file" > "${file}_"
mv -f "${file}_" "$file"
done
%check
make test
%clean
rm -rf $RPM_BUILD_ROOT
@ -55,6 +73,13 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Thu Oct 25 2007 Robin Norwood <rnorwood@redhat.com> - 1.35-4
- Fix various package review issues:
- Remove redundant BR: perl
- remove "|| :" from %%check
- move requires filter into spec file
- remove tabs and fix spacing
* Wed Oct 17 2007 Tom "spot" Callaway <tcallawa@redhat.com> - 1.35-3.1
- correct license tag
- add BR: perl(ExtUtils::MakeMaker)