[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Possible patch for Packaging.txt



Hello,

An updated patch is attached.

I've re-written the section on the Debian menu system as well this time, 
explaining how the two systems relate, and placing those two sections 
next to each other. Again, let me know if I've gotten anything wrong.

Thanks,
Christopher Martin


On April 15, 2004 03:28, you wrote:
> Christopher Martin writes:
> > Hello, As was discussed last week, I've added a blurb to
> > kdelibs4-dev's Packaging.txt document, describing some changes that
> > occurred with the move to the freedesktop.org menu spec that might
> > be handy for packagers to know. I've also made a few minor
> > formatting tweaks.
> >
> > I'm just learning as I go, so if anyone spots any misconceptions or
> > outright errors, let me know and I'll revise the patch.
>
> Can you add something about the relation between the KDE menu system
> and the Debian menu system ?  Otherwise, the patch looks fine to me,
> and if you could add the change, I will be committing it unless anyone
> objects.
>
> cheers
> domi
--- Packaging.txt	(revision 99)
+++ Packaging.txt	(working copy)
@@ -21,18 +21,64 @@
 These templates include the bits mentioned in this file.
 
 
-======================
-Debian/KDE Menu System
-======================
-
-When building your package you will most likely end up with a
-debian/menu file for creation of menu entries with the Debian menu
-system.  You need one modification for KDE specific packages, namely
-the use of hints.  If you are unfamiliar with hints you should read up
-on menu and it's features.  For all KDE based apps there needs to be a
-menu tag of hints="KDE".
+===============
+KDE Menu System
+===============
+
+With the release of 3.2, KDE adopted the freedesktop.org desktop entry
+specification for its menu system.  This specification is available at
+http://www.freedesktop.org/Standards/desktop-entry-spec.
+
+In versions of KDE prior to 3.2, a program's .desktop file existed in a
+subdirectory of /usr/share/applnk, where the subdirectory name corresponded to
+the desired submenu of the overall KDE menu.
+
+Now, however, a program's menu entry .desktop file should exist in the
+/usr/share/applications/kde directory, and should fully conform to the
+freedesktop.org specification format.  Note that the KDE submenu in which the
+program's entry will appear is now determined by the values given to the
+Categories key in the .desktop file.  A list of suggested categories is
+provided in the draft freedesktop.org menu specification, available at
+http://www.freedesktop.org/Standards/menu-spec.
+
+Up-to-date upstream source should use the freedesktop.org standard location and
+format.  Presently, .desktop files in /usr/share/applnk and its subdirectories
+are still incorporated into the KDE menu, for the sake of backwards
+compatibility.  However, unless backwards compatibility with pre-3.2 KDE
+releases is explicitly desired, a .desktop file under /usr/share/applnk and/or
+one which does not conform to the freedesktop.org format should be considered
+a bug.
+
+Note that with KDE 3.2, the KDE submenu of entries generated from .desktop
+files in /usr/share/applnk, and its subdirectories, is determined by the values
+of the Categories key in the .desktop file, if that key exists.  If it does
+not, then the KDE submenu of the entry will be determined by the name of the
+/usr/share/applnk subdirectory in which the .desktop file resides.
 
-With that said a typical menu file would look like this:
+
+==================
+Debian Menu System
+==================
+
+Though KDE and GNOME have adopted freedesktop.org standards and thus can share
+a common menu, most other desktop environments and window managers have not,
+nor have most non-KDE and non-GNOME applications.  Thus Debian provides its own
+optional menu system (in the package "menu") that all DEs and WMs can use,
+making all installed applications consistently accessible in all environments
+without configuration.  A KDE application must therefore provide a Debian menu
+entry, in addition to its entry in the native KDE menu system.
+
+The Debian menu is added to by installing a file in /usr/lib/menu with the name
+of the package.  This file contains one or more menu entries describing the one
+or more applications the package provides.
+
+The format of these menu files is described in the Debian menu policy
+document, available at http://www.debian.org/doc/packaging-manuals/menu.html.
+Note that Debian menu entries for KDE applications require the use of the hints
+feature. Specifically, KDE based apps must include the "KDE" hint.  The minimal
+hints line in a the proper menu entry of a KDE application is thus hints="KDE".
+
+A typical menu file would therefore look like this:
 
    ?package(konqueror):\
         needs="x11"\
@@ -41,6 +87,20 @@
         hints="KDE,Web browsers"\
         title="Konqueror"\
         command="kfmclient openProfile webbrowsing"
+						   
+In Debian, versions of KDE prior to 3.2 broke down the various categories of
+the Debian menu, and interspersed these menu entries throughout the KDE menu,
+in subfolders named "Debian".  To avoid the unnecessary and sometimes
+problematic duplication of entries, the Debian menu files of KDE applications
+contained the special "kderemove" tag, signalling KDE to hide the entries
+of applications which it presumably already had an entry for in the native
+KDE menu.
+
+With KDE 3.2, however, the Debian menu hierarchy is taken intact and placed
+into a single submenu of the KDE menu, named "Debian".  This greater separation
+between the KDE and Debian menus means that duplication is unobtrusive, and
+therefore that the "kderemove" tag is no longer required, and should be
+removed if present.
 
 
 =============
@@ -70,10 +130,10 @@
   kdelibs4 (= 4:3.2.1-1), kdelibs-bin (= 4:3.2.1-1), libart-2.0-dev, libarts1-dev (>> 1.2.1), libaudio-dev, libc6-dev, libcupsys2-dev, libfam-dev, libfreetype6-dev, libjpeg62-dev, libmng-dev (>= 1.0.3), libpcre3-dev, libpng12-0-dev, libqt3c102-mt (= 3:3.2.3-2), libqt3-headers (= 3:3.2.3-2), libssl-dev, libxft-dev, libxml2-utils, libxcursor-dev, libxrender-dev, qt3-dev-tools (= 3:3.2.3-2), xlibmesa-gl-dev | libgl-dev, xlibmesa-glu-dev | libglu1-mesa-dev | libglu-dev, xlibs-dev (>= 4.2.1), zlib1g-dev
 
 99% of the time that will more than cover a KDE app.  There will of course
-be specific stuff you'll need to add....for example knetfilter requires iptables
-to be installed in order for it to build...kdemultimedia requires ncurses, 
-slang and other things to build.  Either way you should make sure you get them
-all.
+be specific stuff you'll need to add.  For example, knetfilter requires
+iptables to be installed in order for it to build, while kdemultimedia requires
+ncurses, slang and other things to build.  Either way you should make sure you
+get them all.
 
 
 ===========
@@ -82,9 +142,9 @@
 
     If your KDE based app uses the kde-common stuff you'll have a admin/
 subdir which if it's recent will contain a debianrules perl script.
-The current version of it does very little. The biggest job it has is
+The current version of it does very little.  The biggest job it has is
 to make sure that all the KDE variables are set properly for
-build...this includes a configure line.
+build; this includes a configure line.
 
 With the code in the rules file of the kde dh-make template, you can
 see we create a file called debian/debiandirs which contains all the
@@ -125,7 +185,7 @@
 ==================
 
 If there's something I'm missing from this document (and I'm sure there is)
-please send mail off to debian-kde@lists.debian.org and I'll get it added
+please send mail off to debian-qt-kde@lists.debian.org and I'll get it added
 for future releases.  I'd like it if this could answer 99% of the questions
 one might have about packaging up a KDE based app for Debian.
 

Reply to: