commit f43964b0917578b9ef7c6003f6999c4d3789c022
Author: David Auer <dreua(a)posteo.de>
Date: Sat Feb 19 13:42:54 2022 +0100
(#6108) Install icon to icons/hicolor
Fix hardcoded path in desktop file
Fixes:
https://bugzilla.rpmfusion.org/show_bug.cgi?id=6108
discord.spec | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/discord.spec b/discord.spec
index 4079e8d..aca9ac5 100644
--- a/discord.spec
+++ b/discord.spec
@@ -27,6 +27,7 @@ Requires: libXtst%{_isa} >= 1.2
Requires: libappindicator%{_isa}
Requires: libcxx%{_isa}
Requires: libatomic%{_isa}
+Requires: hicolor-icon-theme
%if !0%{?el7}
Recommends: (libappindicator-gtk3%{_isa} if gtk3%{_isa})
@@ -48,7 +49,7 @@ mkdir -p %{buildroot}/%{_libdir}/discord
mkdir -p %{buildroot}/%{_datadir}/applications
desktop-file-install \
---set-icon=%{_libdir}/discord/discord.png \
+--set-icon=%{name} \
--set-key=Exec --set-value=%{_bindir}/Discord \
--delete-original \
--dir=%{buildroot}/%{_datadir}/applications \
@@ -56,11 +57,17 @@ discord.desktop
cp -r * %{buildroot}/%{_libdir}/discord/
ln -sf ../%{_lib}/discord/Discord %{buildroot}/%{_bindir}/
+install -p -D -m 644 %{name}.png \
+ %{buildroot}%{_datadir}/icons/hicolor/256x256/apps/%{name}.png
+
+%check
+desktop-file-validate %{buildroot}/%{_datadir}/applications/%{name}.desktop
%files
%{_libdir}/discord/
%{_bindir}/Discord
%{_datadir}/applications/discord.desktop
+%{_datadir}/icons/hicolor/*/apps/%{name}.png
%changelog