File gnome-documents.spec of Package gnome-documents

#
# spec file for package gnome-documents
#
# Copyright (c) 2016 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:           gnome-documents
Version:        3.20.1
Release:        0
Summary:        Document Manager for GNOME
License:        GPL-2.0+
Group:          Productivity/Office/Other
Url:            http://www.gnome.org
Source:         http://download.gnome.org/sources/gnome-documents/3.20/%{name}-%{version}.tar.xz
BuildRequires:  gnome-shell
BuildRequires:  gtk-doc
BuildRequires:  inkscape
BuildRequires:  intltool >= 0.50.1
BuildRequires:  itstool
BuildRequires:  poppler-tools
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
BuildRequires:  pkgconfig(evince-document-3.0) >= 3.13.3
BuildRequires:  pkgconfig(evince-view-3.0) >= 3.13.3
BuildRequires:  pkgconfig(gjs-1.0)
BuildRequires:  pkgconfig(glib-2.0) >= 2.39.3
BuildRequires:  pkgconfig(gnome-desktop-3.0)
BuildRequires:  pkgconfig(goa-1.0) >= 3.2.0
BuildRequires:  pkgconfig(gobject-introspection-1.0) >= 1.31.6
BuildRequires:  pkgconfig(gtk+-3.0) >= 3.19.1
BuildRequires:  pkgconfig(libgdata) >= 0.13.3
BuildRequires:  pkgconfig(libsoup-2.4) >= 2.41.3
BuildRequires:  pkgconfig(tracker-control-1.0) >= 0.17.3
BuildRequires:  pkgconfig(tracker-sparql-1.0) >= 0.17.3
BuildRequires:  pkgconfig(webkit2gtk-4.0) >= 2.6.0
BuildRequires:  pkgconfig(zapojit-0.0) >= 0.0.2
# This is a gjs application
Requires:       gjs
Requires:       gnome-documents_books-common = %{version}
Recommends:     %{name}-lang
# If available, we query the Online Miners via dbus.
Recommends:     dbus(org.gnome.OnlineMiners.GData)
# A lot of document formats are handled using unoconv.
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%{glib2_gsettings_schema_requires}

%ifnarch x86_64 %ix86 aarch64
# Remove reference to libreofficekit
%global __requires_exclude typelib\\(LOKDocView\\)
%endif

%description
Documents is a document manager application for GNOME.

%package -n gnome-shell-search-provider-documents
Summary:        Document Manager for GNOME -- Search Provider for GNOME Shell
Group:          Productivity/Office/Other
Requires:       %{name} = %{version}
Requires:       gnome-shell
Supplements:    packageand(%{name}:gnome-shell)

%description -n gnome-shell-search-provider-documents
Documents is a document manager application for GNOME.

This package contains a search provider to enable GNOME Shell to get
search results from documents.

%package -n gnome-books
Summary:        Book Reader for GNOME
Group:          Productivity/Office/Other
Requires:       gnome-documents_books-common = %{version}
Recommends:     gnome-epub-thumbnailer

%description -n gnome-books
Books is an electronic Book reader or GNOME.

%package -n gnome-documents_books-common
Summary:        Shared data between GNOME Documents and GNOME Books
Group:          Productivity/Office/Other
# gnome-documents relies on tracker to find local files.
Requires:       tracker-miner-files >= 1.3.4

%description -n gnome-documents_books-common
This package provides runtime information shared between GNOME Documents
and GNOME Books.

%lang_package

%prep
%setup -q
translation-update-upstream

%build
%configure --disable-static --enable-getting-started
make %{?_smp_mflags}

%install
%make_install
find %{buildroot} -type f -name "*.la" -delete -print
%suse_update_desktop_file org.gnome.Documents
%find_lang %{name} %{?no_lang_C}

%post
%{glib2_gsettings_schema_post}
%desktop_database_post
%icon_theme_cache_post

%postun
%{glib2_gsettings_schema_postun}
%desktop_database_postun
%icon_theme_cache_postun

%post -n gnome-documents_books-common
%glib2_gsettings_schema_post

%postun -n gnome-documents_books-common
%glib2_gsettings_schema_postun

%post -n gnome-books
%{glib2_gsettings_schema_post}
%desktop_database_post
%icon_theme_cache_post

%postun -n gnome-books
%{glib2_gsettings_schema_postun}
%desktop_database_postun
%icon_theme_cache_postun

%files
%defattr(-,root,root)
%doc AUTHORS NEWS README
%doc %{_datadir}/help/C/%{name}/
%{_bindir}/gnome-documents
%dir %{_datadir}/appdata
%{_datadir}/appdata/org.gnome.Documents.appdata.xml
%{_datadir}/applications/org.gnome.Documents.desktop
%{_datadir}/glib-2.0/schemas/org.gnome.documents.gschema.xml
%{_datadir}/icons/hicolor/*/apps/org.gnome.Documents*
%{_mandir}/man1/gnome-documents.1%{?ext_man}

%files -n gnome-documents_books-common
%defattr(-,root,root)
%{_datadir}/gnome-documents/
%{_datadir}/glib-2.0/schemas/org.gnome.Documents.enums.xml
%{_libdir}/gnome-documents/

%files -n gnome-shell-search-provider-documents
%defattr(-,root,root)
%{_datadir}/dbus-1/services/org.gnome.Documents.service
%{_datadir}/gnome-shell/search-providers/org.gnome.Documents.search-provider.ini

%files -n gnome-books
%defattr(-,root,root)
%doc AUTHORS NEWS README
%{_bindir}/gnome-books
%{_datadir}/appdata/org.gnome.Books.appdata.xml
%{_datadir}/applications/org.gnome.Books.desktop
%{_datadir}/dbus-1/services/org.gnome.Books.service
%{_datadir}/glib-2.0/schemas/org.gnome.books.gschema.xml
%{_datadir}/icons/hicolor/*/apps/org.gnome.Books*
%{_mandir}/man1/gnome-books.1%{?ext_man}

%files lang -f %{name}.lang
%defattr(-,root,root)

%changelog
openSUSE Build Service is sponsored by