Name: speedcrunch
Version: @VERSION@
Release: 0.speedcrunch.org
Vendor: The SpeedCrunch Developers
Group: Applications/Engineering
URL: http://speedcrunch.org
License: GPLv2+
# Not sure if these are normally generated automatically.
Provides: application(), application(speedcrunch.desktop)
Summary: A high-precision scientific calculator

%description
SpeedCrunch is a high-precision scientific calculator. It features a
syntax-highlighted scrollable display and is designed to be fully used via
keyboard. Some distinctive features are auto-completion of functions and
variables, a formula book, and quick insertion of constants from various fields
of knowledge. Available for Windows, OS X, and Linux in a number of languages.

This binary package is provided by speedcrunch.org. It is a generic package
that is designed to install and run on many RPM-based Linux distributions.

%clean

%files
%defattr(-,root,root)
/opt/speedcrunch/speedcrunch
%doc /opt/speedcrunch/README.md
/usr/bin/speedcrunch
/usr/share/applications/speedcrunch.desktop
/usr/share/appdata/speedcrunch.appdata.xml
/usr/share/icons/hicolor/*


# These install-time scripts to update the icon cache are from
# https://fedoraproject.org/wiki/Packaging:Scriptlets#Icon_Cache

%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun
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
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
