%define real_name Log-Dispatch-Configurator-Any

Summary:        Perl module that implements Log4j
Name:           perl-%{real_name}
Version:        1.122640
Release:        1%{?_dist_release}
License:        GPL+ or Artistic
Group:          Development/Libraries
URL:            http://search.cpan.org/dist/Log-Dispatch-Config/

Source0:        http://search.cpan.org/CPAN/authors/id/M/MI/MIYAGAWA/%{real_name}-%{version}.tar.gz

BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root
BuildArch:      noarch
BuildRequires:  perl(AppConfig) >= 1.52
BuildRequires:  perl(Config::Any) 
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(File::Temp) >= 0.12
BuildRequires:  perl(IO::Scalar)
BuildRequires:  perl(Log::Dispatch) >= 2
BuildRequires:  perl(Log::Dispatch::Config)
BuildRequires:  perl(Test::More) >= 0.32
Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires:       perl(AppConfig) >= 1.52
Requires:       perl(File::Temp) >= 0.12
Requires:       perl(IO::Scalar)
Requires:       perl(Log::Dispatch) >= 2
Requires:       perl(Test::More) >= 0.32

Vendor:         Project Vine
Distribution:   Vine Linux
Packager:       shaolin

%description
Log-Dispatch-Config is a Perl module that implements Log4j.

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

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

%install
rm -rf %{buildroot}
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
find %{buildroot} -depth -type d -exec rmdir {} ';' 2>/dev/null
%{_fixperms} %{buildroot}

%clean 
rm -rf %{buildroot}

%check
make test

%files
%defattr(-, root, root, 0755)
%doc Changes MANIFEST META.yml README
%doc %{_mandir}/man3/*
%dir %{perl_vendorlib}/Log/Dispatch/Configurator
%{perl_vendorlib}/Log/Dispatch/Configurator/*.pm

%changelog
* Sun Dec  7 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 1.122640-1
- new upstream release
- built with perl 5.16.3

* Fri Mar 09 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 1.110690-1
- initial build for Vine Linux
