%define support_rarian %{nil} %define support_rarian 1 %define doc_license %{nil} %define doc_license 1 %if 0%{?rhel}%{?fedora} %if 0%{?rhel} %if 0%{?rhel} < 7 %define doc_license 0 %endif %else %if 0%{?fedora} < 19 %define doc_license 0 %endif %endif %else %define doc_license 0 %endif %define backport %{nil} %define backport 0 %if 0%{?rhel}%{?fedora} %if 0%{?rhel} %if 0%{?rhel} <= 7 %define backport 1 %endif %else %if 0%{?fedora} <= 20 %define backport 1 %endif %endif %endif %undefine backport %define license_files COPYING Name: gnumeric Epoch: 1 Version: 1.12.20 Release: 2%{?dist} Summary: Spreadsheet program for GNOME #LGPLv2+: #plugins/gda/plugin-gda.c #plugins/fn-financial/sc-fin.c #plugins/plan-perfect/charset.c #src/widgets/gnumeric-lazy-list.h #GPLv3+: #src/parser.c License: GPLv2+ and GPLv3+ and LGPLv2+ URL: http://projects.gnome.org/gnumeric/ Source: ftp://ftp.gnome.org/pub/GNOME/sources/%{name}/1.12/%{name}-%{version}.tar.xz BuildRequires: bison BuildRequires: desktop-file-utils BuildRequires: docbook-dtds BuildRequires: goffice-devel >= 0.10.28 BuildRequires: intltool BuildRequires: itstool BuildRequires: libgda-ui-devel BuildRequires: perl-devel BuildRequires: perl-generators BuildRequires: perl(ExtUtils::Embed) BuildRequires: perl(Getopt::Long) BuildRequires: perl(IO::Compress::Gzip) BuildRequires: psiconv-devel BuildRequires: pygobject3-devel BuildRequires: pygtk2-devel %if 0%{?support_rarian} BuildRequires: rarian-compat %endif BuildRequires: zlib-devel BuildRequires: libappstream-glib BuildRequires: coreutils findutils bash BuildRequires: sed Requires: hicolor-icon-theme # https://fedoraproject.org/wiki/Packaging:Scriptlets # https://fedoraproject.org/wiki/PackagingDrafts/ScriptletSnippets # gtk-update-icon-cache #Requires(post): gtk-update-icon-cache Requires(postun): gtk-update-icon-cache Requires(posttrans): gtk-update-icon-cache # update-mime-database #Requires(post): shared-mime-info #Requires(postun): shared-mime-info #Requires(posttrans): shared-mime-info # update-desktop-database Requires(post): desktop-file-utils Requires(postun): desktop-file-utils #Requires(posttrans): desktop-file-utils # glib-compile-schemas #Requires(post): glib2 Requires(postun): glib2 Requires(posttrans): glib2 # ldconfig Requires(post): glibc /sbin/ldconfig Requires(postun): glibc /sbin/ldconfig #Requires(posttrans): glibc /sbin/ldconfig %description Gnumeric is a spreadsheet program for the GNOME GUI desktop environment. %package devel Summary: Files necessary to develop gnumeric-based applications Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} %description devel Gnumeric is a spreadsheet program for the GNOME GUI desktop environment. The gnumeric-devel package includes files necessary to develop gnumeric-based applications. %package plugins-extras Summary: Additional plugins for gnumeric Requires: %{name}%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) %description plugins-extras This package contains the following additional plugins for gnumeric: * gda and gnomedb plugins: Database functions for retrieval of data from a database. * perl plugin: This plugin allows writing of plugins in perl %prep %autosetup %{__chmod} -x plugins/excel/rc4.? %if 0%{?backport} # fix libgsf-1 version for file in {configure,configure.ac}; do date_orig="$( stat -c "%Y" "${file}" )" %{__sed} -r -i "s/(libgsf-1[[:blank:]]*>=[[:blank:]]*).*$/\11\.14\.26/" "${file}" touch -d "@${date_orig}" "${file}" done %endif %build #%%configure --disable-silent-rules %configure --enable-ssindex # Don't use rpath! %{__sed} -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' "libtool" %{__sed} -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' "libtool" %{__make} %{?_smp_mflags} %install %make_install # Update the screenshot shown in the software center # # NOTE: It would be *awesome* if this file was pushed upstream. # # See http://people.freedesktop.org/~hughsient/appdata/#screenshots for more details. # appstream-util replace-screenshots $RPM_BUILD_ROOT%{_datadir}/appdata/gnumeric.appdata.xml \ "https://raw.githubusercontent.com/hughsie/fedora-appstream/master/screenshots-extra/gnumeric/Screenshot from 2013-10-10 14:19:50.png" %find_lang "%{name}" --all-name --with-gnome %{__mkdir} -p "${RPM_BUILD_ROOT}%{_datadir}/applications" desktop-file-install --delete-original \ %if (0%{?fedora} && 0%{?fedora} < 19) || (0%{?rhel} && 0%{?rhel} < 7) --vendor fedora \ %endif --dir "${RPM_BUILD_ROOT}%{_datadir}/applications" \ --add-category Office \ --add-category Spreadsheet \ --remove-category Education \ --remove-category Science \ "${RPM_BUILD_ROOT}%{_datadir}/applications"/*.desktop #remove unused mime type icons %{__rm} "${RPM_BUILD_ROOT}/%{_datadir}/pixmaps"/gnome-application-*.png %{__rm} "${RPM_BUILD_ROOT}/%{_datadir}/pixmaps/%{name}"/gnome-application-*.png #remove spurious .ico thing %{__rm} "${RPM_BUILD_ROOT}/usr/share/pixmaps/win32-%{name}.ico" %{__rm} "${RPM_BUILD_ROOT}/usr/share/pixmaps/%{name}/win32-%{name}.ico" #remove .la files find "${RPM_BUILD_ROOT}" -name '*.la' -exec rm -f {} ';' %if 0%{?ldconfig_scriptlets:1} %ldconfig_scriptlets %else %post /sbin/ldconfig /usr/bin/update-desktop-database &> /dev/null || : /bin/touch --no-create "%{_datadir}/icons/hicolor" &>/dev/null || : %postun /sbin/ldconfig if [[ "${1}" -eq "0" ]] ; then glib-compile-schemas "%{_datadir}/glib-2.0/schemas" &> /dev/null || : fi /usr/bin/update-desktop-database &> /dev/null || : if [[ "${1}" -eq "0" ]] ; then /bin/touch --no-create "%{_datadir}/icons/hicolor" &>/dev/null /usr/bin/gtk-update-icon-cache "%{_datadir}/icons/hicolor" &>/dev/null || : fi %posttrans glib-compile-schemas "%{_datadir}/glib-2.0/schemas" &> /dev/null || : /usr/bin/gtk-update-icon-cache "%{_datadir}/icons/hicolor" &>/dev/null || : %endif %files -f "%{name}.lang" %doc HACKING AUTHORS ChangeLog NEWS BUGS README %if 0%{?doc_license} %license %{license_files} %else %doc %{license_files} %endif %{_bindir}/* %{_libdir}/libspreadsheet-%{version}.so %dir %{_libdir}/%{name} %{_libdir}/%{name}/%{version} %exclude %{_libdir}/%{name}/%{version}/plugins/perl-* %exclude %{_libdir}/%{name}/%{version}/plugins/gdaif %exclude %{_libdir}/%{name}/%{version}/plugins/psiconv %{_datadir}/glib-2.0/schemas/org.gnome.gnumeric.* %{_datadir}/pixmaps/%{name} %{_datadir}/icons/hicolor/*/apps/%{name}.png %dir %{_datadir}/%{name} %{_datadir}/%{name}/%{version} %if (0%{?fedora} && 0%{?fedora} < 19) || (0%{?rhel} && 0%{?rhel} < 7) %{_datadir}/applications/fedora-%{name}.desktop %else %{_datadir}/applications/%{name}.desktop %endif %{_datadir}/appdata/%{name}.appdata.xml %if 0%{?support_rarian} # The actual omf file is in gnumeric.lang, but find-lang doesn't own the dir! %dir %{_datadir}/omf/%{name} %endif %{_mandir}/man1/* %files devel %{_libdir}/libspreadsheet.so %{_libdir}/pkgconfig/libspreadsheet-1.12.pc %{_includedir}/libspreadsheet-1.12 %files plugins-extras %{_libdir}/%{name}/%{version}/plugins/perl-* %{_libdir}/%{name}/%{version}/plugins/gdaif %{_libdir}/%{name}/%{version}/plugins/psiconv %{_libdir}/goffice/*/plugins/gnumeric/gnumeric.so %{_libdir}/goffice/*/plugins/gnumeric/plugin.xml %changelog * Tue May 01 2018 Tomasz Tomasik - 1:1.12.20-2 - SPEC file cleanups - Use license macro - Update requirements for EL7 - Rebuilt for EL7 - Backport changes from the "gnumeric-1.12.39-1.fc26.src.rpm" package (Sat Mar 17 2018 Julian Sikorski - 1:1.12.39-1) * Fri Feb 06 2015 Julian Sikorski - 1:1.12.20-1 - Updated to 1.12.20 * Thu Jan 29 2015 Julian Sikorski - 1:1.12.19-1 - Updated to 1.12.19 * Sat Sep 27 2014 Julian Sikorski - 1:1.12.18-1 - Updated to 1.12.18 * Thu Aug 28 2014 Jitka Plesnikova - 1:1.12.17-3 - Perl 5.20 rebuild * Sat Aug 16 2014 Fedora Release Engineering - 1:1.12.17-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Thu Jun 12 2014 Julian Sikorski - 1:1.12.17-1 - Updated to 1.12.17 * Sat Jun 07 2014 Fedora Release Engineering - 1:1.12.16-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Wed May 28 2014 Julian Sikorski - 1:1.12.16-1 - Updated to 1.12.16 * Sun May 04 2014 Julian Sikorski - 1:1.12.15-1 - Updated to 1.12.15 * Mon Apr 21 2014 Julian Sikorski - 1:1.12.14-1 - Updated to 1.12.14 * Fri Mar 21 2014 Julian Sikorski - 1:1.12.13-1 - Updated to 1.12.13 * Mon Mar 17 2014 Julian Sikorski - 1:1.12.12-2 - Fixed crash on strange .xls files (RH #1076912) * Tue Mar 04 2014 Julian Sikorski - 1:1.12.12-1 - Updated to 1.12.12 * Wed Feb 19 2014 Julian Sikorski - 1:1.12.11-1 - Updated to 1.12.11 * Sun Feb 16 2014 Julian Sikorski - 1:1.12.10-1 - Updated to 1.12.10 * Wed Jan 01 2014 Julian Sikorski - 1:1.12.9-1 - Updated to 1.12.9