%define with_python	0

%define _tomoe_ver	0.6.0

Summary:	A class library for tomoe's GUI parts
Summary(ja):	tomoe の GUI パーツのクラスライブラリ
Name:		tomoe-gtk
Version:	0.6.0
Release:	2%{?_dist_release}
Group:		System Environment/Libraries
License:	LGPL
URL:		http://tomoe.sourceforge.jp/
Source0:	tomoe-gtk-%{version}.tar.gz
BuildRoot:	%{_tmppath}/%{name}-%{version}-root
BuildRequires:	tomoe-devel >= %{_tomoe_ver}
BuildRequires:	gtk2-devel >= 2.4.0, gtk-doc >= 1.4
# does not currently build with gucharmap-2
#BuildRequires:  gucharmap-devel
Requires:	tomoe >= %{_tomoe_ver}
Requires:	gtk2 >= 2.4.0
Requires(post):		ldconfig
Obsoletes:	libtomoe-gtk < 0.6.0

%description
The tomoe-gtk is a class library for tomoe's GUI parts.

%description -l ja
tomoe-gtk は tomoe の GUI パーツのクラスライブラリです。

%package devel
Summary:	Header files for developing tomoe-gtk applications
Summary(ja):	tomoe-gtk アプリケーション開発用ヘッダファイル
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	tomoe-devel >= %{_tomoe_ver}
Requires:	gucharmap-devel >= 1.4.0
Requires:	pkgconfig
Obsoletes:	libtomoe-gtk-devel < 0.6.0

%description devel
The tomoe-gtk-devel package includes the header files for the tomoe-gtk
package.
Install this package if you want to develop programs which use tomoe-gtk.

%description -l ja devel
tomoe-gtk-devel パッケージには、tomoe-gtk を使うアプリケーションを開発
するためのヘッダファイルが含まれています。

%if %{with_python}
%package -n python-tomoe-gtk
Summary:	tomoe-gtk library for Python binding
Summary(ja):	Python から tomoe-gtk を使うためのライブラリ
Group:		System Environment/Libraries
Requires:	%{name} = %{version}-%{release}
Requires:	python
BuildRequires:  python-devel

%description -n python-tomoe
Python extension library to use tomoe-gtk

%description -l ja -n python-tomoe
Python から tomoe-gtk を使うための拡張ライブラリです。
%endif


%prep
%setup -q

%build
%configure \
    --disable-static \
    --without-gucharmap

%__make %{?_smp_mflags}

%install
%__rm -rf $RPM_BUILD_ROOT

%makeinstall

## remove unuse files
find ${RPM_BUILD_ROOT} -name '*.la' | xargs rm

%if !%{with_python}
%__rm -f %{buildroot}%{_libdir}/python?.?/site-packages/gtk-?.?/tomoegtk.so
%endif

%find_lang %{name}

%clean
%__rm -rf %{buildroot}

%post
%{_syssbindir}/ldconfig

%postun
%{_syssbindir}/ldconfig


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING ChangeLog INSTALL
%{_libdir}/*.so.*
%{_datadir}/tomoe-gtk

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


%changelog
* Sun Oct 03 2010 Shu KONNO <owa@bg.wakwak.com> 0.6.0-2
- rebuilt with rpm-4.8.1 for pkg-config

* Sun May 31 2009 Munehiro Yamamoto <munepi@cg8.so-net.ne.jp> 0.6.0-1
- new upstream release
- added %%configure: 
  - --disable-static
  - --without-gucharmap

* Mon Sep 29 2008 Shu KONNO <owa@bg.wakwak.com> 0.5.1-1vl5
- applied new versioning policy, spec in utf-8
- removed *.la

* Sun Mar 11 2007 KAZUKI SHIMURA <kazuki@ma.ccna.ne.jp> 0.5.1-0vl1
- new upstream release
- drop obsolete test-fix.patch (patch0)

* Mon Jan 08 2007 KAZUKI SHIMURA <kazuki@ma.ccna.ne.jp> 0.5.0-0vl2
- add Requires: gucharmap-devel to -devel package

* Mon Dec 31 2006 KAZUKI SHIMURA <kazuki@ma.ccna.ne.jp> 0.5.0-0vl1
- new upstream release
- update required version of tomoe
- add test-fix.patch (patch0)
- add Requires: tomoe-devel to -devel package
- add BuildRequires: gtk-doc >= 1.4, gucharmap-devel >= 1.4.0

* Fri Nov 24 2006 KAZUKI SHIMURA <kazuki@ma.ccna.ne.jp> 0.3.0-0vl1
- new upstream release
- update required-version of tomoe
- add Requires: pkgconfig to -devel package
- update %%files

* Mon Nov 07 2005 KAZUKI SHIMURA <kazuki@ma.ccna.ne.jp> 0.1.0-0vl1
- initial release for Vine Linux
