## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 6; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global appname org.speedcrunch.SpeedCrunch %global commit 3c1b4c18ccb275eb2891f9d8ff36a9205c0f566b %global date 20241202 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global tarballcommit %(c=%{commit}; echo ${c:0:12}) Name: speedcrunch Version: 0.12^%{date}git%{shortcommit} Release: %autorelease License: GPL-2.0-or-later Summary: A fast power user calculator URL: https://bitbucket.org/heldercorreia/%{name} Source0: %{url}/get/%{commit}.tar.bz2#/%{name}-%{tarballcommit}.tar.bz2 # https://bugs.gentoo.org/953885 Patch100: %{name}-0.12-qhash.patch Patch101: %{name}-0.12-qsignalmapper.patch # fixed id, name in qhp keywords section Patch102: %{name}-0.12-manual.patch # workaround missing taskbar icon Patch103: %{name}-0.12-icon.patch BuildRequires: cmake(Qt6Core) BuildRequires: cmake(Qt6Help) BuildRequires: cmake(Qt6Widgets) BuildRequires: cmake BuildRequires: desktop-file-utils BuildRequires: gcc-c++ BuildRequires: libappstream-glib BuildRequires: librsvg2-tools BuildRequires: ninja-build BuildRequires: sed Requires: hicolor-icon-theme %description SpeedCrunch is a fast, high precision and powerful desktop calculator. Among its distinctive features are a scrollable display, up to 50 decimal precisions, unlimited variable storage, intelligent automatic completion full keyboard-friendly and more than 15 built-in math function. %prep %autosetup -n heldercorreia-%{name}-%{tarballcommit} -p1 # fix project version sed -i '/set(speedcrunch_VERSION/c\set(speedcrunch_VERSION "0.12")' src/CMakeLists.txt # regenerate qch and qhc files for lang in en_US de_DE fr_FR es_ES; do $(qtpaths6 --query QT_HOST_LIBEXECS)/qhelpgenerator doc/build_html_embedded/${lang}/manual-${lang}.qhp $(qtpaths6 --query QT_HOST_LIBEXECS)/qhelpgenerator doc/build_html_embedded/${lang}/manual-${lang}.qhcp done %build %cmake \ -S src \ -G Ninja \ -DCMAKE_BUILD_TYPE=Release %cmake_build %install %cmake_install # Install SVG icon install -D -m 0644 -p gfx/%{name}.svg %{buildroot}/%{_datadir}/icons/hicolor/scalable/apps/%{appname}.svg # Create icons on the fly for size in 16 22 24 32 48 64 128 256; do dest=%{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps mkdir -p ${dest} rsvg-convert -w ${size} -h ${size} gfx/%{name}.svg -o ${dest}/%{appname}.png chmod 0644 ${dest}/%{appname}.png touch -r gfx/%{name}.svg ${dest}/%{appname}.png done %check appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/%{appname}.metainfo.xml desktop-file-validate %{buildroot}%{_datadir}/applications/%{appname}.desktop %files %license pkg/COPYING.rtf %doc README.md %{_bindir}/%{name} %{_datadir}/applications/%{appname}.desktop %{_datadir}/icons/hicolor/*/apps/%{appname}.* %{_datadir}/pixmaps/%{appname}.png %{_metainfodir}/%{appname}.metainfo.xml %changelog ## START: Generated by rpmautospec * Sat Nov 15 2025 Vitaly - 0.12^20241202git3c1b4c1-6 - Switched from deprecated qmake to qtpaths for getting full path. * Wed Oct 29 2025 nucleo - 0.12^20241202git3c1b4c1-5 - fixed id, name in qhp keywords section * Wed Oct 29 2025 Yaakov Selkowitz - 0.12^20241202git3c1b4c1-4 - Fix flatpak build * Mon Oct 27 2025 Vitaly - 0.12^20241202git3c1b4c1-3 - Fixed project version and missing taskbar icon. * Sun Oct 26 2025 nucleo - 0.12^20241202git3c1b4c1-2 - workaround empty help * Sun Oct 26 2025 Vitaly - 0.12^20241202git3c1b4c1-1 - Removed forge macro use to fix changelog entries. * Sun Oct 26 2025 Vitaly - 0.12-35 - Converted to forge macro use. * Sun Oct 26 2025 nucleo - 0.12-34.20241202git3c1b4c18ccb2 - Qt6-based 20241202 snapshot * Fri Jul 25 2025 Fedora Release Engineering - 0.12-33 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild * Thu Jul 17 2025 Vitaly - 0.12-32 - Fixed compatibility with CMake 4. Fixes rhbz#2381460. * Sun Jan 19 2025 Fedora Release Engineering - 0.12-22 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild ## END: Generated by rpmautospec