3 # Integration with debian menu system:
5 # If debian/menu file exists, save it to $TMP/usr/lib/menu/$PACKAGE
6 # If debian/menu-method file exists, save it to
7 # $TMP/etc/menu-methods/$PACKAGE
9 # Also, add to postinst and postrm.
11 PATH=debian:$PATH:/usr/lib/debhelper
14 for PACKAGE in $DH_DOPACKAGES; do
18 if [ -e debian/${EXT}menu ]; then
19 if [ ! -d $TMP/usr/lib/menu ]; then
20 doit "install -d $TMP/usr/lib/menu"
22 doit "install -p -m644 debian/${EXT}menu $TMP/usr/lib/menu/$PACKAGE"
24 # Add the scripts if a menu-method file doesn't exist.
25 # The scripts for menu-method handle everything these do, too.
26 if [ ! -e debian/${EXT}menu-method -a ! "$DH_NOSCRIPTS" ]; then
27 autoscript "postinst" "postinst-menu"
28 autoscript "postrm" "postrm-menu"
32 if [ -e debian/${EXT}menu-method ]; then
33 if [ ! -d $TMP/etc/menu-methods ]; then
34 doit "install -d $TMP/etc/menu-methods"
36 doit "install -p debian/${EXT}menu-method $TMP/etc/menu-methods/$PACKAGE"
38 if [ ! "$DH_NOSCRIPTS" ]; then
39 autoscript "postinst" "postinst-menu-method" "s/#PACKAGE#/$PACKAGE/"
40 autoscript "postrm" "postrm-menu-method" "s/#PACKAGE#/$PACKAGE/"