Spec clean-up

- Clean up spec file for modern rpmbuild:
  - Drop BuildRoot definition
  - Drop %defattr
  - Drop %clean section
  - Drop cleaning of buildroot in %install
  - Use DESTDIR rather than PERL_INSTALL_ROOT
  - Use %{_fixperms} macro rather than our own chmod incantation
  - Don't use macros for commands
- Break build dependency loop by only using perl(Test::Pod) if we're not
  bootstrapping
- BR: perl(Test::More)
This commit is contained in:
Paul Howarth 2012-01-20 10:29:21 +00:00
parent 93897872b6
commit d7bac516d9
2 changed files with 28 additions and 21 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
HTML-Tagset-3.20.tar.gz /HTML-Tagset-[0-9.]*.tar.gz

View File

@ -1,52 +1,59 @@
Name: perl-HTML-Tagset Name: perl-HTML-Tagset
Version: 3.20 Version: 3.20
Release: 9%{?dist} Release: 10%{?dist}
Summary: HTML::Tagset - data tables useful in parsing HTML Summary: HTML::Tagset - data tables useful in parsing HTML
Group: Development/Libraries Group: Development/Libraries
License: GPL+ or Artistic License: GPL+ or Artistic
URL: http://search.cpan.org/dist/HTML-Tagset/ URL: http://search.cpan.org/dist/HTML-Tagset/
Source0: http://search.cpan.org/CPAN/authors/id/P/PE/PETDANCE/HTML-Tagset-%{version}.tar.gz Source0: http://search.cpan.org/CPAN/authors/id/P/PE/PETDANCE/HTML-Tagset-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch BuildArch: noarch
BuildRequires: perl(ExtUtils::MakeMaker), perl(Test::Pod) BuildRequires: perl(ExtUtils::MakeMaker)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) BuildRequires: perl(Test::More)
# Test::Pod -> Pod::Simple -> HTML::Entities (HTML::Parser) -> HTML::Tagset
%if 0%{!?perl_bootstrap:1}
BuildRequires: perl(Test::Pod)
%endif
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
%description %description
This module contains several data tables useful in various kinds of This module contains several data tables useful in various kinds of
HTML parsing operations, such as tag and entity names. HTML parsing operations, such as tag and entity names.
%prep %prep
%setup -q -n HTML-Tagset-%{version} %setup -q -n HTML-Tagset-%{version}
%build %build
%{__perl} Makefile.PL INSTALLDIRS=vendor perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
rm -rf $RPM_BUILD_ROOT make pure_install DESTDIR=%{buildroot}
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';' find %{buildroot} -depth -type d -exec rmdir {} ';' 2>/dev/null
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null ';' %{_fixperms} %{buildroot}
chmod -R u+w $RPM_BUILD_ROOT/*
%check %check
make test make test
%clean
rm -rf $RPM_BUILD_ROOT
%files %files
%defattr(-,root,root,-)
%doc Changes README %doc Changes README
%{perl_vendorlib}/HTML/ %{perl_vendorlib}/HTML/
%{_mandir}/man3/HTML::Tagset.3pm* %{_mandir}/man3/HTML::Tagset.3pm*
%changelog %changelog
* Fri Jan 20 2012 Paul Howarth <paul@city-fan.org> - 3.20-10
- Clean up spec file for modern rpmbuild:
- Drop BuildRoot definition
- Drop %%defattr
- Drop %%clean section
- Drop cleaning of buildroot in %%install
- Use DESTDIR rather than PERL_INSTALL_ROOT
- Use %%{_fixperms} macro rather than our own chmod incantation
- Don't use macros for commands
- Break build dependency loop by only using perl(Test::Pod) if we're not
bootstrapping
- BR: perl(Test::More)
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.20-9 * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.20-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
@ -57,7 +64,7 @@ rm -rf $RPM_BUILD_ROOT
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Fri Dec 17 2010 Marcela Maslanova <mmaslano@redhat.com> - 3.20-6 * Fri Dec 17 2010 Marcela Maslanova <mmaslano@redhat.com> - 3.20-6
- 661697 rebuild for fixing problems with vendorach/lib - Rebuild to fix problems with vendorarch/lib (#661697)
* Sun May 02 2010 Marcela Maslanova <mmaslano@redhat.com> - 3.20-5 * Sun May 02 2010 Marcela Maslanova <mmaslano@redhat.com> - 3.20-5
- Mass rebuild with perl-5.12.0 - Mass rebuild with perl-5.12.0