File xreader.spec of Package xreader

#
# spec file for package xreader
#
# 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/
#


%define sover   3
%define typelib1 typelib-1_0-XreaderDocument-1_5_0
%define typelib2 typelib-1_0-XreaderView-1_5_0
Name:           xreader
Version:        1.0.8
Release:        0
Summary:        Simple document viewer
License:        GPL-2.0 and LGPL-2.0
Group:          Productivity/Office/Other
Url:            https://github.com/linuxmint/xreader
Source:         https://github.com/linuxmint/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  gnome-common
BuildRequires:  libtiff-devel >= 3.6
BuildRequires:  pkgconfig
BuildRequires:  texlive-devel
BuildRequires:  update-desktop-files
BuildRequires:  yelp-tools
BuildRequires:  pkgconfig(ddjvuapi) >= 3.5.17
BuildRequires:  pkgconfig(gail-3.0)
BuildRequires:  pkgconfig(glib-2.0) >= 2.36.0
BuildRequires:  pkgconfig(gobject-introspection-1.0) >= 0.6
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(gtk+-unix-print-3.0)
BuildRequires:  pkgconfig(libcaja-extension)
BuildRequires:  pkgconfig(libgxps) >= 0.2.0
BuildRequires:  pkgconfig(libnemo-extension)
BuildRequires:  pkgconfig(libsecret-1) >= 0.5
BuildRequires:  pkgconfig(libspectre) >= 0.2.0
BuildRequires:  pkgconfig(libxml-2.0) >= 2.5.0
BuildRequires:  pkgconfig(poppler-glib) >= 0.16.0
BuildRequires:  pkgconfig(sm) >= 1.0.0
BuildRequires:  pkgconfig(zlib)
Requires:       %{name}-backends = %{version}
Recommends:     %{name}-lang
%glib2_gsettings_schema_requires
%if 0%{?suse_version} >= 1320 || (0%{?suse_version} == 1315 && 0%{?is_opensuse})
BuildRequires:  pkgconfig(webkit2gtk-4.0) >= 2.4.3
%endif

%description
X-Apps Document Reader is a document viewer capable of displaying
multiple and singlepage document formats like PDF and PostScript.

%lang_package

%package -n libxreaderdocument%{sover}
Summary:        X-Apps Document Reader -- System Library
Group:          System/Libraries

%description -n libxreaderdocument%{sover}
X-Apps Document Reader is a document viewer capable of displaying
multiple and singlepage document formats like PDF and PostScript.

%package -n libxreaderview%{sover}
Summary:        X-Apps Document Reader -- System Library
Group:          System/Libraries

%description -n libxreaderview%{sover}
X-Apps Document Reader is a document viewer capable of displaying
multiple and singlepage document formats like PDF and PostScript.

%package -n %{typelib1}
Summary:        XReaderDocument -- Introspection Bindings
Group:          System/Libraries

%description -n %{typelib1}
X-Apps Document Reader is a document viewer capable of displaying
multiple and singlepage document formats like PDF and PostScript.

%package -n %{typelib2}
Summary:        XReaderView -- Introspection Bindings
Group:          System/Libraries

%description -n %{typelib2}
X-Apps Document Reader is a document viewer capable of displaying
multiple and singlepage document formats like PDF and PostScript.

%package backends
Summary:        XReader shared libraries (View and Document)
Group:          System/Libraries

%description backends
X-Apps Document Reader is a document viewer capable of displaying
multiple and singlepage document formats like PDF and PostScript.

%package -n nemo-extension-%{name}
Summary:        X-Apps Document Reader file manager extension
Group:          Productivity/Office/Other
Requires:       %{name} = %{version}
Requires:       nemo
Recommends:     nemo-extension-sendto

%description -n nemo-extension-%{name}
X-Apps Document Reader is a document viewer capable of displaying
multiple and singlepage document formats like PDF and PostScript.

