%define gtk2_version 2.10.0
%define libgnomeprint_version 2.18.0
%define libxml2_version 2.6.0
%define po_package gtksourceview-1.0

Summary: A library for viewing source files
Summary(ja): ソースファイルを閲覧するためのライブラリ
Name: gtksourceview
Version: 1.8.5
Release: 2%{?_dist_release}
License: LGPL
Group: System Environment/Libraries
URL: http://www.gnome.org/softwaremap/projects/gtksourceview/ 
Source0: %{name}-%{version}.tar.bz2
Patch0: use-gnu.patch

BuildRoot: %{_tmppath}/%{name}-%{version}-root
BuildRequires: libgnomeprint-devel >= %{libgnomeprint_version}
BuildRequires: gnome-vfs2-devel
BuildRequires: libxml2-devel >= %{libxml2_version}
BuildRequires: gtk2-devel >= %{gtk2_version}

%description
A library for viewing source code files with.

%description -l ja
gtksourceview はソースコードファイルを閲覧するためのライブラリです。

%package devel
Summary: Files to compile applications that use gtksourceview
Summary(ja): gtksourceview を使うアプリケーションの開発に必要なファイル集
Group: Development/Libraries
Requires: %name = %{version}
Requires: gtk2-devel >= %{gtk2_version}
Requires: libgnomeprint-devel >= %{libgnomeprint_version}
Requires: libxml2-devel >= %{libxml2_version}

%description devel
gtksourceview-devel contains the files required to compile applications against the gtksourceview libraries.

%prep
%setup -q
%patch0 -p1 -b .use-gnu

%build
%configure --disable-static

make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
%makeinstall

#remove unwanted packages
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la

%find_lang %{po_package}

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files -f %{po_package}.lang
%defattr(-,root,root,-)
%doc
%{_datadir}/gtksourceview-1.0
%{_libdir}/*.so.*

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

%changelog
* Wed Jun 24 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.8.5-2
- spec in UTF-8
- added Patch0 from Fedora

* Sun Jun 22 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.8.5-1
- apllied new versioning policy
- added BuildRequires: libgnomeprint-devel

* Sat Apr 28 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 1.8.5-0vl1
- new upstream release

* Tue Sep 26 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.2-0vl1
- new upstream release
- add Requires: libxml2, libgnomeprint to -devel ([VineSeed:11724])

* Sat Jun 03 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.1-0vl1
- new upstream release

* Mon Mar 13 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.6.0-0vl1
- new upstream release

* Tue Mar 07 2006 Daisuke SUZUKI <daisuke@linux.or.jp> 1.5.7-0vl1
- new upstream release

* Sat Oct 08 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.2-0vl1
- new upstream release

* Mon Sep 19 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1.4.1-0vl1
- new upstream release

* Mon Mar 21 2005 Daisuke SUZUKI <daisuke@linux.or.jp> 1.2.0-0vl1
- new upstream version

* Tue Nov 09 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 1.1.1-0vl1
- new upstream release

* Fri Oct 17 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.7.0-0vl1
- new upstream release

* Wed Sep 03 2003 Daisuke SUZUKI <daisuke@linux.or.jp> 0.6-0vl1
- build for Vine Linux
- add Japanese summary and descriptions

* Tue Aug 26 2003 Jonathan Blandford <jrb@redhat.com>
- new version

* Mon Aug 25 2003 Jonathan Blandford <jrb@redhat.com>
- try removing the libtool line

* Fri Aug 22 2003 Jonathan Blandford <jrb@redhat.com>
- Libtool fix

* Fri Aug 15 2003 Jonathan Blandford <jrb@redhat.com> 
- Initial build.


