Files
perl-Data-Alias/perl-Data-Alias.spec

59 lines
1.6 KiB
RPMSpec

# vim: set sw=4 ts=4 et nu:
# norootforbuild
Name: perl-Data-Alias
Version: 1.07
Release: 0
Summary: Comprehensive set of aliasing operations
Source: http://search.cpan.org/CPAN/authors/id/X/XM/XMATH/Data-Alias-%{version}.tar.gz
# see https://rt.cpan.org/Public/Bug/Display.html?id=57410
Patch1: perl-Data-Alias-fix_for_perl_5_12.patch
URL: http://search.cpan.org/dist/Data-Alias/
Group: Development/Libraries/Perl
License: Perl License
BuildRoot: %{_tmppath}/build-%{name}-%{version}
Requires: perl = %{perl_version}
BuildRequires: make perl gcc glibc-devel
%define is_perl_5_12 %(perl -MConfig -e 'print $Config{api_revision} >= 5 && $Config{api_revision} < 6 && $Config{api_version} >= 12 ? "1":"0"')
%description
Aliasing is the phenomenon where two different expressions actually refer to
the same thing. Modifying one will modify the other, and if you take a
reference to both, the two values are the same.
%prep
%setup -q -n "Data-Alias-%{version}"
%__sed -i '/^auto_install/d' Makefile.PL
# only apply patch with Perl >= 5.12 and < 6 (presumably)
%if %is_perl_5_12
%patch1
%endif
%build
%__perl Makefile.PL PREFIX="%{_prefix}"
%__make %{?jobs:-j%{jobs}}
%install
%perl_make_install
%perl_process_packlist
%if !%is_perl_5_12
%check
%__make test
%endif
%clean
%{?buildroot:%__rm -rf "%{buildroot}"}
%files
%defattr(-,root,root)
%doc Changes README
%dir %{perl_vendorarch}/auto/Data
%{perl_vendorarch}/auto/Data/Alias
%dir %{perl_vendorarch}/Data
%{perl_vendorarch}/Data/Alias.pm
%doc %{perl_man3dir}/Data::Alias.%{perl_man3ext}%{ext_man}
/var/adm/perl-modules/%{name}