File gtranslator.spec of Package gtranslator

#
# spec file for package gtranslator
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#



Name:           gtranslator
Version:        2.90.6
Release:        1
License:        GPLv3+
Summary:        A GNOME po file editor with many bells and whistles
Url:            http://gtranslator.sourceforge.net
Group:          Development/Tools/Other
Source:         http://download.gnome.org/sources/gtranslator/2.90/%{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM gtranslator-libgda-5.0.patch bgo#652639 dimstar@opensuse.org -- Add support for libgda 5.0
Patch0:         gtranslator-libgda-5.0.patch
# PATCH-FIX-UPSTREAM gtranslator-gtkspell3.patch bgo#660709 gankov@opensuse.org -- Add support for gtkspell3
Patch1:         gtranslator-gtkspell3.patch
BuildRequires:  fdupes
# Needed by patch0
BuildRequires:  gnome-common
BuildRequires:  gnome-doc-utils-devel
BuildRequires:  intltool
# Not using a pkgconfig() BuildRequires, to allow building against libgda 4.0 and 5.0
BuildRequires:  libgda-devel
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(gdict-1.0)
BuildRequires:  pkgconfig(gdl-3.0)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gsettings-desktop-schemas)
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(gtksourceview-3.0)
BuildRequires:  pkgconfig(gtkspell-3.0)
BuildRequires:  pkgconfig(iso-codes)
BuildRequires:  pkgconfig(json-glib-1.0)
BuildRequires:  pkgconfig(libpeas-1.0)
BuildRequires:  pkgconfig(libpeas-gtk-1.0)
BuildRequires:  pkgconfig(libxml-2.0)
Requires:       gsettings-desktop-schemas
Requires:       iso-codes
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%glib2_gsettings_schema_requires

%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
License:        GPLv3+
Summary:        A GNOME po file editor with many bells and whistles
Group:          Development/Tools/Other

%description devel
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.

%lang_package
%prep
%setup -q
%patch0 -p1
%patch1 -p1
translation-update-upstream

%build
# Required by patch0 and patch1
NOCONFIGURE=1 gnome-autogen.sh
%configure \
	--disable-static \
	--disable-scrollkeeper \
	--with-gtkspell3 \
	--with-dictionary \
	--with-gda=$(rpm -q --provides $(rpm -q --whatprovides libgda-devel) | grep "pkgconfig(libgda-[45].0)" | cut -b 18-20)
%{__make} %{?_smp_mflags}

%install
%makeinstall
find %{buildroot}%{_libdir} -type f -name "*.la" -delete -print
%suse_update_desktop_file %{name}
%find_lang %{name} %{?no_lang_C}
%fdupes %{buildroot}

%clean
%{__rm} -rf %{buildroot}

%post
/sbin/ldconfig
%glib2_gsettings_schema_post
%desktop_database_post
%icon_theme_cache_post

%postun
/sbin/ldconfig
%glib2_gsettings_schema_postun
%desktop_database_postun
%icon_theme_cache_postun

%files
%defattr(-, root, root, 0755)
%doc AUTHORS ChangeLog COPYING NEWS README THANKS
%dir %{_datadir}/gnome/
%dir %{_datadir}/gnome/help/
%dir %{_datadir}/gnome/help/%{name}/
%doc %{_datadir}/gnome/help/%{name}/C/
%dir %{_datadir}/omf/
%dir %{_datadir}/omf/%{name}/
%doc %{_datadir}/omf/%{name}/%{name}-C.omf
%doc %{_mandir}/man?/*
%{_bindir}/%{name}
%{_libdir}/%{name}/
%{_libdir}/libgtranslator-private.so.0*
%{_datadir}/%{name}/
%{_datadir}/applications/*.desktop
%{_datadir}/glib-2.0/schemas/*.gschema.xml
%{_datadir}/icons/hicolor/*/apps/gtranslator.*
%{_datadir}/pixmaps/%{name}/
# .gir file goes to -devel package
%exclude %{_datadir}/%{name}/gir-1.0/

%files devel
%defattr(-, root, root)
%{_includedir}/gtranslator-3.0/
%{_libdir}/libgtranslator-private.so
%{_libdir}/pkgconfig/gtranslator.pc
%doc %{_datadir}/gtk-doc/html/%{name}/
%{_datadir}/%{name}/gir-1.0/

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by