File evince.spec of Package evince
#
# spec file for package evince
#
# Copyright (c) 2014 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/
#
%define major_version 2.32
Name: evince
Version: 2.32.0
Release: 1
License: GPL-2.0+
Summary: GNOME Document Viewer
Url: http://www.gnome.org/projects/evince/
Group: Productivity/Office/Other
Source0: ftp://ftp.gnome.org/pub/GNOME/sources/%{name}/0.4/%{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM evince-2.32.0-libdocument-segfault.patch bgo#630845 -- Check for NULL in synctex_backward_search preventing segfault
Patch0: evince-2.32.0-libdocument-segfault.patch
# PATCH-FIX-UPSTREAM evince-2.32.0-dvi-CVEs.patch Gentoo bug #350681-- Fix multiple security issues with dvi backend
Patch1: evince-2.32.0-dvi-CVEs.patch
# PATCH-FIX-UPSTREAM evince-2.32.0-pk-fonts.patch bgo#639746-- Fix problem with some pk fonts
Patch2: evince-2.32.0-pk-fonts.patch
# PATCH-FIX-UPSTREAM evince-2.32.0-libview-crash.patch bgo#630999-- Fix libview crash
Patch3: evince-2.32.0-libview-crash.patch
# PATCH-FIX-UPSTREAM evince-2.32.0-dvi-security.patch -- Fix another security issue in the dvi-backend
Patch4: evince-2.32.0-dvi-security.patch
# PATCH-FIX-UPSTREAM evince-2.32.0-update-poppler.patch -- Update poppler API
Patch5: evince-2.32.0-update-poppler.patch
# PATCH-FIX-UPSTREAM evince-2.32.0-stop-spinner.patch bgo#637390 -- Stop the GtkSpinner when the loading window is hidden
Patch6: evince-2.32.0-stop-spinner.patch
# PATCH-FIX-UPSTREAM evince-2.32.0-use-popup.patch bgo#633475 -- Use a popup window instead of a toplevel for loading window
Patch7: evince-2.32.0-use-popup.patch
# PATCH-FIX-UPSTREAM evince-2.32.0-create_thumbnail_frame-null.patch -- document: create_thumbnail_frame should return NULL
Patch8: evince-2.32.0-create_thumbnail_frame-null.patch
# PATCH-FIX-UPSTREAM evince-0.7.1-display-menu.patch -- Fix .desktop file so menu item shows up
Patch9: evince-0.7.1-display-menu.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: ghostscript-fonts-std
BuildRequires: ghostscript-x11
BuildRequires: intltool
BuildRequires: libtool
BuildRequires: t1lib-devel
BuildRequires: texlive-devel
BuildRequires: update-desktop-files
BuildRequires: pkgconfig(ddjvuapi)
BuildRequires: pkgconfig(gconf-2.0)
BuildRequires: pkgconfig(gnome-doc-utils)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(gtk+-2.0)
BuildRequires: pkgconfig(libspectre)
BuildRequires: pkgconfig(libtiff-4)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(poppler-glib)
BuildRequires: pkgconfig(sm)
Recommends: %{name}-lang
# For the comics backend
Suggests: p7zip
Suggests: unrar
Suggests: unzip
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%glib2_gsettings_schema_requires
%description
Evince is a document viewer capable of displaying multiple and
singlepage document formats like PDF and PostScript.
%package -n libevdocument3
Summary: GNOME Document Viewer - System Library
Group: System/Libraries
%description -n libevdocument3
Evince is a document viewer capable of displaying multiple and
singlepage document formats like PDF and PostScript.
%package -n libevview3
Summary: GNOME Document Viewer - System Library
Group: System/Libraries
%description -n libevview3
Evince is a document viewer capable of displaying multiple and
singlepage document formats like PDF and PostScript.
%package -n typelib-1_0-EvinceDocument-2_32
Summary: GNOME Document Viewer -- Introspection bindings
Group: System/Libraries
%description -n typelib-1_0-EvinceDocument-2_32
Evince is a document viewer capable of displaying multiple and
singlepage document formats like PDF and PostScript.
%package -n typelib-1_0-EvinceView-2_32
Summary: GNOME Document Viewer -- Introspection bindings
Group: System/Libraries
%description -n typelib-1_0-EvinceView-2_32
Evince is a document viewer capable of displaying multiple and
singlepage document formats like PDF and PostScript.
%package devel
Summary: GNOME Document Viewer
Group: Development/Libraries/GNOME
Requires: %{name} = %{version}
Requires: libevdocument3 = %{version}
Requires: libevview3 = %{version}
Requires: typelib-1_0-EvinceDocument-2_32 = %{version}
Requires: typelib-1_0-EvinceView-2_32 = %{version}
%description devel
Evince is a document viewer capable of displaying multiple and
singlepage document formats like PDF and PostScript.
%lang_package
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1
%patch8 -p1
%patch9 -p1
# Do not depend on gnome-icon-theme.
sed 's/gnome-icon-theme//' -i configure.ac
%build
autoreconf -fvi
export LIBS=-lICE
%configure \
--disable-static \
--with-pic \
--libexecdir=%{_libexecdir}/%{name}/ \
--disable-scrollkeeper \
--disable-nautilus \
--disable-thumbnailer \
--disable-previewer \
--enable-djvu \
--enable-dvi \
--enable-comics \
--enable-impress \
--enable-pixbuf \
--enable-t1lib \
--enable-introspection \
--with-gtk=2.0 \
--with-smclient=xsmp \
--without-keyring
make %{?_smp_mflags}
%install
%make_install
%find_lang %{name} --with-gnome %{?no_lang_C}
%suse_update_desktop_file -r -N Evince evince GTK Graphics Office Viewer
find %{buildroot} -type f -name "*.la" -delete -print
%fdupes %{buildroot}%{_datadir}
%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 libevdocument3 -p /sbin/ldconfig
%postun -n libevdocument3 -p /sbin/ldconfig
%post -n libevview3 -p /sbin/ldconfig
%postun -n libevview3 -p /sbin/ldconfig
%files
%defattr (-,root,root,-)
%doc AUTHORS COPYING ChangeLog NEWS README TODO
%{_bindir}/%{name}
%{_datadir}/%{name}/
%{_datadir}/GConf/gsettings/%{name}.convert
%{_datadir}/applications/*.desktop
%{_datadir}/dbus-1/services/org.gnome.evince.Daemon.service
%{_datadir}/glib-2.0/schemas/org.gnome.Evince.gschema.xml
%dir %{_datadir}/gnome/
%dir %{_datadir}/gnome/help/
%dir %{_datadir}/gnome/help/%{name}/
%doc %{_datadir}/gnome/help/%{name}/C/
%dir %{_datadir}/omf/
%{_datadir}/omf/%{name}/%{name}-C.omf
%{_datadir}/icons/hicolor/*/apps/evince*.*
# backends
%{_libdir}/%{name}/
%if "%{_libdir}" != "%{_libexecdir}"
# helpers & daemon
%{_libexecdir}/%{name}/
%endif
%doc %{_mandir}/man?/*.*
%files lang -f %{name}.lang
%defattr (-,root,root,-)
%dir %{_datadir}/gnome/
%dir %{_datadir}/gnome/help/
%files -n libevdocument3
%defattr(-,root,root,-)
%{_libdir}/libevdocument.so.3*
%files -n libevview3
%defattr(-,root,root,-)
%{_libdir}/libevview.so.3*
%files -n typelib-1_0-EvinceDocument-2_32
%defattr(-,root,root,-)
%{_libdir}/girepository-1.0/EvinceDocument-%{major_version}.typelib
%files -n typelib-1_0-EvinceView-2_32
%defattr(-,root,root,-)
%{_libdir}/girepository-1.0/EvinceView-%{major_version}.typelib
%files devel
%defattr(-,root,root,-)
%{_datadir}/gir-1.0/*.gir
%{_datadir}/gtk-doc/html/evince/
%{_datadir}/gtk-doc/html/libevdocument-%{major_version}
%{_datadir}/gtk-doc/html/libevview-%{major_version}
%{_includedir}/%{name}/
%{_libdir}/*.so
%{_libdir}/pkgconfig/evince*.pc
# Own these repositories to not depend on gtk-doc while building:
%dir %{_datadir}/gtk-doc/
%dir %{_datadir}/gtk-doc/html/
%changelog