Modernize spec file

This commit is contained in:
Petr Písař 2012-11-02 16:54:24 +01:00
parent 6ce0683715
commit a0d7ee5539

View File

@ -2,7 +2,6 @@ Name: perl-Sys-CPU
Version: 0.52 Version: 0.52
Release: 1%{?dist} Release: 1%{?dist}
Summary: Getting CPU information Summary: Getting CPU information
Group: Development/Libraries Group: Development/Libraries
# Some code was copied from Unix::Processors, which is LGPLv3 or Artistic 2.0 # Some code was copied from Unix::Processors, which is LGPLv3 or Artistic 2.0
# The rest of the code is under the standard Perl license (GPL+ or Artistic). # The rest of the code is under the standard Perl license (GPL+ or Artistic).
@ -10,8 +9,6 @@ Group: Development/Libraries
License: (GPL+ or Artistic) and (LGPLv3 or Artistic 2.0) License: (GPL+ or Artistic) and (LGPLv3 or Artistic 2.0)
URL: http://search.cpan.org/~mkoderer/Sys-CPU/ URL: http://search.cpan.org/~mkoderer/Sys-CPU/
Source0: http://search.cpan.org/CPAN/authors/id/M/MK/MKODERER/Sys-CPU-%{version}.tar.gz Source0: http://search.cpan.org/CPAN/authors/id/M/MK/MKODERER/Sys-CPU-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: perl(ExtUtils::MakeMaker)
# Run-time: # Run-time:
BuildRequires: perl(DynaLoader) BuildRequires: perl(DynaLoader)
BuildRequires: perl(Exporter) BuildRequires: perl(Exporter)
@ -25,35 +22,22 @@ Currently only number of CPU's supported.
%prep %prep
%setup -q -n Sys-CPU-%{version} %setup -q -n Sys-CPU-%{version}
sed -i 's/\r//' Changes README
%{__sed} -i 's/\r//' README
%{__sed} -i 's/\r//' Changes
%build %build
%{__perl} Makefile.PL INSTALLDIRS=vendor %{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags} make %{?_smp_mflags}
%check %check
%{__make} test TEST_VERBOSE=1 make test TEST_VERBOSE=1
%install %install
%{__rm} -rf %{buildroot} make pure_install DESTDIR=%{buildroot}
%{__make} pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} ';' find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'
find %{buildroot} -type f -name CPU.bs -exec rm -f {} ';' find %{buildroot} -type f -name CPU.bs -exec rm -f {} ';'
%{_fixperms} %{buildroot}/* %{_fixperms} %{buildroot}/*
%clean
%{__rm} -rf %{buildroot}
%files %files
%defattr(-,root,root,-)
%doc Changes README %doc Changes README
%{perl_vendorarch}/auto/* %{perl_vendorarch}/auto/*
%{perl_vendorarch}/Sys/* %{perl_vendorarch}/Sys/*