File atril.spec of Package atril

#
# spec file for package atril
#
# Copyright (c) 2015 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 _version 1.10
%define typelib1 typelib-1_0-AtrilDocument-1_5_0
%define typelib2 typelib-1_0-AtrilView-1_5_0
Name:           atril
Version:        1.10.2
Release:        0
Summary:        MATE Desktop document viewer
License:        GPL-2.0 and LGPL-2.0
Group:          System/GUI/Other
Url:            http://mate-desktop.org
Source:         http://pub.mate-desktop.org/releases/%{_version}/%{name}-%{version}.tar.xz
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  libxml2-python
BuildRequires:  mate-common >= 1.9.0
BuildRequires:  texlive-devel
BuildRequires:  update-desktop-files
BuildRequires:  yelp-tools
BuildRequires:  pkgconfig(ddjvuapi)
BuildRequires:  pkgconfig(gdk-pixbuf-2.0)
BuildRequires:  pkgconfig(glib-2.0)
BuildRequires:  pkgconfig(gobject-introspection-1.0)
BuildRequires:  pkgconfig(gtk+-2.0)
BuildRequires:  pkgconfig(libcaja-extension) >= 1.9.0
BuildRequires:  pkgconfig(libgxps)
BuildRequires:  pkgconfig(libpst)
BuildRequires:  pkgconfig(libsecret-1)
BuildRequires:  pkgconfig(libspectre)
BuildRequires:  pkgconfig(libtiff-4)
BuildRequires:  pkgconfig(libxml-2.0)
BuildRequires:  pkgconfig(mate-desktop-2.0) >= 1.9.0
BuildRequires:  pkgconfig(mate-icon-theme) >= 1.9.0
BuildRequires:  pkgconfig(poppler-glib)
BuildRequires:  pkgconfig(sm)
BuildRequires:  pkgconfig(webkit-1.0)
BuildRequires:  pkgconfig(xt)
BuildRequires:  pkgconfig(zlib)
Requires:       %{name}-backends = %{version}
Requires:       mate-desktop-gsettings-schemas >= %{version}
Recommends:     %{name}-lang
Provides:       mate-document-viewer = %{version}
Obsoletes:      mate-document-viewer < %{version}
Obsoletes:      mate-document-viewer < %{version}
%glib2_gsettings_schema_requires

%description
Atril is a document viewer capable of displaying multiple and single
page document formats like PDF and Postscript.

%lang_package

%package -n libatrildocument3
Summary:        MATE Document Viewer -- System Library
Group:          System/Libraries
Obsoletes:      mate-document-viewer-libs-3 < %{version}

%description -n libatrildocument3
Evince is a document viewer capable of displaying multiple and
singlepage document formats like PDF and PostScript.

%package -n libatrilview3
Summary:        MATE Document Viewer -- System Library
Group:          System/Libraries
Obsoletes:      mate-document-viewer-libs-3 < %{version}

%description -n libatrilview3
Evince is a document viewer capable of displaying multiple and
singlepage document formats like PDF and PostScript.

%package -n %{typelib1}
Summary:        MATE Desktop bindings for AtrilDocument
Group:          System/GUI/Other

%description -n %{typelib1}
Atril is a document viewer capable of displaying multiple and single
page document formats like PDF and Postscript.

%package -n %{typelib2}
Summary:        MATE Desktop bindings for AtrilView
Group:          System/GUI/Other

%description -n %{typelib2}
Atril is a document viewer capable of displaying multiple and single
page document formats like PDF and Postscript.

%package backends
Summary:        Atril shared libraries (View and Document)
Group:          System/Libraries
Provides:       mate-document-viewer-libs-3 = %{version}
Obsoletes:      mate-document-viewer-libs-3 < %{version}
Obsoletes:      mate-document-viewer < %{version}

%description backends
Atril is a document viewer capable of displaying multiple and single
page document formats like PDF and Postscript.

%package caja
Summary:        MATE Desktop document viewer file manager extension
Group:          System/GUI/Other
Requires:       %{name} = %{version}
Requires:       caja >= 1.9.0
Provides:       mate-document-viewer-caja = %{version}
Obsoletes:      mate-document-viewer-caja < %{version}

%description caja
Atril is a document viewer capable of displaying multiple and single
page document formats like PDF and Postscript.

This package contains the mate-document-viewer extension for the
caja file manager.
It adds an additional tab called "Document" to the file properties dialog.

%package devel
Summary:        MATE Desktop document viewer development files
Group:          Development/Libraries/Other
Requires:       %{name}-backends = %{version}
Requires:       %{typelib1} = %{version}
Requires:       %{typelib2} = %{version}
Provides:       mate-document-viewer-devel = %{version}
Obsoletes:      mate-document-viewer-devel < %{version}

%description devel
Atril is a document viewer capable of displaying multiple and single
page document formats like PDF and Postscript.

%package thumbnailer
Summary:        Atril thumbnailer extension for caja
Group:          System/GUI/Other
Requires:       %{name} = %{version}
Requires:       caja >= 1.9.0

%description thumbnailer
Atril is a document viewer capable of displaying multiple and single
page document formats like PDF and Postscript.

This package contains the atril extension for the caja file manager.

%prep
%setup -q

%build
%configure \
  --disable-static                    \
  --with-pic                          \
  --libexecdir=%{_libexecdir}/%{name} \
  --enable-introspection              \
  --enable-gtk-doc                    \
  --enable-pdf                        \
  --enable-tiff                       \
  --enable-djvu                       \
  --enable-dvi                        \
  --enable-pixbuf                     \
  --enable-comics                     \
  --enable-xps
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}/

if [ -d %{buildroot}%{_datadir}/MateConf/ ]; then
    rm -rf %{buildroot}%{_datadir}/MateConf/
fi

%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 libatrilview3 -p /sbin/ldconfig

%postun -n libatrilview3 -p /sbin/ldconfig

%post -n libatrildocument3 -p /sbin/ldconfig

%postun -n libatrildocument3 -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}/3/
%dir %{_libexecdir}/%{name}/
%{_libexecdir}/%{name}/%{name}*
%{_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 -n libatrilview3
%defattr(-,root,root)
%doc AUTHORS COPYING README
%{_libdir}/libatrilview.so.*

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

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

%files caja
%defattr(-,root,root)
%{_datadir}/caja/extensions/libatril-properties-page.caja-extension
%{_libdir}/caja/

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

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

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

%files thumbnailer
%defattr(-,root,root)
%dir %{_datadir}/thumbnailers
%{_datadir}/thumbnailers/atril.thumbnailer

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

%changelog
openSUSE Build Service is sponsored by