Modernize spec file

This commit is contained in:
Petr Písař 2012-10-24 10:04:45 +02:00
parent 23915a3dd2
commit c0ce4d9730

View File

@ -1,63 +1,53 @@
Name: perl-Object-Deadly
Version: 0.09
Release: 13%{?dist}
Release: 14%{?dist}
Summary: Perl module providing an object that dies whenever examined
Group: Development/Libraries
License: GPL+ or Artistic
URL: http://search.cpan.org/dist/Object-Deadly/
Source0: http://search.cpan.org/CPAN/authors/id/J/JJ/JJORE/Object-Deadly-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Test::Exception)
# Run-time:
BuildRequires: perl(Carp::Clan) >= 5.4
BuildRequires: perl(Devel::StackTrace)
BuildRequires: perl(Devel::Symdump)
BuildRequires: perl(Carp::Clan)
BuildRequires: perl(Scalar::Util)
# Tests:
BuildRequires: perl(Test::Exception)
BuildRequires: perl(Test::More)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description
Object::Deadly is meant to be used in testing. All possible
overloading and method calls die. You can pass this object into
methods which are not supposed to accidentally trigger any potentially
overloading.
%prep
%setup -q -n Object-Deadly-%{version}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
make pure_install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null ';'
chmod -R u+w $RPM_BUILD_ROOT/*
%check
make test
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
%doc Changes README
%{perl_vendorlib}/*
%{_mandir}/man3/*.3*
%changelog
* Wed Oct 24 2012 Petr Pisar <ppisar@redhat.com> - 0.09-14
- Modernize spec file
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.09-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild