File mingw64-gnumeric.spec of Package mingw64-gnumeric
#
# spec file for package mingw64-gnumeric
#
# 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/
#
Name: mingw64-gnumeric
Version: 1.10.17
Release: 0
Summary: Spreadsheet Application
License: GPL-2.0-or-later
Group: Development/Libraries
Url: http://projects.gnome.org/gnumeric/
Source: ftp://ftp.gnome.org/pub/gnome/sources/gnumeric/1.10/gnumeric-%{version}.tar.bz2
Patch0: gnumeric-1.10.15-windows.patch
Patch1: gnumeric-1.10.2-destdir.patch
Patch2: gnumeric-1.10.7-add_dbhh.patch
Patch3: gnumeric-1.10.17-hhx.patch
Patch4: gnumeric-1.10.17-nosrcdir.patch
Patch5: gnumeric-1.10.17-gcc6.patch
#!BuildIgnore: post-build-checks
BuildRequires: autoconf
BuildRequires: automake
# Native version to regenerate the parser.c
BuildRequires: bison
# Native version for the documentation
BuildRequires: docbook-xsl-stylesheets
BuildRequires: flex
# Native version for glib-genmarshal
BuildRequires: glib2-devel
BuildRequires: gnome-common
BuildRequires: gtk-doc
BuildRequires: intltool
BuildRequires: libtool
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
BuildRequires: mingw64-glib2-devel
BuildRequires: mingw64-goffice-devel >= 0.8.10
BuildRequires: mingw64-gtk2-devel
BuildRequires: mingw64-libgsf-devel
BuildRequires: mingw64-libxml2-devel
BuildRequires: mingw64-pango-devel
BuildRequires: mingw64-psiconv-devel
BuildRequires: perl-HTML-Parser
Requires: %{name}-lang
%_mingw64_package_header_debug
BuildArch: noarch
# Native version for gdk-pixbuf-csource
%if 0%{?suse_version} >= 1140
BuildRequires: gdk-pixbuf-devel
%else
BuildRequires: gtk2-devel
%endif
%description
Gnumeric is a spreadsheet application with advanced features and analytics. The goal of
Gnumeric is to be the best possible spreadsheet. We are not attempting to clone existing
applications. However, Gnumeric can read files saved with other spreadsheets and we offer
a customizable feel that attempts to minimize the costs of transition.
In addition to read and write support for all versions of Microsoft Excel (including
reading encrypted files), there is also support for many other formats. Text formats,
such as comma or tab separated values, HTML, XHTML, and Latex, are supported and there are
powerful assistants to handle custom needs.
Gnumeric is part of the GNOME project.
%package devel
Summary: Spreadsheet Application (development files)
Group: Development/Libraries
%description devel
Gnumeric is a spreadsheet application with advanced features and analytics. The goal of
Gnumeric is to be the best possible spreadsheet. We are not attempting to clone existing
applications. However, Gnumeric can read files saved with other spreadsheets and we offer
a customizable feel that attempts to minimize the costs of transition.
In addition to read and write support for all versions of Microsoft Excel (including
reading encrypted files), there is also support for many other formats. Text formats,
such as comma or tab separated values, HTML, XHTML, and Latex, are supported and there are
powerful assistants to handle custom needs.
Gnumeric is part of the GNOME project.
%_mingw64_debug_package
%lang_package
%prep
%setup -q -n gnumeric-%{version}
%patch -P 0 -p1 -b .windows
%patch -P 1 -p1 -b .destdir
%patch -P 2 -b .add_dbhh
%patch -P 3 -p1 -b .hhx
%patch -P 4 -p1 -b .nosrcdir
%patch -P 5 -p1 -b .gcc6
chmod +x doc/add_dbhh.pl
%build
libtoolize --force --copy
ACLOCAL_FLAGS="-I %{_mingw64_datadir}/aclocal" \
autoreconf -f -i
echo "lt_cv_deplibs_check_method='pass_all'" >>%{_mingw64_cache}
MINGW64_CFLAGS="%_mingw64_cflags -fcommon"
GDK_PIXBUF_CSOURCE=`which gdk-pixbuf-csource`; export GDK_PIXBUF_CSOURCE; \
GLIB_GENMARSHAL=`which glib-genmarshal`; export GLIB_GENMARSHAL; \
%{_mingw64_configure} \
--enable-shared --disable-static \
--without-perl --without-python \
--disable-schemas-install --disable-scrollkeeper
#We want to regenerate those files during the build
rm -f src/gnm-marshalers.c src/gnm-marshalers.c src/parser.c
#handle-conf-options is not executable, so make it executable
chmod +x tools/handle-conf-options
%{_mingw64_make} %{?_smp_mflags} || %{_mingw64_make}
%install
%{_mingw64_make} DESTDIR=%{buildroot} install
rm -rf %{buildroot}%{_mingw64_libdir}/gnumeric/*/plugins/*/*.dll.a
rm -rf %{buildroot}%{_mingw64_libdir}/goffice/*/plugins/gnumeric/gnumeric.dll.a
%find_lang gnumeric
%find_lang gnumeric-functions gnumeric.lang
%files
%defattr(-,root,root)
%{_mingw64_bindir}/gnumeric.exe
%{_mingw64_bindir}/ssconvert.exe
%{_mingw64_bindir}/ssgrep.exe
%{_mingw64_bindir}/ssindex.exe
%{_mingw64_bindir}/libspreadsheet-*-*-*.dll
%{_mingw64_sysconfdir}/win32/reg/gnumeric-general.reg
%{_mingw64_sysconfdir}/win32/reg/gnumeric-dialogs.hkcu.reg
%{_mingw64_sysconfdir}/win32/reg/gnumeric-general.hkcu.reg
%{_mingw64_sysconfdir}/win32/reg/gnumeric-plugins.hkcu.reg
%{_mingw64_sysconfdir}/win32/reg/gnumeric-plugins.reg
%{_mingw64_sysconfdir}/win32/reg/gnumeric-dialogs.reg
%{_mingw64_libdir}/gnumeric/*/plugins/*/*.dll
%{_mingw64_libdir}/gnumeric/*/plugins/*/*.xml
%{_mingw64_libdir}/goffice/*/plugins/gnumeric/gnumeric.dll
%{_mingw64_libdir}/goffice/*/plugins/gnumeric/plugin.xml
%{_mingw64_datadir}/applications/gnumeric.desktop
%{_mingw64_datadir}/glib-2.0/schemas/org.gnome.gnumeric*.gschema.xml
%{_mingw64_datadir}/gnumeric/*/GNOME_Gnumeric-gtk.xml
%{_mingw64_datadir}/gnumeric/*/Gnumeric-embed.xml
%{_mingw64_datadir}/gnumeric/*/autoformat-templates/*/.category
%{_mingw64_datadir}/gnumeric/*/autoformat-templates/*/*.xml
%{_mingw64_datadir}/gnumeric/*/templates/*.gnumeric
%{_mingw64_datadir}/gnumeric/*/ui/*.ui
%{_mingw64_datadir}/icons/hicolor/*/apps/gnumeric.png
%{_mingw64_datadir}/icons/hicolor/scalable/apps/gnumeric.svg
%{_mingw64_mandir}/man1/gnumeric.1*
%{_mingw64_mandir}/man1/ssconvert.1*
%{_mingw64_mandir}/man1/ssgrep.1*
%{_mingw64_mandir}/man1/ssindex.1*
%{_mingw64_datadir}/pixmaps/*.png
%{_mingw64_datadir}/pixmaps/gnumeric/*.png
%{_mingw64_datadir}/pixmaps/gnumeric/win32-gnumeric.ico
%{_mingw64_datadir}/pixmaps/win32-gnumeric.ico
%files lang -f gnumeric.lang
%defattr(-,root,root)
%files devel
%defattr(-,root,root)
%{_mingw64_includedir}/libspreadsheet-1.10/spreadsheet
%{_mingw64_libdir}/libspreadsheet.dll.a
%{_mingw64_libdir}/pkgconfig/libspreadsheet-1.10.pc
%changelog