%define __name geanylatex

Summary:       GeanyLaTeX is a plugin to improve support of LaTeX at Geany
Summary(ja):       Geany で LaTeX のサポートを改善するためのプラグイン
Name:          geany-plugin-latex
Version:       0.4
Release: 2%{?_dist_release}
License:       GPLv2
Group:         Development/Tools
Source:   http://frank.uvena.de/files/geany/%{__name}-%{version}.tar.gz
URL:           http://frank.uvena.de/en/Geany/%{__name}/
BuildRoot:     %{_tmppath}/%{__name}-%{version}-root
Requires:      geany >= 0.16
BuildRequires: geany-devel
BuildRequires: gtk2, gtk2-devel

%description
GeanyLaTeX is a little plugin to improve support of LaTeX at Geany.

%description -l ja
GeanyLaTeX は Geany で LaTeX のサポートを改善するための小さなプラグインです。

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

%build
%configure CC=c99 CFLAGS=-g
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 ./src/geanylatex.la \
	$RPM_BUILD_ROOT%{_libdir}/geany/geanylatex.la
mv ./po/de.gmo ./po/geanylatex_de.mo

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

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

%clean
%__rm -Rf $RPM_BUILD_ROOT

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

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

* Fri Jun 5 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.4-1vl5
- new upstream release

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

* Sun May 3 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.3-5vl5
- rebuilt with geany-0.17
- spec in UTF-8

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

* Sun Mar 15 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.3-3vl5
- fixed %changelog (fixed in Mar 13 2009 changelog)
- modified Summary(ja)

* Fri Mar 13 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.3-2vl5
- modified %configure option

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

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

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

* Wed Feb 11 2009 Toshiharu Kudoh <toshi.kd2@gmail.com> - 0.2-1vl5
- initial build for VineSeed
