I try to create an RPM following many online post but without result.
In the SOURCES folder I have inserted zombiedriver-1.0.tar.gz (with the binary of the <zombiedriver-1.0> app)
In the SPECS folder I have inserted zombiedriver.spec.
you can see in the BUILD- folder the name of the unzipped tar.gz…
Compare it with your %setup -line.
and if the built is complete in the BUILDROOT-folder are the files and location after the rpm is working
–noclean does not clean up the directories after successful build, so I prefer it automatically.
And please use Code Tags for your Terminal Output, its the Line here in the Editor, the # is Code-Tags, use copy/paste for all such things as Kate or Terminal.
Then use the macro to create your desktop file in the %install section
%suse_update_desktop_file -c …
In your %files section you would then have;
%{_datadir}/applications/%{name}.desktop
You also need an icon, so if that’s available, it would be in %{_datadir}/pixmaps/some_icon.png else if using a stock on, would need to look at adding hicolor-icon-theme as well to your build requires.
I’ve tried to add %suse_update_desktop_file in spec file, I’ve tried two examples, but I’ve see same error
%suse_update_desktop_file zombiedriver Science Engineering
/var/tmp/rpm-tmp.B0cjXf: line 30: fg: no job control
errore: Stato d’uscita errato da /var/tmp/rpm-tmp.B0cjXf (%install)
Errori di compilazione RPM:
data non valida in %changelog: Sat May 16 2019 Cognome Nome <email@host.it> 1.0-0
Stato d’uscita errato da /var/tmp/rpm-tmp.B0cjXf (%install)
but, I’ve problem with icon file, if in %suse_update_desktop_file I write “%{name}-%{version}” and in %files I write %{_datadir}/pixmaps/%{name}-%{version}.png, I see an error, because he don’t copy the icon in pixmaps folder. Why? the icon is in the same forlder of binari file.
Another, I’ve install update-desktop-files, but if I put my RPM file in other opensuse system without update-desktop-files, He make the desktop file?
Hi
Since it’s built locally for your use, then shouldn’t be an issue? RPM’s built from binary blobs can’t be distributed on OBS (well you would have to look at getting into non-oss).
Another question., I’ve install update-desktop-files, but if I put my RPM file in other opensuse system without update-desktop-files, He make the desktop file?
Hi
Yes, it’s only a build requirement, the desktop file is now in the rpm you install on another system. If on another system you built from the src rpm, then yes you would need update-desktop-files.