%define	pkgname	Log-Dump

# Basic Information
Name:		perl-%{pkgname}
Version:	0.14
Release:	1%{?_dist_release}
Summary:	simple logger mainly for debugging
Summary(ja):	主にデバッグのための簡単なロガー

License:	Artistic or GPL
Group:		Development/Libraries
URL:            http://search.cpan.org/dist/Log-Dump/

Source0:	http://search.cpan.org/CPAN/authors/id/I/IS/ISHIGAKI/%{pkgname}-%{version}.tar.gz

BuildRoot:	%{_tmppath}/%{name}-%{version}-root
BuildArch:      noarch
# Dependency
BuildRequires:	perl(ExtUtils::MakeMaker::CPANfile) >= 0.06
BuildRequires:	perl(IO::Capture)
BuildRequires:	perl(Test::More) >= 0.98
BuildRequires:	perl(Test::UseAllModules) >= 0.09

Requires:	perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

Vendor:		Project Vine
Distribution:	Vine Linux
Packager:	yasumichi


%description
Log::Dump is a simple logger mix-in mainly for debugging. This installs five
methods into a caller (the class that used Log::Dump) via Sub::Install. The
point is you don't need to load extra dumper modules or you don't need to
concatenate messages. Just log things and they will be dumped (and
concatenated if necessary) to stderr, and to a file if you prefer. Also, you
can use these logging methods as class methods or object methods (though
usually you don't want to mix them, especially when you're doing something
special).

#%%description -l ja

%prep
%setup -q -n Log-Dump-%{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


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

%changelog
* Sun Dec  7 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 0.14-1
- updated to 0.14
- moved to noarch
- added BuildRequires: perl(ExtUtils::MakeMaker::CPANfile), perl(IO::Capture), perl(Test::More) and perl(Test::UseAllModules)

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