diff options
Diffstat (limited to 'office/openoffice.org')
-rw-r--r-- | office/openoffice.org/README | 12 | ||||
-rw-r--r-- | office/openoffice.org/openoffice.org.SlackBuild | 59 | ||||
-rw-r--r-- | office/openoffice.org/openoffice.org.info | 14 | ||||
-rw-r--r-- | office/openoffice.org/patches/01-gtk2_theme.patch | 5 | ||||
-rw-r--r-- | office/openoffice.org/submenus/openoffice.directory | 4 | ||||
-rw-r--r-- | office/openoffice.org/submenus/openoffice.menu | 23 |
6 files changed, 97 insertions, 20 deletions
diff --git a/office/openoffice.org/README b/office/openoffice.org/README index f4b064b83b..a0564c5a34 100644 --- a/office/openoffice.org/README +++ b/office/openoffice.org/README @@ -3,8 +3,20 @@ compatible with all other major office software. This script builds a Slackware package from the official binary (RPM's) distributed by openoffice.org. +The default GTK theme is replaced with 'Adwaita', but if instead you'd +like to use the default 'Raleigh', set the option DEFAULT_TO_RALEIGH +to 'YES', i.e.: + +DEFAULT_TO_RALEIGH='YES' ./openoffice.org.SlackBuild 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 + diff --git a/office/openoffice.org/openoffice.org.SlackBuild b/office/openoffice.org/openoffice.org.SlackBuild index 1fa097f05c..9f8b2184f4 100644 --- a/office/openoffice.org/openoffice.org.SlackBuild +++ b/office/openoffice.org/openoffice.org.SlackBuild @@ -1,13 +1,16 @@ #!/bin/bash # Slackware build script for openoffice.org + +# Originally written by Niki Kovacs <info@microlinux.fr) +# Rewritten for slackbuilds.org by Ryan P.C. McQuen # Copyright 2018-2019 Donald Cooley South Haven, Indiana USA # With help from Ekin Akoglu to fix missing menu icons and script cleanup, # and a diff from Dominik Drobek to remove unnecessary RPM cruft. # Ryan P.C. McQuen | Everett, WA | ryanpcmcquen@member.fsf.org -# Originally written by Niki Kovacs <info@microlinux.fr) -# -# Rewritten for slackbuilds.org by Ryan P.C. McQuen +# Copyright 2023 Juan M. Lasca <juanmlasca@gmail.com> +# Copyright 2024 Dimitris Zlatanidis Orestiada, Greece + # # All rights reserved. # @@ -32,8 +35,8 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=openoffice.org SRCNAM=openoffice -VERSION=${VERSION:-4.1.7} -BUILD_ID=${BUILD_ID:-9800} +VERSION=${VERSION:-4.1.15} +BUILD_ID=${BUILD_ID:-9813} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -49,7 +52,6 @@ fi # change this if you want to install a different language OOLANG=${OOLANG:-en-US} -PKG_LANG=${OOLANG//-/_} # Leave this alone # Change source package name if [ "$ARCH" = "x86_64" ]; then @@ -63,11 +65,8 @@ else PKGARCH="i586" fi -# If the variable PRINT_PACKAGE_NAME is set, then this script will report what -# the name of the created package would be, and then exit. This information -# could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then - echo "$PRGNAM-${VERSION}_${PKG_LANG}-$PKGARCH-$BUILD$TAG.$PKGTYPE" + echo "$PRGNAM-${VERSION}-$PKGARCH-$BUILD$TAG.$PKGTYPE" exit 0 fi @@ -127,12 +126,28 @@ cd $PKG/usr/bin/ done cd - +## Correct scripts so that they don't conflict with other soffice derivatives +cd $PKG/opt/${SRCNAM}${SRCSHORT}/program + for FILE in \ + sbase scalc sdraw simpress smath spadmin swriter unopkg; do + sed -i 's/soffice/open-soffice/' $FILE + done + ln -s soffice.bin open-soffice.bin +cd - + +## By default, replace 'Raleigh' with 'Adwaita' as the default theme, +## unless the option DEFAULT_TO_RALEIGH is set to 'YES'. +## Changed based on comments by Petar Petrov +if [ "$DEFAULT_TO_RALEIGH" = "YES" ]; then + patch -p0 $PKG/opt/${SRCNAM}${SRCSHORT}/program/soffice < $CWD/patches/01-gtk2_theme.patch; +fi + ## fix desktop files, so they can launch -cat <<EOT > $PKG/usr/bin/${SRCNAM}4 +cat <<EOT > $PKG/usr/bin/${SRCNAM}${SRCSHORT} #!/bin/sh /opt/${SRCNAM}${SRCSHORT}/program/soffice "\$@" EOT -chmod 755 $PKG/usr/bin/${SRCNAM}4 +chmod 755 $PKG/usr/bin/${SRCNAM}${SRCSHORT} ## desktop files! for APP in base calc draw impress math writer; do @@ -142,6 +157,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} @@ -161,6 +193,7 @@ mv $TMP/$OOLANG $PKG/opt/${SRCNAM}${SRCSHORT}/lang/ # Fix ownership and permissions and make the package chown -R root:root . find . -type d -exec chmod 755 {} \; +find $PKG '(' -name "*.so" -o -name "*.so.*" ')' -exec chmod +x {} \; chmod -R u+rw,go+r-w,a-s . -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-${VERSION}_${PKG_LANG}-$PKGARCH-$BUILD$TAG.$PKGTYPE +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-${VERSION}-$PKGARCH-$BUILD$TAG.$PKGTYPE diff --git a/office/openoffice.org/openoffice.org.info b/office/openoffice.org/openoffice.org.info index c748fa84d7..d1e8c94d8c 100644 --- a/office/openoffice.org/openoffice.org.info +++ b/office/openoffice.org/openoffice.org.info @@ -1,10 +1,10 @@ PRGNAM="openoffice.org" -VERSION="4.1.7" +VERSION="4.1.15" HOMEPAGE="https://openoffice.org" -DOWNLOAD="https://sourceforge.net/projects/openofficeorg.mirror/files/4.1.7/binaries/en-US/Apache_OpenOffice_4.1.7_Linux_x86_install-rpm_en-US.tar.gz" -MD5SUM="650016711ab925eb0350c4d2fbbecd92" -DOWNLOAD_x86_64="https://sourceforge.net/projects/openofficeorg.mirror/files/4.1.7/binaries/en-US/Apache_OpenOffice_4.1.7_Linux_x86-64_install-rpm_en-US.tar.gz" -MD5SUM_x86_64="f71d8bbc7c1901e808e7c5d5e6eaa051" +DOWNLOAD="https://sourceforge.net/projects/openofficeorg.mirror/files/4.1.15/binaries/en-US/Apache_OpenOffice_4.1.15_Linux_x86_install-rpm_en-US.tar.gz" +MD5SUM="27edabecd195b3db78564f76391a4901" +DOWNLOAD_x86_64="https://sourceforge.net/projects/openofficeorg.mirror/files/4.1.15/binaries/en-US/Apache_OpenOffice_4.1.15_Linux_x86-64_install-rpm_en-US.tar.gz" +MD5SUM_x86_64="3edb3f95ed26e07cca0e3ba3a01746e6" REQUIRES="" -MAINTAINER="Donald Cooley" -EMAIL="chytraeu@sdf.org" +MAINTAINER="Dimitris Zlatanidis" +EMAIL="dslackw@gmail.com" diff --git a/office/openoffice.org/patches/01-gtk2_theme.patch b/office/openoffice.org/patches/01-gtk2_theme.patch new file mode 100644 index 0000000000..9d7b9a2f82 --- /dev/null +++ b/office/openoffice.org/patches/01-gtk2_theme.patch @@ -0,0 +1,5 @@ +38a39,42 +> # Any theme would be nicer than the default Raleigh theme. +> GTK2_RC_FILES=${GTK2_RC_FILES:-/usr/share/themes/Adwaita/gtk-2.0/gtkrc} +> export GTK2_RC_FILES +> diff --git a/office/openoffice.org/submenus/openoffice.directory b/office/openoffice.org/submenus/openoffice.directory new file mode 100644 index 0000000000..31834069d2 --- /dev/null +++ b/office/openoffice.org/submenus/openoffice.directory @@ -0,0 +1,4 @@ +[Desktop Entry] +Type=Directory +Name=OpenOffice +Icon=openoffice4-main diff --git a/office/openoffice.org/submenus/openoffice.menu b/office/openoffice.org/submenus/openoffice.menu new file mode 100644 index 0000000000..d41adea78b --- /dev/null +++ b/office/openoffice.org/submenus/openoffice.menu @@ -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> |