office/libreoffice: Remove version number in symlinks.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
Sebastien BALLET 2018-10-18 04:04:04 +07:00 committed by Willy Sudiarto Raharjo
parent c710d4ce5d
commit df9a0be4ab
No known key found for this signature in database
GPG Key ID: 887B8374D7333381
1 changed files with 18 additions and 0 deletions

View File

@ -130,6 +130,24 @@ ln -sf ../../opt/libreoffice$SRCSHORT/program/smath lomath
ln -sf ../../opt/libreoffice$SRCSHORT/program/swriter lowriter
cd -
# the .desktop files installed in /opt/libreoffice<VER>/share/xdg and
# symlinks to that files in /usr/share/applications have version number
# in their name (ex libreoffice6.1-writer.desktop) which force user to
# re-create/update any link/reference (ex: on KDE/XFCE desktop, in fluxbox
# menu file, in wmalauncher configuration file,...) to that files on each
# libreoffice version number increment.
#
# To avoid that, the code below deletes the "versioned" symlinks
# and creates news without version number in their names.
#
cd $PKG/usr/share/applications
for APP in base calc draw impress math startcenter writer xsltfilter ; do
rm -f $PRGNAM$SRCSHORT-$APP.desktop
ln -sf ../../../opt/libreoffice$SRCSHORT/share/xdg/$APP.desktop $PRGNAM-$APP.desktop
done
cd -
# Remove DejaVu and Liberation fonts - these are included in other packages
rm -f opt/libreoffice$SRCSHORT/share/fonts/truetype/{DejaVu,Liberation}*.ttf