%define ver 0.996
%define rel 2

Summary: MeCab perl module
Summary(ja): MeCab のための Perl モジュール
Name: mecab-perl
Version: %{ver}
Release: %{rel}%{_dist_release}
License: GPL/LGPL/BSD
Group: Development/Libraries
URL: http://mecab.googlecode.com/svn/trunk/mecab/doc/index.html
Source0: http://mecab.googlecode.com/files/%{name}-%{version}.tar.gz

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: mecab-devel
BuildRequires: mecab-ipadic
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Provides: perl-MeCab

Vendor: Project Vine
Distribution: Vine Linux
Packager: iwaim

%description
MeCab perl module

%prep
%setup -q

%build
CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL INSTALLDIRS="vendor"

%install
%__rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

find $RPM_BUILD_ROOT -type f -a \( -name perllocal.pod -o -name .packlist \
  -o \( -name '*.bs' -a -empty \) \) -exec rm -f {} ';'

%check
perl test.pl

%clean
%__rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc README bindings.html test.pl AUTHORS COPYING BSD GPL LGPL 
%{perl_vendorarch}/MeCab.pm
%dir %{perl_vendorarch}/auto/MeCab
%{perl_vendorarch}/auto/MeCab/MeCab.so

%changelog
* Mon Nov 10 2014 Ryoichi INAGAKI <ryo1@toki.waseda.jp> 0.996-2
- rebuilt with perl 5.16.3

* Tue Dec 31 2013 IWAI, Masaharu <iwaim.sub@gmail.com> 0.996-1
- update to 0.996

* Mon Jan 21 2013 IWAI, Masaharu <iwai@alib.jp> 0.994-1
- initial build for Vine Linux

