%define app_id io.github.wxmaxima_developers.wxMaxima %global common_desc \ A Graphical user interface for the computer algebra system \ Maxima using wxWidgets. %if 0%{?rhel} && 0%{?rhel} <= 7 %bcond_with gtk2 %else %bcond_without gtk2 %endif %if %{with gtk2} %define wx_configs wx-config-3.0-gtk2 wx-config-3.0 %else %define wx_configs wx-config-3.0 %endif # trim changelog included in binary rpms %global _changelog_trimtime %(date +%s -d "1 year ago") %define dir_appdata metainfo %if 0%{?rhel}%{?fedora} %if 0%{?rhel} %if 0%{?rhel} <= 7 %define dir_appdata appdata %endif %endif %endif %if 0%{!?_metainfodir:1} %define _metainfodir %{_datadir}/%{dir_appdata} %endif %define dir_metainfo %( echo "%{_metainfodir}" | xargs -I{} basename '{}' ) Name: wxMaxima Version: 19.08.1 Release: 1%{?dist} Group: Applications/Engineering License: GPLv2+ URL: https://wxmaxima-developers.github.io/wxmaxima/ Summary: Graphical user interface for Maxima Source0: https://github.com/wxMaxima-developers/wxmaxima/archive/Version-%{version}.tar.gz # match archs maxima uses ExclusiveArch: %{arm} %{ix86} x86_64 aarch64 ppc sparcv9 BuildRequires: dos2unix BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: cmake3 BuildRequires: desktop-file-utils BuildRequires: doxygen BuildRequires: gettext BuildRequires: GraphicsMagick BuildRequires: libappstream-glib BuildRequires: libxml2-devel %if %{with gtk2} BuildRequires: compat-wxGTK3-gtk2-devel %endif BuildRequires: wxGTK3-devel BuildRequires: xmlstarlet %if %{with gtk2} Requires: %{name}-gtk2%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} %endif Requires: %{name}-gtk3%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} Obsoletes: %{name} < 19.04.3-2 %description %common_desc %package common Group: Applications/Engineering Summary: Common files for %{name} BuildArch: noarch Requires: jsmath-fonts Requires: maxima >= 5.30 Requires: wxmaxima = %{?epoch:%{epoch}:}%{version}-%{release} Conflicts: %{name} < 19.04.3-2 %description common %common_desc This package consists of files used by other %{name} packages. %if %{with gtk2} %package gtk2 Group: Applications/Engineering Summary: A Gtk+2 front-end to maxima Requires: %{name}-common = %{?epoch:%{epoch}:}%{version}-%{release} Conflicts: %{name} < 19.04.3-2 Provides: wxmaxima = %{?epoch:%{epoch}:}%{version}-%{release} %if "%{?_isa}" != "" Provides: wxmaxima%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} %endif Requires(post): %{_sbindir}/update-alternatives Requires(postun): %{_sbindir}/update-alternatives %description gtk2 %common_desc This package contains the Gtk+2 front-end. %endif %package gtk3 Group: Applications/Engineering Summary: A Gtk+3 front-end to maxima Requires: %{name}-common = %{?epoch:%{epoch}:}%{version}-%{release} Conflicts: %{name} < 19.04.3-2 Provides: wxmaxima = %{?epoch:%{epoch}:}%{version}-%{release} %if "%{?_isa}" != "" Provides: wxmaxima%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release} %endif %if ! %{with gtk2} Obsoletes: %{name}-gtk2 < %{version}-%{release} %endif Requires(post): %{_sbindir}/update-alternatives Requires(postun): %{_sbindir}/update-alternatives %description gtk3 %common_desc This package contains the Gtk+3 front-end. %prep %autosetup -n "wxmaxima-Version-%{version}" -p1 %build for wx in %{wx_configs}; do export WX_CONFIG="${wx}" mkdir -p "${wx}/%{_target_platform}" pushd "${wx}/%{_target_platform}" %cmake3 "../.." popd %make_build -C "${wx}/%{_target_platform}" done %install for wx in %{wx_configs}; do make install/fast DESTDIR="%{buildroot}" -C "${wx}/%{_target_platform}" if [[ "${wx}" == "wx-config-3.0-gtk2" ]]; then mv "%{buildroot}%{_bindir}/wxmaxima" "%{buildroot}%{_bindir}/wxmaxima-gtk2" else mv "%{buildroot}%{_bindir}/wxmaxima" "%{buildroot}%{_bindir}/wxmaxima-gtk3" fi done touch "%{buildroot}%{_bindir}/wxmaxima" # app icon mkdir -p "%{buildroot}%{_datadir}/icons/hicolor"/{scalable,48x48,64x64,128x128}/apps/ cp -alf \ "%{buildroot}%{_datadir}/pixmaps/%{app_id}.svg" \ "%{buildroot}%{_datadir}/icons/hicolor/scalable/apps/" cp -alf \ "%{buildroot}%{_datadir}/pixmaps/%{app_id}.png" \ "%{buildroot}%{_datadir}/icons/hicolor/128x128/apps/" gm convert -resize 64x64 \ "%{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{app_id}.png" \ "%{buildroot}%{_datadir}/icons/hicolor/64x64/apps/%{app_id}.png" gm convert -resize 48x48 \ "%{buildroot}%{_datadir}/icons/hicolor/128x128/apps/%{app_id}.png" \ "%{buildroot}%{_datadir}/icons/hicolor/48x48/apps/%{app_id}.png" # mime icons mkdir -p "%{buildroot}%{_datadir}/icons/hicolor/scalable/mimetypes/" cp -alf "%{buildroot}%{_datadir}/pixmaps/"text-x-wx*.svg "%{buildroot}%{_datadir}/icons/hicolor/scalable/mimetypes/" %find_lang "wxMaxima" # Unpackaged files rm -fv "%{buildroot}%{_datadir}/wxMaxima"/{COPYING,README} rm -rfv "%{buildroot}%{_datadir}/pixmaps/" rm -rfv "%{buildroot}%{_datadir}/menu" %if "%{dir_metainfo}" != "metainfo" [[ -f "%{buildroot}%{_metainfodir}" ]] || mv "%{buildroot}%{_datadir}/metainfo" "%{buildroot}%{_metainfodir}" %endif %check appstream-util validate-relax --nonet "%{buildroot}%{_metainfodir}/%{app_id}.appdata.xml" desktop-file-validate "%{buildroot}%{_datadir}/applications/%{app_id}.desktop" %post common touch --no-create "%{_datadir}/icons/hicolor" &> /dev/null || : %postun common if [[ "${1}" -eq "0" ]]; then touch --no-create "%{_datadir}/icons/hicolor" &> /dev/null gtk-update-icon-cache "%{_datadir}/icons/hicolor" &> /dev/null || : update-desktop-database -q &> /dev/null || : touch --no-create "%{_datadir}/mime/packages" &> /dev/null || : update-mime-database %{?fedora:-n} "%{_datadir}/mime" &> /dev/null || : fi %posttrans common gtk-update-icon-cache "%{_datadir}/icons/hicolor" &> /dev/null || : update-desktop-database -q &> /dev/null || : update-mime-database %{?fedora:-n} "%{_datadir}/mime" &> /dev/null || : %if %{with gtk2} %post gtk2 if [[ -f "%{_bindir}/wxmaxima" && ! -h "%{_bindir}/wxmaxima" ]]; then rm -rf "%{_bindir}/wxmaxima" fi update-alternatives --install "%{_bindir}/wxmaxima" "%{name}" "%{_bindir}/wxmaxima-gtk2" 1000 %endif %post gtk3 if [[ -f "%{_bindir}/wxmaxima" && ! -h "%{_bindir}/wxmaxima" ]]; then rm -rf "%{_bindir}/wxmaxima" fi update-alternatives --install "%{_bindir}/wxmaxima" "%{name}" "%{_bindir}/wxmaxima-gtk3" 300 %if %{with gtk2} %postun gtk2 if [[ "${1}" -eq "0" ]]; then update-alternatives --remove "%{name}" "%{_bindir}/wxmaxima-gtk2" fi %endif %postun gtk3 if [[ "${1}" -eq "0" ]]; then update-alternatives --remove "%{name}" "%{_bindir}/wxmaxima-gtk3" fi %files %files common -f wxMaxima.lang %doc AUTHORS ChangeLog README %license COPYING %{_datadir}/wxMaxima/ %{_datadir}/icons/hicolor/*/*/* %{_datadir}/applications/%{app_id}.desktop %{_metainfodir}/%{app_id}.appdata.xml %{_datadir}/bash-completion/completions/wxmaxima %{_datadir}/mime/packages/x-wxmathml.xml %{_datadir}/mime/packages/x-wxmaxima-batch.xml %{_docdir}/wxmaxima/ %{_mandir}/man1/wxmaxima.1* %if %{with gtk2} %files gtk2 %ghost %{_bindir}/wxmaxima %{_bindir}/wxmaxima-gtk2 %endif %files gtk3 %ghost %{_bindir}/wxmaxima %{_bindir}/wxmaxima-gtk3 %changelog * Sat Aug 17 2019 Tomasz Tomasik - 19.08.1-1 - Update to 19.08.1 * Thu Aug 08 2019 Tomasz Tomasik - 19.07.0-1 - Update to 19.07.0 * Sat May 18 2019 Tomasz Tomasik - 19.05.4-3 - Add upstream patches * Sat May 18 2019 Tomasz Tomasik - 19.05.4-2 - Add upstream patches * Sat May 18 2019 Tomasz Tomasik - 19.05.4-1 - Update to 19.05.4 * Mon May 13 2019 Tomasz Tomasik - 19.05.3-1 - Update to 19.05.3 * Thu May 09 2019 Tomasz Tomasik - 19.05.2-1 - Update to 19.05.2 * Sun May 05 2019 Tomasz Tomasik - 19.05.1-1 - Update to 19.05.1 * Sat May 04 2019 Tomasz Tomasik - 19.05.0-1 - Update to 19.05.0 * Tue Apr 30 2019 Tomasz Tomasik - 19.04.3-4 - Add upstream patches * Sat Apr 27 2019 Tomasz Tomasik - 19.04.3-3 - Temporary disable gtk+2 version for EL7 (#1703864) * Sat Apr 27 2019 Tomasz Tomasik - 19.04.3-2 - Provide gtk+2 version * Wed Apr 24 2019 Tomasz Tomasik - 19.04.3-1 - Update to 19.04.3 * Tue Apr 09 2019 Tomasz Tomasik - 19.04.1-1 - Update to 19.04.1 * Tue Mar 12 2019 Tomasz Tomasik - 19.03.1-1 - Update to 19.03.1 * Sun Mar 03 2019 Tomasz Tomasik - 19.03.0-1 - Update to 19.03.0 * Fri Feb 22 2019 Tomasz Tomasik - 19.02.2-1 - Update to 19.02.2 * Mon Feb 18 2019 Tomasz Tomasik - 19.02.1-1 - Update to 19.02.1 * Wed Jan 30 2019 Tomasz Tomasik - 19.02.0-1 - Update to 19.02.0 * Wed Jan 30 2019 Tomasz Tomasik - 19.01.3-1 - Update to 19.01.3 * Thu Jan 24 2019 Tomasz Tomasik - 19.01.2-1 - Update to 19.01.2 * Thu Jan 24 2019 Tomasz Tomasik - 19.01.1-1 - Update to 19.01.1 * Sun Jan 13 2019 Tomasz Tomasik - 19.01.0-1 - Update to 19.01.0 * Sat Dec 29 2018 Tomasz Tomasik - 18.12.0-1.1 - Fix version string * Fri Dec 28 2018 Tomasz Tomasik - 18.12.0-1 - 18.12.0 * Fri Dec 28 2018 Tomasz Tomasik - 18.11.4-1.1 - Rebuilt for EL7 * Mon Nov 26 2018 Rex Dieter - 18.11.4-1 - 18.11.4 * Fri Nov 09 2018 Rex Dieter - 18.10.2-1 - 18.10.2 * Fri Nov 09 2018 Rex Dieter - 18.10.1-1 - 18.10.1 * Wed Sep 26 2018 Rex Dieter - 18.10.0-1 - 18.10.0 - update URL, drop Group * Mon Sep 24 2018 Rex Dieter - 18.02.0-1 - 18.02.0 - drop references to now-absent texinfo content - .spec cosmetics, use %%autosetup %%make_build %%_metainfodir * Sat Jul 14 2018 Fedora Release Engineering - 17.10.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Fri Feb 09 2018 Fedora Release Engineering - 17.10.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Sat Jan 06 2018 Igor Gnatenko - 17.10.1-2 - Remove obsolete scriptlets * Tue Dec 19 2017 Rex Dieter - 17.10.1-1 - 17.10.1 * Sat Oct 21 2017 Rex Dieter - 17.10.0-1 - 17.10.0 * Fri Sep 22 2017 Rex Dieter - 17.05.1-1 - 17.05.1, cmake buildsys * Thu Aug 03 2017 Fedora Release Engineering - 16.04.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 16.04.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 16.04.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Nov 07 2016 Rex Dieter 16.04.2-1 - 16.04.2, update archs to match maxima * Fri Feb 05 2016 Fedora Release Engineering - 15.08.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Mon Sep 14 2015 Rex Dieter 15.08.2-1 - 15.08.2 (#1259888) - wxMaxima: Does not support aarch64 (#926734) * Fri Jun 19 2015 Fedora Release Engineering - 15.04.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat May 16 2015 Rex Dieter 15.04.0-3 - uninstallation refers to files that do not exist (#1222229) * Sat May 16 2015 Rex Dieter 15.04.0-2 - invalid MIME type and no default file association (#1222224) * Fri May 01 2015 Rex Dieter 15.04.0-1 - 15.04.0 * Tue Mar 03 2015 Rex Dieter 14.09.0-3 - rebuild for gcc5 (#1198392) * Thu Oct 16 2014 Karsten Hopp 14.09.0-2 - enable build on ppc64* * Sat Oct 11 2014 Rex Dieter 14.09-1 - 14.09 * Mon Aug 18 2014 Fedora Release Engineering - 13.04.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Sun Jun 08 2014 Fedora Release Engineering - 13.04.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Fri Sep 27 2013 Rex Dieter 13.04.2-1 - 13.04.2 * Sun Aug 04 2013 Fedora Release Engineering - 12.09.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Fri Feb 15 2013 Fedora Release Engineering - 12.09.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Sat Oct 27 2012 Rex Dieter 12.09.0-1 - 12.09.0 * Sat Aug 04 2012 Rex Dieter 12.04.0-1 - 12.04.0 * Sun Jul 22 2012 Fedora Release Engineering - 12.01.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Sun Mar 4 2012 Peter Robinson - 12.01.0-1 - 12.01.0 * Sat Jan 14 2012 Fedora Release Engineering - 11.08.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild * Mon Aug 22 2011 Rex Dieter 11.08.0-1 - 11.08.0 * Thu Feb 10 2011 Rex Dieter 0.8.7-1 - wxMaxima-0.8.7 * Mon Feb 07 2011 Fedora Release Engineering - 0.8.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild * Tue Oct 26 2010 Rex Dieter - 0.8.6-1 - wxMaxima-0.8.6 * Wed Jul 14 2010 Dan HorĂ¡k - 0.8.5-2 - rebuilt against wxGTK-2.8.11-2 * Mon May 10 2010 Rex Dieter - 0.8.5-1 - wxMaxima-0.8.5 * Sun Mar 21 2010 Rex Dieter - 0.8.4-2 - Requires: jsmath-fonts (f12+) * Tue Dec 22 2009 Rex Dieter - 0.8.4-1 - wxMaxima-0.8.4 * Fri Nov 13 2009 Rex Dieter - 0.8.3a-1.1 - Requires: maxima >= 5.19 (#521722) * Sun Oct 25 2009 Rex Dieter - 0.8.3a-1 - wxMaxima-0.8.3a (#530915) * Sat Jul 18 2009 Rex Dieter - 0.8.2-3 - Requires: maxima >= 5.18 * Sat Jul 18 2009 Rex Dieter - 0.8.2-2 - output window of wxMaxima is not visible in RtL locales (#455863) * Mon Jun 29 2009 Rex Dieter - 0.8.2-1 - wxMaxima-0.8.2 * Sat Apr 18 2009 Rex Dieter - 0.8.1-1 - wxMaxima-0.8.1 * Fri Feb 27 2009 Rex Dieter - 0.7.6-3 - ExclusiveArch: s/i386/%%ix86/ * Wed Feb 25 2009 Fedora Release Engineering - 0.7.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Wed Nov 05 2008 Rex Dieter 0.7.6-1 - wxMaxima-0.7.6 * Thu Oct 02 2008 Dennis Gilmore 0.7.5-2 - build sparcv9 * Tue Jun 10 2008 Rex Dieter 0.7.5-1 - wxMaxima-0.7.5 - exclude ppc, f9+ (#448734) * Mon Feb 11 2008 Rex Dieter 0.7.4-3 - respin (gcc43) * Tue Dec 11 2007 Rex Dieter 0.7.4-2 - fix app icon handling/packaging * Fri Dec 07 2007 Rex Dieter 0.7.4-1 - wxMaxima-0.7.4 * Fri Nov 23 2007 Rex Dieter 0.7.3a-1 - wxMaxima-0.7.3a * Fri Oct 17 2007 Rex Dieter 0.7.3-4.1 - inline plotting of wxMaxima doesn't work in f7 (#339161) * Fri Sep 14 2007 Rex Dieter 0.7.3-4 - wxmaxima.desktop: Categories=Development,Math * Sat Aug 11 2007 Rex Dieter 0.7.3-3 - License: GPLv2+ - revert to classic icon scriptlets - respin (BuildID) * Mon Jun 04 2007 Rex Dieter 0.7.2-2 - +ExcludeArch, deployable only where maxima exists * Mon Apr 09 2007 Rex Dieter 0.7.2-1 - wxMaxima-0.7.2 * Mon Apr 09 2007 Rex Dieter 0.7.1-3 - wxMaxima-0.7.1-old_gnuplot.patch (#235155) * Fri Feb 23 2007 Rex Dieter 0.7.1-2 - wxMaxima-0.7.1 - drop upstreamed patches * Mon Dec 18 2006 Rex Dieter 0.7.0a-5 - use xdg-utils in scriptlets * Wed Nov 22 2006 Rex Dieter 0.7.0a-4 - --remove-category=Science;Utility (#215748) * Mon Oct 09 2006 Rex Dieter 0.7.0a-3 - (re)fix typo in %%description * Mon Oct 09 2006 Rex Dieter 0.7.0a-2 - patch for proper maxima= entry in ~/.wxMaxima (#209992) * Mon Sep 25 2006 Rex Dieter 0.7.0a-1 - 0.7.0a - Requires: maxima >= 5.10 * Thu Sep 07 2006 Rex Dieter 0.7.0-3 - fix %%description typo * Tue Sep 05 2006 Rex Dieter 0.7.0-2 - update %%description, %%summary - rename icon -> wxmaxima.png - omit extraneous COPYING, README - .desktop: remove X-Red-Hat* categories * Thu Aug 31 2006 Rex Dieter 0.7.0-1 - 0.7.0 * Mon Aug 28 2006 Rex Dieter 0.6.5-1 - use dfi --add-categories="Math;Science;Education" - follow fdo icon spec - ./configure --enable-dnd --enable-printing - Requires: maxima - 0.6.5 * Wed Dec 15 2004 Andrej Vodopivec - Added french translation files. * Wed Aug 25 2004 Andrej Vodopivec - Initial spec file.