%define	pkgname	Module-Find

# Basic Information
Name:		perl-%{pkgname}
Version:	0.12
Release:	1%{?_dist_release}
Summary:	Find and use installed modules in a (sub)category
Summary(ja):	(サブ)カテゴリー内にインストールされたモジュールを見つけて利用する

License:	Artistic or GPL
Group:		Development/Libraries
URL:            http://search.cpan.org/~crenz/Module-Find/

Source0:	http://search.cpan.org/CPAN/authors/id/C/CR/CRENZ/%{pkgname}-%{version}.tar.gz

BuildRoot:	%{_tmppath}/%{name}-%{version}-root
BuildArch:      noarch
BuildRequires:  perl(ExtUtils::MakeMaker)
# Dependency
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	yasumichi


%description
Module::Find lets you find and use modules in categories. This can be very
useful for auto-detecting driver or plugin modules. You can differentiate
between looking in the category itself or in all subcategories.

If you want Module::Find to search in a certain directory on your harddisk
(such as the plugins directory of your software installation), make sure you
modify @INC before you call the Module::Find functions.

#%%description -l ja
#ここに日本語で詳細を記述してください。

%prep
%setup -q -n Module-Find-%{version}

%build
perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}

%install
%{__rm} -rf $RPM_BUILD_ROOT
make pure_install DESTDIR=%{buildroot}

find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} ';' 2>/dev/null
%{_fixperms} $RPM_BUILD_ROOT

#%{__rm} ${RPM_BUILD_ROOT}%{perl_archlib}/perllocal.pod
#%{__rm} ${RPM_BUILD_ROOT}%{perl_sitearch}/auto/Module/Find/.packlist

%check
make test

%clean
%{__rm} -rf $RPM_BUILD_ROOT


%files 
%defattr(-,root,root)
%doc Changes README
%{perl_vendorlib}/Module
%{_mandir}/man3/*


%changelog
* Wed Nov 19 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 0.12-1
- updated to 0.12
- built with perl 5.16.3
- installed module to vendor_perl
- added URL tag

* Mon Oct 10 2011 Yasumichi Akahoshi <yasumichi@vinelinux.org> 0.10-1
- initial build for Vine Linux