%define glib2_version 2.34.0
%define gtk3_version 3.6.0

%define po_package gtksourceview-3.0

Summary: A library for viewing source files
Summary(ja): ソースコードなどを表示するためのライブラリ
Name: gtksourceview3
Version: 3.6.1
Release: 1%{?_dist_release}
License: LGPLv2+ and GPLv2+
# the library itself is LGPL, some .lang files are GPL
Group: System Environment/Libraries
URL: http://gtksourceview.sourceforge.net/ 
Source0: http://download.gnome.org/sources/gtksourceview/3.6/gtksourceview-%{version}.tar.xz
BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: glib2-devel >= %{glib2_version}
BuildRequires: gtk3-devel >= %{gtk3_version}
BuildRequires: libxml2-devel
BuildRequires: intltool >= 0.35
BuildRequires: gettext 

Vendor: Project Vine
Distribution: Vine Linux
Packager: Takemikaduchi

%description
GtkSourceView is a text widget that extends the standard GTK+
GtkTextView widget. It improves GtkTextView by implementing 
syntax highlighting and other features typical of a source code editor.

This package contains version 2 of GtkSourceView. The older version
1 is contains in the gtksourceview package.

%package devel
Summary: Files to compile applications that use gtksourceview2
Summary(ja): gtksourceview2 を使用するアプリケーションのコンパイルに必要なファイル
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: gtk3-devel >= %{gtk3_version} 
Requires: libxml2-devel
Requires: pkgconfig

%description devel
gtksourceview2-devel contains the files required to compile 
applications which use GtkSourceView 2.x.

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

%build

%configure --disable-gtk-doc --disable-static

make %{?_smp_mflags}

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

# remove unwanted files
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_datadir}/gtksourceview-3.0/language-specs/check.sh
rm -f $RPM_BUILD_ROOT%{_datadir}/gtksourceview-3.0/language-specs/convert.py

%find_lang %{po_package}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %{po_package}.lang
%defattr(-,root,root,-)
%doc README AUTHORS COPYING NEWS MAINTAINERS 
%{_libdir}/*.so.*
%{_libdir}/girepository-1.0/*.typelib
%{_datadir}/gtksourceview-3.0

%files devel
%defattr(-,root,root,-)
%{_includedir}/gtksourceview-3.0
%{_libdir}/pkgconfig/*.pc
%{_libdir}/*.so
%{_datadir}/gir-1.0/*.gir
%{_datadir}/gtk-doc

%changelog
* Tue Nov 06 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.1-1
- new upstream release

* Sat Sep 29 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.6.0-1
- new upstream release

* Sun May 20 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.2-1
- new upstream release

* Sun Apr 22 2012 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.4.1-1
- new upstream release

* Sun Nov 20 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.3-1
- new upstream release

* Sat Oct 22 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.2-1
- new upstream release

* Thu Sep 29 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.2.0-1
- new upstream release

* Fri Sep 23 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.6-1
- new upstream release

* Mon Aug 15 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 3.1.3-1
- initial build for Vine Linux

