%define __name geanyvc

Summary:       geanyvc is plugin that provides a uniform way of accessing the different version-control systems
Summary(ja):       異なるバージョン制御システムにアクセスする均一的方法を提供する Geany プラグイン
Name:          geany-plugin-vc
Version:       0.5
Release: 6%{?_dist_release}
License:       GPLv2
Group:         Development/Tools
Source:   http://users.cosmostv.by/yurand/geanyvc/geanyvc-%{version}.tar.gz
URL:           http://plugins.geany.org/geanyvc/
BuildRoot:     %{_tmppath}/%{__name}-%{version}-root

Requires:      geany >= 0.16
BuildRequires: geany-devel
BuildRequires: gettext, intltool
BuildRequires: gtk2, gtk2-devel, gtkspell-devel
BuildRequires: perl-XML-Parser

%description
geanyvc is plugin that provides a uniform way of accessing the different
version-control systems inside Geany IDE. 

%description -l ja
geanyvc は Geany IDE で異なるバージョン制御システムにアクセスする
均一的方法を提供するプラグインです。

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

%build
%configure
make %{?_smp_mflags}

%install
%__rm -Rf $RPM_BUILD_ROOT

install -d -m 0755 $RPM_BUILD_ROOT%{_libdir}/geany/
install -d -m 0755 $RPM_BUILD_ROOT%{_datadir}/locale/

./libtool --silent --mode=install /usr/bin/install -c ./geanyvc.la $RPM_BUILD_ROOT%{_libdir}/geany/geanyvc.la
mv ./po/de.gmo ./po/geanyvc_de.mo

install -m 0755 ./po/*.mo $RPM_BUILD_ROOT%{_datadir}/locale/

#remove .la file before packaging 
rm -rf $RPM_BUILD_ROOT%{_libdir}/geany/geanyvc.la

%clean
%__rm -Rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root, -)
%doc COPYING ChangeLog README
%{_libdir}/geany/geanyvc.so
%{_datadir}/locale/*

%changelog
* Wed Aug 19 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.5-6vl5
- rebuilt with geany-0.18

* Sat Jul 18 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.5-5vl5
- added BuildRequires: gtkspell-devel, gettext, intltool, perl-XML-Parser

* Mon May 4 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.5-4vl5
- added document in %files

* Sun May 3 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.5-3vl5
- rebuilt with geany-0.17
- spec in UTF-8
- changed summary(ja) and description(ja) a little

* Wed Apr 08 2009 Shu KONNO <owa@bg.wakwak.com> - 0.5-2vl5
- fixed library path for lib64

* Sat Feb 28 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.5-1vl5
- new upstream release
- changed Requires:      geany >= 0.16

* Mon Feb 16 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.4-3vl5
- fixed %changelog typo

* Mon Feb 16 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.4-2vl5
- rebuilt with geany-0.16

* Thu Feb 12 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.4-1vl5
- initial build for VineSeed
