%define real_name Net-CLI-Interact

Summary:        Toolkit for CLI Automation
Name:           perl-%{real_name}
Version:        1.122530
Release:        1%{?_dist_release}
License:        GPL+ or Artistic
Group:          Development/Libraries
URL:            http://search.cpan.org/dist/%{real_name}

Source0:        http://search.cpan.org/CPAN/authors/id/O/OL/OLIVER/%{real_name}-%{version}.tar.gz

BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root

BuildRequires:  perl(Class::MOP)
BuildRequires:  perl(Class::MOP::Class)
BuildRequires:  perl(File::Basename)
BuildRequires:  perl(FileHandle)
BuildRequires:  perl(IPC::Run)
BuildRequires:  perl(List::Util)
BuildRequires:  perl(Log::Dispatch::Config)
BuildRequires:  perl(Log::Dispatch::Configurator::Any)
BuildRequires:  perl(Moose)
BuildRequires:  perl(Moose::Role)
BuildRequires:  perl(Moose::Util::TypeConstraints)
BuildRequires:  perl(Net::Telnet)
BuildRequires:  perl(POSIX)
BuildRequires:  perl(Path::Class)
BuildRequires:  perl(Time::HiRes)
Requires:       perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))

Vendor:         Project Vine
Distribution:   Vine Linux
Packager:       shaolin

%description
This module exists to support developers of applications
and libraries which must interact with a command line interface.

%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/*
%{perl_vendorlib}/*

%changelog
* Wed Dec 24 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> - 1.122530-1
- updated to 1.122530
- built with perl 5.16.3

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