Spec file clean-up

- Nobody else likes macros for commands
- Use %{?perl_default_filter} rather than our own dep filter implementation
- Use %{_fixperms} macro rather than our own chmod incantation
- Use DESTDIR rather than PERL_INSTALL_ROOT
- BR: perl(Carp)
epel9
Paul Howarth 13 years ago
parent c421f05eb7
commit 686704c13b

@ -1,55 +1,54 @@
Summary: Simple date object for perl
Name: perl-Date-Simple
Version: 3.03
Release: 9%{?dist}
Release: 10%{?dist}
License: GPL+ or Artistic
Group: Development/Libraries
Url: http://search.cpan.org/dist/Date-Simple/
Source0: http://search.cpan.org/CPAN/authors/id/I/IZ/IZUT/Date-Simple-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
BuildRequires: perl(ExtUtils::MakeMaker), perl(Test::More)
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildRequires: perl(Carp)
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Test::More)
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
# Don't "provide" private Perl libs
%global _use_internal_dependency_generator 0
%global __deploop() while read FILE; do /usr/lib/rpm/rpmdeps -%{1} ${FILE}; done | /bin/sort -u
%global __find_provides /bin/sh -c "%{__grep} -v '%{perl_vendorarch}/.*\\.so$' | %{__deploop P}"
%global __find_requires /bin/sh -c "%{__deploop R}"
%{?perl_default_filter}
%description
%{summary}.
Simple date object for perl.
%prep
%setup -q -n Date-Simple-%{version}
# Spurious exec permissions in files from tarball
/usr/bin/find lib -type f -exec %{__chmod} -x {} ';'
%{__chmod} -x ChangeLog COPYING README Simple.xs
find lib -type f -exec chmod -c -x {} ';'
chmod -c -x ChangeLog COPYING README Simple.xs
# The NoXS.pm file provides a pure-perl alternative to the C implementation
# of the module. This results in duplicate "Provides:" entries, which rpmlint
# whinges about. This kludge removes the redundant file, which has the added
# benefit of shutting up rpmlint.
%{__rm} -f lib/Date/Simple/NoXS.pm
%{__sed} -i -e '/^lib\/Date\/Simple\/NoXS\.pm$/d' MANIFEST
rm -f lib/Date/Simple/NoXS.pm
sed -i -e '/^lib\/Date\/Simple\/NoXS\.pm$/d' MANIFEST
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
%{__make} %{?_smp_mflags}
%clean
%{__rm} -rf %{buildroot}
perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
make %{?_smp_mflags}
%install
%{__rm} -rf %{buildroot}
%{__make} pure_install PERL_INSTALL_ROOT=%{buildroot}
/usr/bin/find %{buildroot} -type f -name .packlist -exec %{__rm} -f {} ';'
/usr/bin/find %{buildroot} -type f -name '*.bs' -a -size 0 -exec %{__rm} -f {} ';'
/usr/bin/find %{buildroot} -depth -type d -exec /bin/rmdir {} ';' 2>/dev/null
%{__chmod} -R u+w %{buildroot}
rm -rf %{buildroot}
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
find %{buildroot} -type f -name '*.bs' -a -size 0 -exec rm -f {} ';'
find %{buildroot} -depth -type d -exec rmdir {} ';' 2>/dev/null
%{_fixperms} %{buildroot}
%check
%{__make} test
make test
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
@ -59,14 +58,22 @@ BuildRequires: perl(ExtUtils::MakeMaker), perl(Test::More)
%{_mandir}/man3/Date::Simple*.3pm*
%changelog
* Fri Jun 17 2011 Marcela Mašláňová <mmaslano@redhat.com> - 3.03-9
* Wed Jan 11 2012 Paul Howarth <paul@city-fan.org> 3.03-10
- Spec file clean-up:
- Nobody else likes macros for commands
- Use %%{?perl_default_filter} rather than our own dep filter implementation
- Use %%{_fixperms} macro rather than our own chmod incantation
- Use DESTDIR rather than PERL_INSTALL_ROOT
- BR: perl(Carp)
* Fri Jun 17 2011 Marcela Mašláňová <mmaslano@redhat.com> 3.03-9
- Perl mass rebuild
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.03-8
* Tue Feb 8 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> 3.03-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Thu Dec 16 2010 Marcela Maslanova <mmaslano@redhat.com> - 3.03-7
- 661697 rebuild for fixing problems with vendorach/lib
* Thu Dec 16 2010 Marcela Maslanova <mmaslano@redhat.com> 3.03-7
- Rebuild to fix problems with vendorarch/lib (#661697)
* Fri Apr 30 2010 Marcela Maslanova <mmaslano@redhat.com> 3.03-6
- Mass rebuild with perl 5.12.0

Loading…
Cancel
Save