Summary: A GNOME po file editor with many bells and whistles.
Summary(ja): GNOME po ファイルエディタ
Name: gtranslator
Version: 1.9.12
Release: 2%{?_dist_release}
License: GPL
Group: Applications/Development
URL: http://www.gtranslator.org/
Source:	http://ftp.gnome.org/pub/GNOME/sources/gtranslator/1.9/%{name}-%{version}.tar.bz2
#Patch0: po_header_set_field_wrapper.patch

Vendor:	Project Vine
Distribution: Vine Linux
Packager: inagaki,yasumichi

BuildRoot: %{_tmppath}/%{name}-%{version}-root

BuildRequires: libxml2-devel >= 2.4.12
BuildRequires: glib2-devel >= 2.25.10
BuildRequires: gtk2-devel >= 2.21.5
BuildRequires: gtksourceview2-devel >= 2.4.0 
BuildRequires: gdl-devel >= 2.26.0
BuildRequires: unique-devel
BuildRequires: libgda-devel
BuildRequires: gsettings-desktop-schemas

Requires(post): scrollkeeper
Requires(postun): scrollkeeper

Requires: libxml2 >= 2.4.12
Requires: glib2 >= 2.25.10
Requires: gtk2 >= 2.21.5
Requires: gtksourceview2 >= 2.4.0 
Requires: gdl >= 2.26.0
Requires: gda-sqlite
Requires: gsettings-desktop-schemas

# for documentation
BuildRequires: gtk-doc
BuildRequires: gnome-doc-utils >= 0.20.2

# for charmap plugin
Requires: gucharmap
BuildRequires: gucharmap-devel 

# for open-tran plugin
Requires: libsoup
BuildRequires: libsoup-devel

# for dictionary plugin
Requires: gnome-utils
BuildRequires: gnome-utils

# for spell support
Requires: gtkspell >= 2.0.2
BuildRequires: gtkspell-devel >= 2.0.2


%description
gtranslator is a comfortable po file editor with many bells and whistles.
It features many useful function which ease the work of translators of po
files imminently.

%package devel
Summary: Headers for developing programs that will use %{name}
Summary(ja): %{name} の開発用ファイル
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: libglade2-devel
Requires: gtksourceview2-devel

%description devel
This package contains the headers that programmers will need to develop
applications which will use %{name}.

%prep
%setup -q
# %patch0 -p1

%build
%configure --disable-static \
	--disable-debug \
	--disable-scrollkeeper \
	--disable-schemas-compile

make %{?_smp_mflags}

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

%find_lang %{name}

rm -f $RPM_BUILD_ROOT%{_libdir}/gtranslator/*/*.la

%post 
scrollkeeper-update -q > /dev/null 2>&1 || :

%posttrans
glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
update-desktop-database %{_datadir}/applications/

%postun
scrollkeeper-update -q > /dev/null 2>&1 || :
if [ $1 -eq 0 ]; then
  glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
  update-desktop-database %{_datadir}/applications/
fi

%clean
rm -rf $RPM_BUILD_ROOT

%files -f %{name}.lang
%defattr(-, root, root, 0755)
%doc AUTHORS ChangeLog COPYING NEWS README THANKS
%{_bindir}/*
%{_libdir}/gtranslator
%{_datadir}/applications/*.desktop
%{_datadir}/glib-2.0/schemas/org.gnome.gtranslator.*gschema.xml
%{_datadir}/gnome/help/gtranslator
%{_datadir}/gtranslator
%{_datadir}/omf/gtranslator
%{_datadir}/pixmaps/*
%{_datadir}/icons/hicolor/*/apps/gtranslator.*
%{_mandir}/man?/*

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

%changelog
* Wed Oct 20 2010 Yasumichi Akahoshi <yasumichi@vinelinux.org> 1.9.12-2
- add (Build)Requires gsettings-desktop-schemas.
- add Requires gda-sqlite instead of libgda.

* Wed Oct 13 2010 Yasumichi Akahoshi <yasumichi@vinelinux.org> 1.9.12-1
- new upstream release
- rebuild dependency
- replace GConf2 by glib-compile-schemas
- care desktop-files

* Thu Mar 11 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 1.9.9-1
- new upstream release
- add BuildRequires: unique-devel
- drop Patch0

* Thu Nov 19 2009 Yasumichi Akahoshi <yasumichi@vinelinux.org> 1.9.6-2
- add libuuid to Requires.
- add libuuid-devel and gnome-doc-utils to BR.
- add Patch0 (https://bugzilla.gnome.org/show_bug.cgi?id=591587)
- export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1 when install.

* Thu Nov 19 2009 Yasumichi Akahoshi <yasumichi@vinelinux.org> 1.9.6-1
- new upstream release
- add Requires glib2,gtksourceview2,gdl,gtkspell,gucharmap,apr,apr-util,neon,subversion

* Sat May 16 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.9.5-1
- applied new versioning policy, spec in UTF-8
- new upstream release
- updated BuildRequires:
- split devel subpackage
- changed Group to Applications/Development

* Sat Oct  8 2005 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 1.1.6-0vl1
- new upstream release
- added BuildRequires: gtkspell-devel

* Thu Jan 29 2004 Daisuke SUZUKI <daisuke@linux.or.jp> 1.1.4-0vl1
- new upstream snapshot, tarball is taken from debian pool
- add Patch10 from debian package

* Tue Sep 09 2003 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 1.0-1vl1
- build for VineSeedPlus

* Thu Sep 04 2003 Dag Wieers <dag@wieers.com> - 1.0-1
- Updated to release 1.0.

* Tue Sep 02 2003 Dag Wieers <dag@wieers.com> - 1.0-0.pre1
- Updated to release 1.0pre1.

* Fri Jun 27 2003 Dag Wieers <dag@wieers.com> - 1.0-0.cvs20030626
- Updated to release 1.0CVS-20030626.

* Sat Jun 14 2003 Dag Wieers <dag@wieers.com> - 0.99-0
- Updated to release 0.99.

* Tue Mar 18 2003 Dag Wieers <dag@wieers.com> - 0.43-0
- Initial package. (using DAR)
