- rework spec to use macros

- we now require perl(Readonly::XS)
This commit is contained in:
Chris Weyl 2006-10-05 01:26:20 +00:00
parent ed003ff43b
commit febbffad93

View File

@ -1,6 +1,6 @@
Name: perl-Readonly
Version: 1.03
Release: 5%{?dist}
Release: 6%{?dist}
Summary: Facility for creating read-only scalars, arrays, hashes
Group: Development/Libraries
@ -8,8 +8,12 @@ License: GPL or Artistic
URL: http://search.cpan.org/dist/Readonly/
Source0: http://search.cpan.org/CPAN/authors/id/R/RO/ROODE/Readonly-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
# perl-Readonly-XS builds for all current fedora architectures, so let's
# require it.
Requires: perl(Readonly::XS)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
%description
@ -34,20 +38,24 @@ make %{?_smp_mflags}
%install
rm -rf $RPM_BUILD_ROOT
make pure_install DESTDIR=$RPM_BUILD_ROOT
mv $RPM_BUILD_ROOT%{perl_vendorlib}/benchmark.pl .
rm -rf %{buildroot}
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
find %{buildroot} -type d -depth -exec rmdir {} 2>/dev/null ';'
%{_fixperms} %{buildroot}/*
# make sure this goes where it should to be...
mv %{buildroot}%{perl_vendorlib}/benchmark.pl .
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
make test
%clean
rm -rf $RPM_BUILD_ROOT
rm -rf %{buildroot}
%files
@ -58,6 +66,12 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Wed Oct 04 2006 Chris Weyl <cweyl@alumni.drew.edu> 1.03-6
- add explict requires on perl(Readonly::XS). perl(Readonly::XS) is available
for all architectures fedora supports, so there's no good reason to not
require it.
- spec file rework
* Tue Sep 19 2006 Chris Weyl <cweyl@alumni.drew.edu> 1.03-5
- bump for mass rebuild