https://bugzilla.redhat.com/show_bug.cgi?id=1998755
--- Comment #6 from Wen Liang <wenliang(a)redhat.com> ---
For the item2 above, my solution would be:
- Add `BuildRequires: desktop-file-utils` to help ensure the .desktop file
safety and spec-compliance
- the `install` and `file` section should be
```
%install
%cmake_install
mkdir -p $RPM_BUILD_ROOT/usr/share/applications/
cat > $RPM_BUILD_ROOT/usr/share/applications/%{name}.desktop <<'EOF'
[Desktop Entry]
Name=pt2-clone
GenericName=ProTracker 2 clone
Comment=ProTracker 2 clone
Exec=pt2-clone
Icon=pt2-clone # or you can define the full path to the icon file
Terminal=false
Type=Application
Categories=Graphics;
EOF
%files
%{_bindir}/pt2-clone
%{_datadir}/applications/%{name}.desktop
%license LICENSE
```
Then after using the rpmbuild to build the package, you will find that the .rpm
file contains the `pt2-clone.desktop` file
```
[wenliang@localhost x86_64]$ rpm2cpio pt2-clone-1.32-1.fc32.x86_64.rpm | cpio
-tv | grep .desktop
-rw-r--r-- 1 root root 223 Jan 31 12:54
./usr/share/applications/pt2-clone.desktop
```
--
You are receiving this mail because:
You are on the CC list for the bug.
You are always notified about changes to this product and component
https://bugzilla.redhat.com/show_bug.cgi?id=1998755