This package contains the xreader extension for the
Nemo file manager.
It adds an additional tab called "Document" to the file properties
dialog.

%package -n caja-extension-%{name}
Summary:        X-Apps Document Reader file manager extension
Group:          Productivity/Office/Other
Requires:       %{name} = %{version}
Requires:       caja
Recommends:     caja-extension-sendto

%description -n caja-extension-%{name}
X-Apps Document Reader is a document viewer capable of displaying
multiple and singlepage document formats like PDF and PostScript.

This package contains the xreader extension for the
Caja file manager.
It adds an additional tab called "Document" to the file properties
dialog.

%package devel
Summary:        X-Apps Document Reader development files
Group:          Development/Libraries/C and C++
Requires:       %{name}-backends = %{version}
Requires:       %{typelib1} = %{version}
Requires:       %{typelib2} = %{version}

%description devel
X-Apps Document Reader is a document viewer capable of displaying
multiple and singlepage document formats like PDF and PostScript.

%prep
%setup -q

%build
NOCONFIGURE=1 gnome-autogen.sh
%configure \
  --disable-static                    \
  --libexecdir=%{_libexecdir}/%{name} \
  --enable-introspection              \
  --enable-gtk-doc
make %{?_smp_mflags}

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

%post
%icon_theme_cache_post
%desktop_database_post
%mime_database_post
%glib2_gsettings_schema_post

%postun
%icon_theme_cache_post
%desktop_database_postun
%mime_database_postun
%glib2_gsettings_schema_post

%post -n libxreaderview%{sover} -p /sbin/ldconfig

%postun -n libxreaderview%{sover} -p /sbin/ldconfig

%post -n libxreaderdocument%{sover} -p /sbin/ldconfig

%postun -n libxreaderdocument%{sover} -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc AUTHORS COPYING README
%{_bindir}/%{name}
%{_bindir}/%{name}-previewer
%{_bindir}/%{name}-thumbnailer
%{_datadir}/%{name}/
%dir %{_libdir}/%{name}/
%dir %{_libdir}/%{name}/%{sover}/
%dir %{_libexecdir}/%{name}/
%{_libexecdir}/%{name}/%{name}*
%dir %{_datadir}/thumbnailers/
%{_datadir}/thumbnailers/%{name}.thumbnailer
%{_datadir}/dbus-1/services/*.service
%{_datadir}/glib-2.0/schemas/*.xml
%{_datadir}/help/C/%{name}/
%{_datadir}/applications/%{name}.desktop
%dir %{_datadir}/appdata/
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/icons/hicolor/*/*/*
%{_mandir}/man?/*.?%{?ext_man}

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

%files -n libxreaderview%{sover}
%defattr(-,root,root)
%doc AUTHORS COPYING README
%{_libdir}/libxreaderview.so.%{sover}*

%files -n libxreaderdocument%{sover}
%defattr(-,root,root)
%doc AUTHORS COPYING README
%{_libdir}/libxreaderdocument.so.%{sover}*

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

%files -n nemo-extension-%{name}
%defattr(-,root,root)
%dir %{_datadir}/nemo/extensions/
%{_datadir}/nemo/extensions/libxreader-properties-page.nemo-extension
%{_libdir}/nemo/

%files -n caja-extension-%{name}
%defattr(-,root,root)
%dir %{_datadir}/caja/extensions/
%{_datadir}/caja/extensions/libxreader-properties-page.caja-extension
%{_libdir}/caja/

%files -n %{typelib1}
%defattr(-,root,root)
%{_libdir}/girepository-1.0/XreaderDocument-1.5.0.typelib

%files -n %{typelib2}
%defattr(-,root,root)
%{_libdir}/girepository-1.0/XreaderView-1.5.0.typelib

%files backends
%defattr(-,root,root)
%doc AUTHORS README COPYING
%{_libdir}/%{name}/%{sover}/backends/

%changelog
openSUSE Build Service is sponsored by