Let's add more DESKTOP_ENTRIES to our ports

Anonymous swell.k at gmail.com
Fri Aug 21 04:24:36 UTC 2009


Dmitry Marakasov <amdmi3 at amdmi3.ru> writes:

> To make adding DESKTOP_ENTRIES simple and fun, here's a script called
> "de" which outputs a template for desktop entry when run from port's
> directory:
>
> --- de begins here ---
> #!/bin/sh
>
> echo "DESKTOP_ENTRIES=\"`make -V PORTNAME`\" \\"
> echo "		\"`make -V COMMENT`\" \\"
> echo "		\"\${DATADIR}/\" \\"
> echo "		\"`make -V PORTNAME`\" \\"
> echo "		\"`make -V CATEGORIES | tr ' ' ';' | sed 's|$|;|' | sed 's|games|game|'`\" \\"
> echo "		false"
> --- de ends here ---

Don't you need to run update-desktop-database during post-install?
It's not like using DESKTOPDIR or DESKTOP_ENTRIES adds appropriate
@exec/@unexec in plist for you.

>
> if you use vim, just type !!de while editing port's makefile, and
> it'll add template for you, which will require only a little editing:
>
> - change app name in the first line for proper spacing and case
>   (i.e. brainworkshop -> Brain Workshop)

> - possibly simplify description in the second line (while leaving it
>   equal to COMMENT is generally good enough)

> - Change icon path (some ports install icons into ${DATADIR},

I think such ports should be fixed to install icons into share/pixmaps.

>   some (this likely only applies to games) have graphic sprites
>   useable as icons, for others just list leave "" = no icon.

Can I use icons from dependency ports for ports that don't have icons
themselves, e.g. icons from audio/xmms2 for audio/gx2osd?

    share/pixmaps/xmms2-128.png
    share/pixmaps/xmms2-16.png
    share/pixmaps/xmms2-32.png
    share/pixmaps/xmms2-48.png
    share/pixmaps/xmms2-black-on-white.svg
    share/pixmaps/xmms2-white-on-black.svg
    share/pixmaps/xmms2.svg

DESKTOP_ENTRIES="gx2osd" \
		"On-screen display of current playing song for XMMS2" \
		"xmms2" \
		"gx2osd" \
		"Audio;Player;" \
		false

> - Fix categories. Full list here:
>   http://standards.freedesktop.org/menu-spec/latest/apa.html


More information about the freebsd-ports mailing list