aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Pisa <pisa@cmp.felk.cvut.cz>2019-03-31 22:35:46 +0200
committerPavel Pisa <pisa@cmp.felk.cvut.cz>2019-03-31 23:41:51 +0200
commit04ee076f6a0fd1600602dec0f256eac27a0959e3 (patch)
treec0d9e1aff4674f81db56dc72ee27b431b7e75839
parent8e09d9118fefc800a932779b31dabedae9a0b10f (diff)
downloadqtmips-04ee076f6a0fd1600602dec0f256eac27a0959e3.tar.gz
qtmips-04ee076f6a0fd1600602dec0f256eac27a0959e3.tar.bz2
qtmips-04ee076f6a0fd1600602dec0f256eac27a0959e3.zip
Update Suse/Fedora/RedHat packaging files to install icon and desktop file.
Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
-rw-r--r--data/qtmips.desktop4
-rw-r--r--debian/install3
-rw-r--r--qtmips.spec28
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