From 04ee076f6a0fd1600602dec0f256eac27a0959e3 Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Sun, 31 Mar 2019 22:35:46 +0200 Subject: Update Suse/Fedora/RedHat packaging files to install icon and desktop file. Signed-off-by: Pavel Pisa --- data/qtmips.desktop | 4 ++-- debian/install | 3 ++- qtmips.spec | 28 +++++++++++++++++++++++++++- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/data/qtmips.desktop b/data/qtmips.desktop index cb71bde..88cdf34 100644 --- a/data/qtmips.desktop +++ b/data/qtmips.desktop @@ -2,8 +2,8 @@ Name=qtmips GenericName=Qt Mips emulator Exec=qtmips_gui -Icon=qtmips +Icon=qtmips_gui Type=Application Comment=Qt Mips emulator Terminal=false -Categories=Qt;Development +Categories=System;Emulator; diff --git a/debian/install b/debian/install index 0a3c9b0..b439d8f 100644 --- a/debian/install +++ b/debian/install @@ -1,4 +1,5 @@ qtmips_gui/qtmips_gui /usr/bin qtmips_cli/qtmips_cli /usr/bin data/qtmips.desktop usr/share/applications - +data/icons/qtmips_gui.svg /usr/share/icons/hicolor/scalable/apps +data/icons/qtmips_gui.png /usr/share/icons/hicolor/48x48/apps diff --git a/qtmips.spec b/qtmips.spec index d7f0f0c..5ad13c7 100644 --- a/qtmips.spec +++ b/qtmips.spec @@ -35,10 +35,12 @@ BuildRequires: pkgconfig(Qt5Test) %if ! 0%{?suse_version} BuildRequires: pkgconfig(libelf) +BuildRequires: desktop-file-utils %endif %if 0%{?suse_version} -BuildRequires: libelf-devel +BuildRequires: libelf-devel +BuildRequires: update-desktop-files %endif %if !0%{?suse_version} @@ -61,10 +63,34 @@ make mkdir -p %{buildroot}/%{_bindir} install -m755 qtmips_gui/qtmips_gui %{buildroot}/%{_bindir} install -m755 qtmips_cli/qtmips_cli %{buildroot}/%{_bindir} +mkdir -p %{buildroot}/%{_datadir}/icons/hicolor/48x48/apps +install -m644 data/icons/qtmips_gui.png %{buildroot}/%{_datadir}/icons/hicolor/48x48/apps +mkdir -p %{buildroot}/%{_datadir}/icons/hicolor/scalable/apps +install -m644 data/icons/qtmips_gui.svg %{buildroot}/%{_datadir}/icons/hicolor/scalable/apps + +#desktop icon +%if 0%{?suse_version} +install -m755 -d %{buildroot}%{_datadir}/applications +install -m644 data/qtmips.desktop %{buildroot}%{_datadir}/applications +%suse_update_desktop_file -r -i qtmips 'System Emulator' +%endif + +%if 0%{?fedora} || 0%{?rhel} || 0%{?centos} +desktop-file-install --dir=%{buildroot}%{_datadir}/applications data/qtmips.desktop +desktop-file-validate %{buildroot}%{_datadir}/applications/qtmips.desktop +%endif %files %{_bindir}/qtmips_gui %{_bindir}/qtmips_cli +%{_datadir}/applications/qtmips.desktop +%dir %{_datadir}/icons/hicolor +%dir %{_datadir}/icons/hicolor/48x48 +%dir %{_datadir}/icons/hicolor/48x48/apps +%{_datadir}/icons/hicolor/48x48/apps/qtmips_gui.png +%dir %{_datadir}/icons/hicolor/scalable +%dir %{_datadir}/icons/hicolor/scalable/apps +%{_datadir}/icons/hicolor/scalable/apps/qtmips_gui.svg %license LICENSE %doc README.md -- cgit v1.2.3