Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 680a4471670db75523fdd2ed2c927328 > files > 1

perl-smartmatch-0.03-1.fc14.src.rpm

# This file is licensed under the terms of GNU GPLv2+
Name:           perl-smartmatch
Version:        0.03
Release:        1%{?dist}
Summary:        Pluggable smart matching back-ends
License:        GPL+ or Artistic
Group:          Development/Libraries
URL:            http://search.cpan.org/dist/smartmatch/
Source0:        http://search.cpan.org/CPAN/authors/id/D/DO/DOY/smartmatch-%{version}-TRIAL.tar.gz
BuildRequires:  perl(B::Hooks::OP::Check) >= 0.14
BuildRequires:  perl(ExtUtils::Depends)
BuildRequires:  perl(ExtUtils::MakeMaker)
# Tests:
BuildRequires:  perl(File::Find)
BuildRequires:  perl(File::Temp)
BuildRequires:  perl(parent)
BuildRequires:  perl(Test::More) >= 0.88
# Optional tests:
BuildRequires:  perl(Test::Script) >= 1.05
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires:       perl(B::Hooks::OP::Check) >= 0.14

%{?perl_default_filter}
# Remove underspecified dependencies
%{?filter_setup:
%filter_from_requires /^perl(B::Hooks::OP::Check)$/d
%filter_setup}

%description
This module allows you to override the behavior of the smart match operator
("~~"). "use smartmatch $matcher" hooks into the compiler to replace the
smartmatch opcode with a call to a custom subroutine, specified either as
a coderef or as a string, which will have "smartmatch::engine::" prepended to
it and used as the name of a package in which to find a subroutine named
"match".  The subroutine will be called with two arguments, the values on the
left and right sides of the smart match operator, and should return the
result.

%prep
%setup -q -n smartmatch-%{version}

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS"
make %{?_smp_mflags}

%install
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -exec rm -f {} \;
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
%{_fixperms} $RPM_BUILD_ROOT/*

%check
make test

%files
%doc Changes LICENSE README
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/smartmatch*
%{_mandir}/man3/*

%changelog
* Mon Jul 11 2011 Petr Pisar <ppisar@redhat.com> 0.03-1
- Initial version