gtranslator/gtranslator.spec
Dominique Leuenberger 71e2791567 Accepting request 526333 from home:Zaitor:branches:GNOME:Apps
- Conditionalize pkgconfig(gdict-1.0) BuildRequires, only available
  on older versions of openSUSE, gnome-dictionary 3.26.0 made this
  symbol private.

OBS-URL: https://build.opensuse.org/request/show/526333
OBS-URL: https://build.opensuse.org/package/show/GNOME:Apps/gtranslator?expand=0&rev=62
2017-09-15 09:40:02 +00:00

135 lines
4.1 KiB
RPMSpec

#
# spec file for package gtranslator
#
# Copyright (c) 2017 SUSE LINUX 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.91.7
Release: 0
Summary: A GNOME po file editor with many bells and whistles
License: GPL-3.0+
Group: Development/Tools/Other
Url: http://gtranslator.sourceforge.net
Source: http://download.gnome.org/sources/gtranslator/2.91/%{name}-%{version}.tar.xz
BuildRequires: fdupes
BuildRequires: intltool
BuildRequires: yelp-tools
# 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
%if 0%{?suse_version} <= 1320
BuildRequires: pkgconfig(gdict-1.0)
%endif
BuildRequires: pkgconfig(gdl-3.0) >= 3.6.0
BuildRequires: pkgconfig(glib-2.0) >= 2.32.0
BuildRequires: pkgconfig(gsettings-desktop-schemas)
BuildRequires: pkgconfig(gtk+-3.0) >= 3.4.2
BuildRequires: pkgconfig(gtksourceview-3.0) >= 3.0.0
BuildRequires: pkgconfig(gtkspell3-3.0) >= 3.0.0
BuildRequires: pkgconfig(iso-codes)
BuildRequires: pkgconfig(json-glib-1.0)
BuildRequires: pkgconfig(libpeas-1.0) >= 1.2.0
BuildRequires: pkgconfig(libpeas-gtk-1.0)
BuildRequires: pkgconfig(libxml-2.0) >= 2.4.12
Requires: gsettings-desktop-schemas
Requires: iso-codes
Requires: libgda-5_0-sqlite
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
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
translation-update-upstream
%build
export CFLAGS="%{optflags} -Wno-error=format-nonliteral"
%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
%doc %{_datadir}/help/C/%{name}/
%doc %{_mandir}/man?/*
%{_bindir}/%{name}
%{_libdir}/%{name}/
%{_datadir}/%{name}/
# own dir on older version of openSUSE
%if 0%{?suse_version} < 1320
%dir %{_datadir}/appdata/
%endif
%{_datadir}/appdata/gtranslator.appdata.xml
%{_datadir}/applications/*.desktop
%{_datadir}/glib-2.0/schemas/*.gschema.xml
%{_datadir}/icons/hicolor/*/apps/gtranslator.*
# .gir file goes to -devel package
%exclude %{_datadir}/%{name}/gir-1.0/
%files devel
%defattr(-, root, root)
%{_includedir}/gtranslator-3.0/
%{_libdir}/pkgconfig/gtranslator.pc
%doc %{_datadir}/gtk-doc/html/%{name}/
%{_datadir}/%{name}/gir-1.0/
%files lang -f %{name}.lang
%changelog