A package should provide a menu file /usr/lib/menu/<package-name> that contains information about each program it likes to make available in the menus.
Here is an example to describe the syntax of such a file:
?package(gnuplot):\ specifies what packages need to be installed needs=text\ what kind of terminal this command expects needs=X11: if this program runs only on X11 needs=text: if it only runs on text terminals (the window manager should spawn an xterm or rxvt in this case) needs=vc: runs only at linux console needs=wm: this starts another window manager section=Apps/Math\ in what section this menu entry should be title="Gnuplot"\ the title of the menu entry (please make it short!) command="/usr/bin/gnuplot" the command to run.
A program like gnuplot which can be run on X11 as well as on a text terminal
should not have an extra entry with needs=X11 because it
will then be next to impossible to configure the window managers to spawn
rxvt
instead of the default xterm
.
On the other hand, if a program (like emacs
) can be run as real X
application as well as in a terminal, two entries should be listed, otherwise
the program will always be run in an xterm
(or rxvt
).
In the menu entry files, you can use "#" as comment (like in shell scripts).
You should add a line like this to your postinst script
if test -x /usr/bin/update-menus; then update-menus; fi
and the postrm script should get the line
if test -x /usr/bin/update-menus; then update-menus; fi
(that is, the same line in postinst and in postrm).
Here is the authoritative list of Debian's menu structure. If you
have a package which does not fit in here or if you have any suggestions how to
improve this structure, please send an email to the maintainer of the
menu package, Joost Witteveen joostje@debian.org
. If you have
more general remarks about restructuring the menu tree (or adding an entry that
may require discussion), the best thing to do is to go to
debian-policy, and start a discussion there. I (Joost) will
without hesitation change the structure of the menu-tree if a decision was
reached on debian-policy, but I'm very reluctant to changes without prior
discussion.
Please do not put your packages into any other sections without asking for permission first!
Apps - normal apps Editors - editors (run it in xterm, if nothing else) Emulators - dosemu, etc. Graphics - xpaint, xfig, xtiff, etc. Hamradio - Anything relating to ham radio. Math - gnuplot, octave, oleo, etc. Net - mail, news, web, irc, etc.