%global perl_bootstrap 1

Name:		perl-File-Find-Rule-Perl
Version:	1.15
Release:	1%{?_dist_release}
Summary:	Common rules for searching for Perl things
License:	GPL+ or Artistic
Group:		Development/Libraries
URL:		http://search.cpan.org/dist/File-Find-Rule-Perl/
Source0:	http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/File-Find-Rule-Perl-%{version}.tar.gz

BuildArch:	noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires:	perl(File::Find::Rule)
BuildRequires:	perl(File::Spec)
BuildRequires:	perl(Test::More)
BuildRequires:  perl(Params::Util)
BuildRequires:  perl(Parse::CPAN::Meta)

# For improved tests
%if !%{defined perl_bootstrap}
BuildRequires:  perl(Perl::MinimumVersion)
BuildRequires:  perl(Test::MinimumVersion)
BuildRequires:  perl(Test::Pod)
BuildRequires:  perl(Test::CPAN::Meta)
%endif
Requires:	perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

Vendor:         Project Vine
Distribution:   Vine Linux
Packager:       shaolin

%description
Common rules for searching for Perl things.

%prep
%setup -q -T -c
%setup -q -T -D -a0

%build
cd File-Find-Rule-Perl-%{version}
%{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}
cd ..

%install
rm -rf ${RPM_BUILD_ROOT}
cd File-Find-Rule-Perl-%{version}
make pure_install PERL_INSTALL_ROOT=${RPM_BUILD_ROOT}
cd ..
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}/*

%clean
rm -rf ${RPM_BUILD_ROOT}

%check
%if !%{defined perl_bootstrap}
cd File-Find-Rule-Perl-%{version}
make test AUTOMATED_TESTING=1
cd ..
%endif

%files
%defattr(-,root,root,-)
%license File-Find-Rule-Perl-%{version}/LICENSE
%doc File-Find-Rule-Perl-%{version}/Changes
%{perl_vendorlib}/File
%{_mandir}/man3/*

%changelog
* Sat May 18 2019 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.15-1
- new upstream release.
- rebuilt with perl-5.26.

* Wed Nov  5 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 1.13-1
- updated to 1.13
- built with perl 5.16.3

* Thu Mar 01 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.12-2
- rebuild

* Fri Feb 24 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.12-1
- initial build for Vine Linux
- define perl_boostrap until things get done...

* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Fri Nov 25 2011 Ralf Corsépius <corsepiu@fedoraproject.org> - 1.12-1
- Upstream update.
- Update BRs.
- Spec file cleanup.

* Tue Jun 28 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1.10-3
- rebuild with Perl 5.14.1
- add perl_bootstrap macro for test BR

* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Nov 03 2010 Ralf Corsépius <corsepiu@fedoraproject.org> - 1.10-1
- Upstream update.

* Sun May 09 2010 Ralf Corsépius <corsepiu@fedoraproject.org> - 1.09-5
- Re-enable pmv-test.

* Sat May 01 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.09-4
- Mass rebuild with perl-5.12.0

* Fri Apr 30 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.09-3
- Mass rebuild with perl-5.12.0

* Mon Dec  7 2009 Stepan Kasal <skasal@redhat.com> - 1.09-2
- rebuild against perl 5.10.1

* Fri Aug 07 2009 Ralf Corsépius <corsepiu@fedoraproject.org> - 1.09-1
- Upstream update.

* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.08-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Mon Jul 20 2009 Ralf Corsépius <corsepiu@fedoraproject.org> - 1.08-1
- Upstream update.

* Wed Jun 17 2009 Ralf Corsépius <corsepiu@fedoraproject.org> - 1.06-1
- Upstream update.
- Build in subdir to work-around rpm disturbing testsuite.
- Rework BRs.

* Fri Feb 27 2009 Ralf Corsépius <corsepiu@fedoraproject.org> - 1.04-4
- Adjust minimum perl version in META.yml (Add File-Find-Rule-Perl-1.04.diff).

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.04-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Tue Jun 24 2008 Ralf Corsépius <rc040203@freenet.de> - 1.04-2
- Unconditionally BR: perl(Test::CPAN::Meta).

* Tue Jun 10 2008 Ralf Corsépius <rc040203@freenet.de> - 1.04-1
- Upstream update.

* Wed Feb 27 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.03-3
- Rebuild for perl 5.10 (again)

* Fri Jan 11 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.03-2
- rebuild for new perl

* Mon Nov 19 2007 Ralf Corsépius <rc040203@freenet.de> - 0.03-1
- Initial version.
