%define	pkgname	Test-UseAllModules

# Basic Information
Name:		perl-%{pkgname}
Version:	0.17
Release:	1%{?_dist_release}
Summary:	do use_ok() for all the MANIFESTed modules
#Summary(ja):	ここに日本語で概要を記述してください

License:	Artistic or GPL
Group:		Development/Libraries
Source0:	http://search.cpan.org/CPAN/authors/id/I/IS/ISHIGAKI/%{pkgname}-%{version}.tar.gz

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

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	yasumichi


%description
I'm sick of writing 00_load.t (or something like that) that'll do use_ok()
for every module I write. I'm sicker of updating 00_load.t when I add
another file to the distro. This module reads MANIFEST to find modules to be
tested and does use_ok() for each of them. Now all you have to do is update
MANIFEST. You don't have to modify the test any more (hopefully).

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

%prep
%setup -q -n Test-UseAllModules-%{version}

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

%install
rm -rf $RPM_BUILD_ROOT
make pure_install DESTDIR=$RPM_BUILD_ROOT
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

%clean
rm -rf $RPM_BUILD_ROOT

%check
make test


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


%changelog
* Tue Nov 25 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 0.17-1
- updated to 0.17
- built with perl 5.16.3
- installed module to vendor_perl
- added BuildArch: noarch
- added BR

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