menu-xdg-0.5/0000755000000000000000000000000011324636426007777 5ustar menu-xdg-0.5/menu-xdg0000644000000000000000000000256410677145331011455 0ustar #!/usr/bin/install-menu # xdg menu spec - menu generation # http://www.freedesktop.org/Standards/menu-spec # Also used as /etc/menu-methods/menu-xdg # Copyright 2004 - Chris Cheney # Licensed under the GNU General Public License, version 2. !include menu.h compat="menu-2" outputencoding="UTF-8"; outputlanguage="C"; function Dirs() = ifempty($section,ifroot( "/var/lib/menu-xdg/applications\n" "/var/lib/menu-xdg/desktop-directories/menu-xdg\n", "" parent(parent(prefix())) "/.local/share/desktop-directories/menu-xdg\n")); function DirEntry() = Dirs() "" title() "\n" "" "debian" replacewith(tolower($section),"/ ","--") ".directory" "\n" "\n" "" "X-Debian" replacewith($section,"/ ","--") "\n" "\n"; supported; x11 = ; text = ; endsupported; startmenu = "\n" DirEntry(); endmenu = "\n"; submenutitle = ""; treewalk = "(M)"; genmenu = "debian-menu.menu"; prerun = "rm -rf " prefix() "/debian-menu.menu"; rootsection = ""; preoutput = "\n\n"; rootprefix = "/var/lib/menu-xdg/menus"; userprefix = ".config/menus"; menu-xdg-0.5/xdg-desktop-entry-spec-dirs0000644000000000000000000000243411324575742015207 0ustar #!/usr/bin/install-menu # xdg desktop entry spec - directory generation # http://www.freedesktop.org/Standards/desktop-entry-spec # Copyright 2004 - Chris Cheney # Licensed under the GNU General Public License, version 2. !include lang.h !include menu.h compat="menu-2" outputencoding="UTF-8"; outputlanguage="C"; function section() = "Name=" title() "\n" forall(sections_translations(),"lang", "Name[" $lang "]=" translate($lang,title()) "\n"); function comment() = "Comment=" $longtitle "\n" forall(sections_translations(),"lang", "Comment[" $lang "]=" translate($lang,$longtitle) "\n"); function DirEntry() = "[Desktop Entry]\n" "Type=Directory\n" "Encoding=UTF-8\n" section() ifnempty($longtitle, comment()) "Icon=" ifelse(icon(),icon(), "debian" replacewith(tolower($section),"/ ","--")) "\n"; supported; x11 = ; text = ; endsupported; startmenu = ""; endmenu = ""; submenutitle = DirEntry(); treewalk = "M"; genmenu = ifempty($command,tolower("debian" replacewith($section,"/ ","--") ".directory")); rootsection = ""; prerun = "rm -rf '" prefix() "'"; removemenu = "rm -rf '" prefix() "'"; preoutput = ""; rootprefix = "/var/lib/menu-xdg/desktop-directories/menu-xdg"; userprefix = ".local/share/desktop-directories/menu-xdg"; menu-xdg-0.5/xdg-desktop-entry-spec-apps0000644000000000000000000000267511324614547015215 0ustar #!/usr/bin/install-menu # xdg desktop entry spec - applications generation # http://www.freedesktop.org/Standards/desktop-entry-spec # Copyright 2004 - Chris Cheney # Licensed under the GNU General Public License, version 2. !include lang.h !include menu.h compat="menu-2" outputencoding="UTF-8"; outputlanguage="C"; function name() = "Name=" title() "\n" forall(sections_translations(),"lang", "Name[" $lang "]=" translate($lang,title()) "\n"); function comment() = "Comment=" $longtitle "\n" forall(sections_translations(),"lang", "Comment[" $lang "]=" translate($lang,$longtitle) "\n"); function AppEntry($terminal) = "[Desktop Entry]\n" "Type=Application\n" "Encoding=UTF-8\n" name() ifnempty($longtitle, comment()) ifnempty($generictitle,"GenericName=" $generictitle "\n") ifnempty(icon(),"Icon=" icon() "\n") "Exec=" $command "\n" "Terminal=" $terminal "\n" "Categories=X-Debian" replacewith($basesection,"/ ","--") ";\n"; supported; x11 = AppEntry("false"); text = AppEntry("true"); endsupported; startmenu = ""; endmenu = ""; submenutitle = ""; treewalk = "M"; genmenu = ifnempty($command,"X-Debian" replacewith($basesection,"/ ","--") "-" tolower(replacewith($title,"/ ","__") ".desktop")); rootsection = ""; prerun = "rm -rf '" prefix() "'"; removemenu = "rm -rf '" prefix() "'"; preoutput = ""; rootprefix = "/var/lib/menu-xdg/applications/menu-xdg"; userprefix = ".local/share/applications/menu-xdg"; menu-xdg-0.5/xdg-desktop-entry-spec-sessions0000644000000000000000000000276611324636313016114 0ustar #!/usr/bin/install-menu # xdg desktop entry spec - sessions generation # http://www.freedesktop.org/Standards/desktop-entry-spec # Copyright 2005 - Bill Allombert # Licensed under the GNU General Public License, version 2 !include lang.h !include menu.h compat="menu-2" outputencoding="UTF-8"; outputlanguage="C"; function has_session() = shell("grep -l -e '^/usr/share/xsessions/' '/var/lib/dpkg/info/" $package ".list' 2>/dev/null"); function name() = "Name=" title() "\n" forall(sections_translations(),"lang", "Name[" $lang "]=" translate($lang,title()) "\n"); function comment() = "Comment=" $longtitle "\n" forall(sections_translations(),"lang", "Comment[" $lang "]=" translate($lang,$longtitle) "\n"); function AppEntry() = "[Desktop Entry]\n" "Encoding=UTF-8\n" "Type=Application\n" name() ifnempty($longtitle, comment()) ifnempty($generictitle, "GenericName=" $generictitle "\n") ifnempty(icon(),"Icon=" icon() "\n") "Exec=" $command "\n" "\n" "[Window Manager]\n" "SessionManaged=true\n"; supported; wm = AppEntry(); endsupported; startmenu = ""; endmenu = ""; submenutitle = ""; treewalk = "M"; genmenu = ifnempty($command,ifempty(has_session(), "X-Debian" replacewith($basesection,"/ ","--") "-" tolower(replacewith($title,"/ ","__") ".desktop"))); rootsection = ""; prerun = "rm -rf '" prefix() "'"; removemenu = "rm -rf '" prefix() "'"; preoutput = ""; rootprefix = "/var/lib/menu-xdg/xsessions"; menu-xdg-0.5/debian/0000755000000000000000000000000011324636426011221 5ustar menu-xdg-0.5/debian/rules0000755000000000000000000000333010410040064012256 0ustar #!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else CFLAGS += -O2 endif ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) INSTALL_PROGRAM += -s endif configure: configure-stamp configure-stamp: dh_testdir # Add here commands to configure the package. touch configure-stamp build: build-stamp build-stamp: configure-stamp dh_testdir # Add here commands to compile the package. #$(MAKE) #/usr/bin/docbook-to-man debian/menu-xdg.sgml > menu-xdg.1 touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp # Add here commands to clean up after the build process. #-$(MAKE) clean dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs # Add here commands to install the package into debian/menu-xdg. #$(MAKE) install DESTDIR=$(CURDIR)/debian/menu-xdg # Build architecture-independent files here. binary-indep: build install dh_testdir dh_testroot dh_installchangelogs dh_installdocs # dh_installexamples dh_install # dh_installmenu # dh_installdebconf # dh_installlogrotate # dh_installemacsen # dh_installpam # dh_installmime # dh_installinit # dh_installcron # dh_installinfo dh_installman dh_link dh_strip dh_compress dh_fixperms # dh_perl # dh_python # dh_makeshlibs dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb # Build architecture-dependent files here. binary-arch: build install # no packages to build binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure menu-xdg-0.5/debian/menu-xdg.links0000644000000000000000000000011110041435045013765 0ustar /var/lib/menu-xdg/menus/debian-menu.menu /etc/xdg/menus/debian-menu.menu menu-xdg-0.5/debian/control0000644000000000000000000000104111324600227012606 0ustar Source: menu-xdg Section: admin Priority: optional Maintainer: Bill Allombert Build-Depends: debhelper (>= 5) Standards-Version: 3.8.3 Package: menu-xdg Architecture: all Depends: ${misc:Depends} Recommends: menu Description: freedesktop.org menu compliant window manager scripts menu-xdg contains menu-methods to convert the Debian menu structure to the freedesktop.org xdg menu structure. . * Base Directory Specification Version 0.6 * Menu Specification Version 0.8 * Desktop Entry Specification Version 0.9.4 menu-xdg-0.5/debian/menu-xdg.postrm0000644000000000000000000000273710407532135014215 0ustar #! /bin/sh # postrm script for menu-xdg # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `purge' # * `upgrade' # * `failed-upgrade' # * `abort-install' # * `abort-install' # * `abort-upgrade' # * `disappear' overwrit>r> # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package menu_spec=/etc/menu-methods/menu-xdg desktop_apps=/etc/menu-methods/xdg-desktop-entry-spec-apps desktop_dirs=/etc/menu-methods/xdg-desktop-entry-spec-dirs desktop_sessions=/etc/menu-methods/xdg-desktop-entry-spec-sessions case "$1" in purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) if [ -f $menu_spec ]; then chmod a-x $menu_spec; fi if [ -f $desktop_apps ]; then chmod a-x $desktop_apps; fi if [ -f $desktop_dirs ]; then chmod a-x $desktop_dirs; fi if [ -f $desktop_sessions ]; then chmod a-x $desktop_sessions; fi if [ -x /usr/bin/update-menus ]; then update-menus ; fi rm -rf /var/lib/menu-xdg ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 menu-xdg-0.5/debian/compat0000644000000000000000000000000211324577107012417 0ustar 5 menu-xdg-0.5/debian/changelog0000644000000000000000000000713111324636376013101 0ustar menu-xdg (0.5) unstable; urgency=low * debian/control, debian/rules: - Bumps Standards-Version to 3.8.3. - Switch to debhelper v5. * xdg-desktop-entry-spec-sessions: - Allow Name and Comment field to be translated. - Do not generate sessions files for packages that provide a file in /usr/share/xsessions. Closes: #489256. Thanks Laurent Bonnaud. * xdg-desktop-entry-spec-apps, xdg-desktop-entry-spec-dirs: - Allow Comment field to be translated. -- Bill Allombert Sun, 17 Jan 2010 12:35:44 +0100 menu-xdg (0.4) unstable; urgency=low * xdg-desktop-entry-spec-apps: - Allow Name field to be translated. * xdg-desktop-entry-spec-dirs: - Add support for menu section icons. * Bumps Standards-Version to 3.8.0. * Clarify copyright file. -- Bill Allombert Wed, 25 Feb 2009 16:05:49 +0100 menu-xdg (0.3) unstable; urgency=low * debian/control: - bump Standards-Version to 3.7.2.0. - remove Conflicts with pre-Sarge menu. * XDG menu-methods: - use rm -rf prefix() in prerun and removemenu. Closes: #444402. Thanks Alban Browaeys. - fix name mangling rules. Closes: #444134. Thanks Ariszló. * xdg-desktop-entry-spec-apps: - end Categories with a semi-colon. Closes: #431196. Thanks Li Daobing. -- Bill Allombert Fri, 28 Sep 2007 11:37:26 +0200 menu-xdg (0.2.3) unstable; urgency=low * Take over the package from Chris. * Acknowledge NMU (Closes: #297322, #328055, #317567, #324545, #343217). * Remove the debian-menu.menu file in the prerun to avoid problem with gnome-panel. Hopefully Closes: #334941, #343469. * Add xdg-desktop-entry-spec-sessions menu-method to generate xsessions .desktop files in /var/lib/menu-xdg/xsessions. * Bump Standards-Version to 3.6.2.0. * Use /usr/bin/install-menu instead of /usr/sbin/install-menu. * Do not use dh_installmenu (does not handle multiple menu-methods). -- Bill Allombert Mon, 20 Mar 2006 14:07:09 +0100 menu-xdg (0.2.2) unstable; urgency=low * NMU * xdg-menu-spec: remove useless prerun definition. * xdg-desktop-entry-spec-apps, xdg-desktop-entry-spec-dirs: - adds removemenu config options. - prerun: remove menus more cleanly. This actually fix #297322. -- Bill Allombert Tue, 13 Dec 2005 16:04:26 +0100 menu-xdg (0.2.1) unstable; urgency=low * NMU * Apply fix from Christopher Martin: + Use 'find | xargs rm 'instead of 'rm *' to remove .desktop files. packages installed. (Closes: #297322) + Set to /var/lib/menu-xdg/applications to avoid duplicate menu entries. (Closes: #328055, #317567, #324545) -- Bill Allombert Tue, 18 Oct 2005 19:11:12 +0200 menu-xdg (0.2) unstable; urgency=low * Add section name to apps filename to differentiate entries. (Closes: #248643, #254948) * Add generictitle support to app entries. (Closes: #256017) * Integrated NMU. (Closes: #251571, #264772) * Correct menu-xdg prerun menu removal line. (Closes: #277698) -- Christopher L Cheney Wed, 3 Nov 2004 19:45:00 -0600 menu-xdg (0.1.1) unstable; urgency=low * NMU. * Recommends menu instead of Depends. * Add multilingual menu-methods (Closes: #251271). * Conflicts with menu (<< 2.1.14) that lacks proper supports. -- Bill Allombert Mon, 2 Aug 2004 16:33:38 +0200 menu-xdg (0.1) unstable; urgency=low * Initial Release. * Split out of kdelibs-bin. (Closes: #243096) -- Christopher L Cheney Wed, 21 Apr 2004 04:00:00 -0500 menu-xdg-0.5/debian/menu-xdg.install0000644000000000000000000000030010407531635014323 0ustar menu-xdg etc/menu-methods/ xdg-desktop-entry-spec-apps etc/menu-methods/ xdg-desktop-entry-spec-dirs etc/menu-methods/ xdg-desktop-entry-spec-sessions etc/menu-methods/ menu-xdg-0.5/debian/menu-xdg.postinst0000644000000000000000000000270610407532065014552 0ustar #! /bin/sh # postinst script for menu-xdg # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `configure' # * `abort-upgrade' # * `abort-remove' `in-favour' # # * `abort-deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package # menu_spec=/etc/menu-methods/menu-xdg desktop_apps=/etc/menu-methods/xdg-desktop-entry-spec-apps desktop_dirs=/etc/menu-methods/xdg-desktop-entry-spec-dirs desktop_sessions=/etc/menu-methods/xdg-desktop-entry-spec-sessions case "$1" in configure) if [ -f $menu_spec ]; then chmod a+x $menu_spec; fi if [ -f $desktop_apps ]; then chmod a+x $desktop_apps; fi if [ -f $desktop_dirs ]; then chmod a+x $desktop_dirs; fi if [ -f $desktop_sessions ]; then chmod a+x $desktop_sessions; fi if [ -x /usr/bin/update-menus ]; then update-menus; fi ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 menu-xdg-0.5/debian/copyright0000644000000000000000000000075211016255447013156 0ustar This package was written by Christopher L Cheney on Wed, 21 Apr 2004 04:00:00 -0500. Maintained by Bill Allombert since Mon, 20 Mar 2006 14:45:30 +0100 Copyright: Copyright 2004 Christopher L Cheney Copyright 2004-2008 Bill Allombert The software is released under the the GNU GPL, version 2 or later. On Debian systems the complete text of the GNU GPL is in /usr/share/common-licenses/GPL