[Slackbuilds-users] Proper Method to Categorize Desktop Apps
Konrad J Hambrick
kjhambrick at gmail.com
Sun May 1 09:58:47 UTC 2022
On Sat, Apr 30, 2022 at 4:11 PM Dave Woodfall <dave at slackbuilds.org> wrote:
> On 30/04/22 15:23,
> Konrad J Hambrick <kjhambrick at gmail.com> put forth the proposition:
> > All --
> > Been playing with the OTB.SlackBuild and OTB Version 8.0.0
> > I am getting clean builds and the program works as expected.
> > `sbolint` returns no errors or warnings, but when I run
> > sbopkglint /tmp/OTB-8.0.0-x86_64-1_SBo.tgz I get a hint:
> > Running test: 35-desktop...usr/share/applications/monteverdi.desktop:
> > value "Education;Science;ImageProcessing;Geography;Qt;" for key
> > "Categories" in group "Desktop Entry" contains more than one main
> > application might appear more than once in the application menu
> > OK
> > Otherwise, all tests are OK
> > Note that sbopkglint returns the same hint on the OTB Version 7.3.0
> > Package file.
> > There is a doinst.sh script that I took from the Version 7.3 SlackBuild (
> > below by sig )
> > What is the proper way to set up a Desktop App in an SBo ?
> > Thanks.
> You need to decide which menu category the application should be in,
> then edit the .desktop to match.
> > value "Education;Science;ImageProcessing;Geography;Qt;"
> From the description, I'd say ImageProcessing.
> OTB.desktop file is installed by the application so the usual way is
> to sed the file somewhere after the make install.
Well now ...
There's a lot to know before a .desktop file will pass
I ended up spending more time than I had to spend here:
and the specific info about Desktop Categories is here:
I ended up with the if-block below my sig ...
Note that the monteverdi app ends up all by itself under the 'Science and
Desktop Menu Category.
But now the package passes sbopkglint without Errors, Warnings or Hints.
Thanks for the feedback Dave and B. Watson !
Question: is there a better way ( or a recommended way ) to enter long,
lists of text like NEW_CAT in the code snippet below ?
Note that many other SBo Packages also fail `desktop-file-validate` so
maybe this was
all a fools-errand :)
# ------------------- cut here -----------------
# default Categories=Education;Science;ImageProcessing;Geography;Qt;
# in build/monteverdi.desktop annoys sbopkglint try this instead ...
# see: https://specifications.freedesktop.org/menu-spec/latest/apa.html
if [ "$MONTEVERDI" = "ON" ] ; then
sed -i -e "s/^Categories=.*$/Categories=$NEW_CAT/" \
# ------------------- cut there -----------------
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SlackBuilds-users