File evince.spec of Package evince

#
# spec file for package evince
#
# Copyright (c) 2011 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/
#

# norootforbuild


Name:           evince
BuildRequires:  fdupes
BuildRequires:  gcc-c++
BuildRequires:  gconf2-devel
BuildRequires:  gir-repository
BuildRequires:  ghostscript-fonts-std
BuildRequires:  ghostscript-x11
BuildRequires:  gnome-doc-utils-devel
BuildRequires:  gnome-keyring-devel
BuildRequires:  gobject-introspection-devel
BuildRequires:  intltool
BuildRequires:  libdjvulibre-devel
BuildRequires:  libglade2-devel
BuildRequires:  libpoppler-glib-devel
BuildRequires:  libspectre-devel
BuildRequires:  libtiff-devel
BuildRequires:  nautilus-devel
BuildRequires:  t1lib-devel
BuildRequires:  texlive-devel
BuildRequires:  translation-update-upstream
BuildRequires:  update-desktop-files
Version:        2.28.2
Release:        0.<RELEASE6>
Url:            http://www.gnome.org/projects/evince/
Group:          Productivity/Office/Other
License:        GPLv2+
Summary:        GNOME Document Viewer
Source:         ftp://ftp.gnome.org/pub/GNOME/sources/%{name}/0.4/%{name}-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM evince-dvi-vulnerabilities.patch vuntz@opensuse.org -- CVE-2010-2640, CVE-2010-2641, CVE-2010-2642, CVE-2010-2643
Patch0:         evince-dvi-vulnerabilities.patch
# PATCH-FIX-UPSTREAM evince-dvi-vulnerability-again.patch bgo#640923 bnc#671064 vuntz@opensuse.org -- Fix an issue similar to one fixed in evince-dvi-vulnerabilities.patch
Patch1:         evince-dvi-vulnerability-again.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       %{name}-lang = %{version}
# For the comics backend
Suggests:       p7zip
Suggests:       unrar
Suggests:       unzip
# Replaces ggv in <= 10.3, gpdf in <= 10.2:
Provides:       ggv gpdf
Obsoletes:      ggv gpdf
%gconf_schemas_prereq

%description
Evince is a document viewer capable of displaying multiple and
singlepage document formats like PDF and PostScript. For more
information about Evince, visit the project Web site at
http://www.gnome.org/projects/evince/.



Authors:
--------
    copyright 1996-2003 Glyph & Cog, LLC.
    Martin Kretzschmar <m_kretzschmar@gmx.net>
    Marco Pesenti Gritti <marco@gnome.org>
    Jonathan Blandford <jrb@gnome.org>

%package devel
License:        GPLv2+
Summary:        GNOME Document Viewer
Group:          Productivity/Office/Other
Requires:       %{name} = %{version}
Requires:       gtk2-devel
Obsoletes:      evince-doc <= 2.25.4
Provides:       evince-doc = 2.25.4

%description devel
Evince is a document viewer capable of displaying multiple and
singlepage document formats like PDF and PostScript. For more
information about Evince, visit the project Web site at
http://www.gnome.org/projects/evince/.



Authors:
--------
    copyright 1996-2003 Glyph & Cog, LLC.
    Martin Kretzschmar <m_kretzschmar@gmx.net>
    Marco Pesenti Gritti <marco@gnome.org>
    Jonathan Blandford <jrb@gnome.org>

%lang_package
%prep
%setup -q
translation-update-upstream
%patch0 -p1
%patch1 -p1

%build
%configure --disable-static --with-pic\
	--disable-scrollkeeper\
	--enable-djvu\
	--enable-dvi\
	--enable-comics\
	--enable-impress\
	--enable-pixbuf\
	--enable-t1lib\
	--enable-nautilus\
        --enable-introspection
%__make %{?jobs:-j%jobs}

%install
%makeinstall
%find_lang %{name}
%find_gconf_schemas
cat %{name}.schemas_list >%{name}.lst
%suse_update_desktop_file -r -N Evince evince GNOME GTK Graphics Office Viewer
find %{buildroot} -type f -name "*.la" -exec %{__rm} -fv {} +
%fdupes $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%pre -f %{name}.schemas_pre

%posttrans -f %{name}.schemas_posttrans

%preun -f %{name}.schemas_preun

%files -f %{name}.lst
%defattr (-, root, root)
%doc AUTHORS COPYING ChangeLog NEWS README TODO
%{_bindir}/*
%{_datadir}/applications/*.desktop
%{_datadir}/evince
%{_datadir}/icons/hicolor/*/apps/evince*.*
%{_libdir}/nautilus/extensions-*/*.so
%{_libdir}/evince
%{_libdir}/girepository-1.0/*.typelib
%{_datadir}/gir-1.0/*.gir
%{_libdir}/*.so.*
%doc %{_mandir}/man?/*.*

%files lang -f %{name}.lang
%defattr (-, root, root)
%dir %{_datadir}/gnome
%dir %{_datadir}/gnome/help

%files devel
%defattr(-, root, root)
%{_includedir}/evince
%{_libdir}/*.so
%{_libdir}/pkgconfig/evince*.pc
%{_datadir}/gtk-doc/html/evince
%{_datadir}/gtk-doc/html/libevdocument
%{_datadir}/gtk-doc/html/libevview
# Own these repositories to not depend on gtk-doc while building:
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html

%changelog
openSUSE Build Service is sponsored by