%define libname Math-Calc-Units Name: perl-%{libname} Version: 1.06 Release: 3%{?dist} Summary: Human-readable unit-aware calculator License: GPLv2+ or Artistic Group: Development/Libraries URL: http://search.cpan.org/dist/%{libname}/ Source0: http://search.cpan.org/CPAN/authors/id/S/SF/SFINK/%{libname}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(Test::More) Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) %description Math::Calc::Units is a simple calculator that keeps track of units. It currently handles combinations of byte sizes and duration only, although adding any other multiplicative types is easy. Any unknown type is treated as a unique user type (with some effort to map English plurals to their singular forms). %prep %setup -q -n %{libname}-%{version} # filter unwanted Provides cat << \EOF > %{name}-prov #!/bin/sh %{__perl_provides} $* |\ sed -e '/perl(Parse::Yapp::Driver)/d' EOF %global __perl_provides %{_builddir}/%{libname}-%{version}/%{name}-prov chmod +x %{__perl_provides} %build %{__perl} Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install rm -rf %{buildroot} make pure_install PERL_INSTALL_ROOT=%{buildroot} find %{buildroot} -type f -name .packlist -exec rm -f {} \; find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \; rm -vf %{buildroot}%{perl_vendorlib}/Math/Calc/Units/Grammar.y %{_fixperms} %{buildroot}/* %check make test %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc Artistic.html Changes COPYING LICENSE README %{perl_vendorlib}/* %{_mandir}/man3/* %{_bindir}/ucalc %changelog * Mon Dec 7 2009 Stepan Kasal - 1.06-3 - rebuild against perl 5.10.1 * Wed Jul 29 2009 Ruben Kerkhof 1.06-2 - Review fixes (#513874) * Sun Jul 26 2009 Ruben Kerkhof - 1.06-1 - Initial import