File mingw64-evince.spec of Package mingw64-evince

#
# spec file for package mingw64-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 run_autogen 1
%define enable_dvi_backend 0
Name:           mingw64-evince
Version:        2.32.0
Release:        0
Summary:        GNOME Document Viewer
License:        GPL-2.0-or-later
Group:          Development/Libraries
Url:            http://www.gnome.org/projects/evince/
Source0:        ftp://ftp.gnome.org/pub/gnome/sources/evince/2.32/evince-%{version}.tar.bz2
Source1000:     %{name}-rpmlintrc
Patch0:         evince-2.32.0-zlib.patch
Patch1:         evince-2.32.0-gmodule.patch
Patch2:         0001-win32-Add-prototype-for-DllMain.patch
Patch3:         evince-2.32.0-windows.patch
Patch100:       0001-comics-Optionally-use-libgsf-for-reading-comics.patch
Patch101:       0001-tiff-Use-TIFFOpenW-on-windows.patch
Patch102:       0001-tiff-backend-use-cairo-for-printing.patch
Patch103:       0001-libview-close-tmpfile-descriptor-before-copying-to-i.patch
Patch104:       0001-pdf-Update-to-poppler-api-changes.patch
Patch105:       0001-libdocument-Check-for-NULL-in-synctex_backward_searc.patch
Patch106:       0001-backends-Fix-several-security-issues-in-the-dvi-back.patch
Patch107:       0001-backends-Fix-another-security-issue-in-the-dvi-backe.patch
Patch108:       0001-document-create_thumbnail_frame-should-return-NULL-w.patch
Patch109:       0001-dvi-Fix-build-for-win64.patch
BuildRequires:  glib2-devel
BuildRequires:  gtk-doc
BuildRequires:  intltool
#!BuildIgnore: post-build-checks
BuildRequires:  mingw64-cairo-devel
BuildRequires:  mingw64-cross-binutils
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  mingw64-cross-pkg-config
BuildRequires:  mingw64-filesystem >= 25
BuildRequires:  mingw64-glib2-devel
BuildRequires:  mingw64-gtk2-devel
BuildRequires:  mingw64-libdjvulibre-devel
BuildRequires:  mingw64-libgsf-devel
BuildRequires:  mingw64-libpoppler-glib-devel
BuildRequires:  mingw64-libspectre-devel
BuildRequires:  mingw64-libtiff-devel
BuildRequires:  mingw64-libxml2-devel
BuildRequires:  mingw64-zlib-devel
Requires:       %{name}-lang
%_mingw64_package_header_debug
BuildArch:      noarch
%{glib2_gsettings_schema_requires}
%if %{enable_dvi_backend}
BuildRequires:  mingw64-texlive-devel
%endif
%if %{run_autogen}
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  gconf2-devel
BuildRequires:  gnome-common
BuildRequires:  gnome-doc-utils-devel
BuildRequires:  libtool
%endif

%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/.

%package devel
Summary:        Development package
Group:          Development/Libraries

%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/.

%_mingw64_debug_package

%lang_package

%prep
%setup -q -n evince-%{version}
%patch -P 0 -p1 -b .zlib
%patch -P 1 -p1 -b .gmodule
%patch -P 2 -p1
%patch -P 3 -p1 -b .windows

%patch -P 100 -p1
%patch -P 101 -p1
%patch -P 102 -p1
%patch -P 103 -p1
%patch -P 104 -p1
%patch -P 105 -p1
%patch -P 106 -p1
%patch -P 107 -p1
%patch -P 108 -p1
%patch -P 109 -p1

%build
%if %{run_autogen}
NOCONFIGURE=1 AUTOMAKE=`which automake` ./autogen.sh
%endif

echo "lt_cv_deplibs_check_method='pass_all'" >>%{_mingw64_cache}
%{_mingw64_configure} \
	--enable-shared --disable-static --disable-compile-warnings

%{_mingw64_make} %{?_smp_mflags} || %{_mingw64_make}

%install

%{_mingw64_make} DESTDIR=%{buildroot} install

rm -f %{buildroot}%{_mingw64_libdir}/evince/3/backends/*.dll.a
rm -f %{buildroot}%{_mingw64_datadir}/applications/evince.desktop

%find_lang evince

%post
%{_bindir}/glib-compile-schemas %{_mingw64_datadir}/glib-2.0/schemas

%postun
if [ $1 -eq 0 ]; then
  %{_bindir}/glib-compile-schemas %{_mingw64_datadir}/glib-2.0/schemas
fi

%files
%defattr(-,root,root)
%{_mingw64_bindir}/evince.exe
%{_mingw64_bindir}/evince-previewer.exe
%{_mingw64_bindir}/evince-thumbnailer.exe
%{_mingw64_bindir}/libevdocument-3.dll
%{_mingw64_bindir}/libevview-3.dll
%{_mingw64_libdir}/evince/3/backends/djvudocument.evince-backend
%{_mingw64_libdir}/evince/3/backends/libdjvudocument.dll
%{_mingw64_libdir}/evince/3/backends/pdfdocument.evince-backend
%{_mingw64_libdir}/evince/3/backends/libpdfdocument.dll
%{_mingw64_libdir}/evince/3/backends/tiffdocument.evince-backend
%{_mingw64_libdir}/evince/3/backends/libtiffdocument.dll
%{_mingw64_libdir}/evince/3/backends/psdocument.evince-backend
%{_mingw64_libdir}/evince/3/backends/libpsdocument.dll
%{_mingw64_libdir}/evince/3/backends/comicsdocument.evince-backend
%{_mingw64_libdir}/evince/3/backends/libcomicsdocument.dll
%if %{enable_dvi_backend}
%{_mingw64_libdir}/evince/3/backends/dvidocument.evince-backend
%{_mingw64_libdir}/evince/3/backends/libdvidocument.dll
%endif
%{_mingw64_libexecdir}/evince-convert-metadata.exe
%{_mingw64_mandir}/man1/evince.1*
%{_mingw64_datadir}/evince/evince-ui.xml
%{_mingw64_datadir}/evince/hand-open.png
%{_mingw64_datadir}/evince/evince-previewer-ui.xml
%{_mingw64_datadir}/evince/evince-toolbar.xml
%{_mingw64_datadir}/evince/icons/hicolor
%{_mingw64_datadir}/icons/hicolor
%{_mingw64_datadir}/GConf/gsettings/evince.convert
%{_mingw64_datadir}/glib-2.0/schemas/org.gnome.Evince.gschema.xml

%files lang -f evince.lang
%defattr(-,root,root)
%if 0%{?suse_version} <= 1100
%{_mingw64_datadir}/omf/evince/evince-*.omf
%endif

%files devel
%defattr(-,root,root)
%{_mingw64_includedir}/evince/2.32
%{_mingw64_libdir}/libevdocument.dll.a
%{_mingw64_libdir}/libevview.dll.a
%{_mingw64_libdir}/pkgconfig/evince-document-2.32.pc
%{_mingw64_libdir}/pkgconfig/evince-view-2.32.pc
%{_mingw64_datadir}/gtk-doc/html/evince
%{_mingw64_datadir}/gtk-doc/html/libevdocument-2.32
%{_mingw64_datadir}/gtk-doc/html/libevview-2.32

%changelog
openSUSE Build Service is sponsored by