# vim: syntax=spec # git_dir_name returns repository name derived from remote Git repository URL Name: tpm2_algtest_ui # git_dir_version returns version based on commit and tag history of the Git project Version: 0.5.4 Release: 1%{?dist} Summary: GUI/TUI for tpm2-algtest License: GPL URL: https://github.com/danzatt/tpm2-algtest-ui VCS: git+https://github.com/danzatt/tpm2_algtest_ui.git#a57fe1959ca71d1ea01dfbbba82d4d0bcc882933: Source: tpm2_algtest_ui-a57fe195.tar.gz Requires: tpm2-tools python3-yui tpm2-algtest python3-requests BuildArch: noarch %description GUI/TUI for tpm2-algtest %global debug_package %{nil} %prep %setup -T -b 0 -q -n tpm2_algtest_ui %build %install mkdir -p %{buildroot}/usr/bin/ cp tpm2-algtest-ui.py %{buildroot}/usr/bin/tpm2-algtest-ui chmod +x %{buildroot}/usr/bin/tpm2-algtest-ui mkdir -p %{buildroot}/%{_datadir}/icons/hicolor/scalable/apps/ cp res/tpm2-algtest.svg %{buildroot}/%{_datadir}/icons/hicolor/scalable/apps/ mkdir -p %{buildroot}/%{_datadir}/applications/ echo "Icon=%{_datadir}/icons/hicolor/scalable/apps/tpm2-algtest.svg" >> res/tpm2-algtest-ui.desktop cp res/tpm2-algtest-ui.desktop %{buildroot}/%{_datadir}/applications/ cp -r res/icons %{buildroot}/%{_datadir}/ # files included in the RPM %files /usr/bin/tpm2-algtest-ui %{_datadir}/icons/ %{_datadir}/applications/tpm2-algtest-ui.desktop %post touch --no-create %{_datadir}/icons/hicolor || : if [ -x %{_bindir}/gtk-update-icon-cache ] ; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : fi desktop-file-install %{_datadir}/applications/tpm2-algtest-ui.desktop %postun touch --no-create %{_datadir}/icons/hicolor || : if [ -x %{_bindir}/gtk-update-icon-cache ] ; then %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || : fi desktop-file-install %{_datadir}/applications/tpm2-algtest-ui.desktop