## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 5; 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 Name: convertall Version: 0.8.0 Release: %autorelease Summary: Unit converter License: GPL-2.0-or-later URL: https://bellz.org/ConvertAll-py/ Source: https://github.com/doug-101/ConvertAll-py/releases/download/v%{version}/convertall-%{version}.tar.gz # use XDG_CONFIG_HOME Patch: xdg-config.patch # upstream patches post 0.8.0 Patch: 0001-tweak-unit-data-formulas-to-work-better-with-dart-fl.patch Patch: 0003-added-units-teenth-Bohr-radius-kip-dunam-MGD-MLD-mm-.patch BuildRequires: desktop-file-utils BuildRequires: libappstream-glib BuildRequires: python3-devel BuildRequires: %{py3_dist pyqt5} Requires: hicolor-icon-theme Requires: python3 Requires: %{py3_dist pyqt5} BuildArch: noarch %description With ConvertAll, you can combine the units any way you want. If you want to convert from inches per decade, that's fine. Or from meter-pounds. Or from cubic nautical miles. The units don't have to make sense to anyone else. %prep %autosetup -n ConvertAll -p1 %build %install ./install.py \ -b %{buildroot} \ -d %{_docdir}/%{name} \ -i %{_datadir}/%{name}/icons \ -p %{_prefix} %py_byte_compile %{python3} %{buildroot}%{_datadir}/%{name} # desktop files install -D -m0644 icons/%{name}_sm.png %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/%{name}-icon.png install -D -m0644 icons/%{name}_med.png %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/%{name}-icon.png install -D -m0644 icons/%{name}_lg.png %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/%{name}-icon.png mkdir -p %{buildroot}%{_metainfodir} cat > %{buildroot}%{_metainfodir}/%{name}.appdata.xml < com.bellz.ConvertAll CC0-1.0 GPL-2.0-or-later ConvertAll Doug Bell A flexible unit converter https://bellz.org/ConvertAll-py/ https://github.com/doug-101/ConvertAll-py/issues

With ConvertAll, you can combine the units any way you want. If you want to convert from inches per decade, that's fine. Or from meter-pounds. Or from cubic nautical miles. The units don't have to make sense to anyone else.

https://bellz.org/ConvertAll-py/convertall.png convertall.desktop
EOF # unwanted files find %{buildroot}%{_docdir}/%{name} -delete rm -f %{buildroot}%{_datadir}/%{name}/%{name}.{pro,spec} rm -f %{buildroot}%{_datadir}/%{name}/translations/{*.ts,qt_*.qm} %find_lang %{name} --with-qt --without-mo %check %{python3} source/convertall.py -q mile^2/hr acre/s # 1.0 mile^2 / hr = 0.17777778 acre / s appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/*.appdata.xml desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop %files -f %{name}.lang %license doc/LICENSE %doc doc/README*.html %{_bindir}/convertall %{_datadir}/applications/convertall.desktop %dir %{_datadir}/%{name} %{_datadir}/%{name}/*.py %{_datadir}/%{name}/__pycache__ %{_datadir}/%{name}/data/ %{_datadir}/%{name}/icons/ %dir %{_datadir}/%{name}/translations %{_datadir}/icons/hicolor/*/apps/%{name}-icon.* %{_metainfodir}/%{name}.appdata.xml %changelog ## START: Generated by rpmautospec * Wed Jan 24 2024 Fedora Release Engineering - 0.8.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Fri Jan 19 2024 Fedora Release Engineering - 0.8.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Tue Nov 28 2023 Yaakov Selkowitz - 0.8.0-3 - Update URLs, import upstream units changes * Wed Jul 19 2023 Fedora Release Engineering - 0.8.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Fri May 05 2023 Yaakov Selkowitz - 0.8.0-1 - Initial build ## END: Generated by rpmautospec