mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-24 10:02:29 +01:00
office/openoffice.org: Add submenu support.
Signed-off-by: bedlam <dave@slackbuilds.org> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
453043e9d3
commit
3452699238
4 changed files with 52 additions and 1 deletions
|
@ -13,3 +13,10 @@ Apache recommends having either jre or jdk installed, but it is not
|
|||
required. See more details here:
|
||||
|
||||
https://wiki.openoffice.org/wiki/Java_and_OpenOffice.org
|
||||
|
||||
NOTE: submenus
|
||||
By default, the menu entries grouped in a submenu folder
|
||||
(multilevel menu entry). If you want to disable this, do:
|
||||
|
||||
SUBMENU="NO" ./openoffice.org.SlackBuild
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ PRGNAM=openoffice.org
|
|||
SRCNAM=openoffice
|
||||
VERSION=${VERSION:-4.1.14}
|
||||
BUILD_ID=${BUILD_ID:-9811}
|
||||
BUILD=${BUILD:-2}
|
||||
BUILD=${BUILD:-3}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
SRCSHORT=$(echo $VERSION | cut -f1 -d.)
|
||||
|
@ -156,6 +156,23 @@ done
|
|||
## menu icons!
|
||||
cp -R $TMP/$SOURCEDIR/RPMS/desktop-integration/usr/share/icons $PKG/usr/share/
|
||||
|
||||
# The following was adapted from a patch submitted by Petar Petrov
|
||||
# Do we want a submenu? For more info:
|
||||
# https://slackalaxy.com/2021/08/08/xfce-multilevel-menu/
|
||||
SUBMENU=${SUBMENU:-"YES"}
|
||||
if [ "$SUBMENU" = "YES" ]; then
|
||||
# Use a separate "OpenOffice" menu entry within "Office"
|
||||
mkdir -p $PKG/etc/xdg/menus/applications-merged
|
||||
cp $CWD/submenus/openoffice.menu $PKG/etc/xdg/menus/applications-merged
|
||||
|
||||
# Menu directory structure
|
||||
mkdir -p $PKG/usr/share/desktop-directories
|
||||
cp $CWD/submenus/openoffice.directory $PKG/usr/share/desktop-directories
|
||||
|
||||
# The category in the .desktop files is commented out to avoid duplication in menus
|
||||
sed -i "s:Categories:#Categories:" $PKG/usr/share/applications/*.desktop
|
||||
fi
|
||||
|
||||
## Move docs to their expected locations
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cd $PKG/opt/${SRCNAM}${SRCSHORT}
|
||||
|
|
4
office/openoffice.org/submenus/openoffice.directory
Normal file
4
office/openoffice.org/submenus/openoffice.directory
Normal file
|
@ -0,0 +1,4 @@
|
|||
[Desktop Entry]
|
||||
Type=Directory
|
||||
Name=OpenOffice
|
||||
Icon=openoffice4-main
|
23
office/openoffice.org/submenus/openoffice.menu
Normal file
23
office/openoffice.org/submenus/openoffice.menu
Normal file
|
@ -0,0 +1,23 @@
|
|||
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
|
||||
"http://www.freedesktop.org/standards/menu-spec/menu-1.0.dtd">
|
||||
<Menu>
|
||||
<Name>Applications</Name>
|
||||
<Menu>
|
||||
<Name>Office</Name>
|
||||
<Directory>xfce4-office.directory</Directory>
|
||||
<Menu>
|
||||
<Name>OpenOffice</Name>
|
||||
<Directory>openoffice.directory</Directory>
|
||||
<Include>
|
||||
<Filename>open-base.desktop</Filename>
|
||||
<Filename>open-calc.desktop</Filename>
|
||||
<Filename>open-draw.desktop</Filename>
|
||||
<Filename>open-impress.desktop</Filename>
|
||||
<Filename>open-math.desktop</Filename>
|
||||
<Filename>open-printeradmin.desktop</Filename>
|
||||
<Filename>open-startcenter.desktop</Filename>
|
||||
<Filename>open-writer.desktop</Filename>
|
||||
</Include>
|
||||
</Menu>
|
||||
</Menu>
|
||||
</Menu>
|
Loading…
Reference in a new issue