diff options
author | Robby Workman <rw@rlworkman.net> | 2010-05-11 15:03:04 +0200 |
---|---|---|
committer | Michiel van Wessem <michiel@slackbuilds.org> | 2010-05-11 15:03:04 +0200 |
commit | c4faf91a040e1c68318aca1195c52576dbc78e8f (patch) | |
tree | cf302f9114d313cb1d90cc98a6a5cdf24f19fd35 | |
parent | ff20fcdea62100828097b9fa9788a18b1f360fe4 (diff) |
office/openoffice.org: Initial import
-rw-r--r-- | office/openoffice.org/README | 36 | ||||
-rw-r--r-- | office/openoffice.org/desktop-file-fix-2.2.diff | 114 | ||||
-rw-r--r-- | office/openoffice.org/doinst.sh | 7 | ||||
-rw-r--r-- | office/openoffice.org/openoffice.org.SlackBuild | 148 | ||||
-rw-r--r-- | office/openoffice.org/openoffice.org.info | 8 | ||||
-rw-r--r-- | office/openoffice.org/slack-desc | 11 |
6 files changed, 324 insertions, 0 deletions
diff --git a/office/openoffice.org/README b/office/openoffice.org/README new file mode 100644 index 0000000000000..30224f292477e --- /dev/null +++ b/office/openoffice.org/README @@ -0,0 +1,36 @@ +OpenOffice.org is a full-featured open-source office suite that is compatible +with all other major office software. + +This script builds a Slackware package from the official binary (RPM's) +distributed by openoffice.org. Everything needed by the application should +be built statically into it, so there aren't any dependencies not satisfied +by a normal installation. A java runtime environment (jre) is suggested by +openoffice.org, but it is not required. + +Please don't file bug reports relating to the fact that the resulting package +doesn't open MS Office files by default. Default applications to open specific +file types is a per-user setting, and and installing some application should +not change it. See these two links for more info: + http://freedesktop.org/wiki/Standards_2fshared_2dmime_2dinfo_2dspec + http://freedesktop.org/wiki/Standards_2fmime_2dactions_2dspec + +Please don't file reports about us not using the the 'slackware-menus' package +included in the desktop-integration/ directory. We don't use that package for +the following reasons: + 1. The package installs to /opt/openoffice.org2.2, but then a symlink is + created in /etc to that same directory (/etc/openoffice.org2.2). + This is not expected behavior from Slackware packages - we don't typically + put binary files in /etc, and we certainly don't have entire software + packages installed there - that will wreak havoc on anyone who does a + regular backup of the entire /etc directory. + 2. It installs the icons to /opt/kde/share/icons instead of /usr/share/icons. + This is fine if you're running kde, but for those people who use gnome, + it's not. There's no good reason not to put them in /usr/share/icons or + /usr/share/pixmaps. + 3. The only other thing the 'slackware-menus' package does is set up the + symlinks for the *.desktop files in /usr/share/applications, and it's done + with them linked from /etc/openoffice.org2.2... Since we don't want the + link to /etc at all, this is useless to us. + +Be sure to look at the script for some optional things you can do when building +(disable the Java loader and add the Optimization Solver). diff --git a/office/openoffice.org/desktop-file-fix-2.2.diff b/office/openoffice.org/desktop-file-fix-2.2.diff new file mode 100644 index 0000000000000..8769a0bc6470e --- /dev/null +++ b/office/openoffice.org/desktop-file-fix-2.2.diff @@ -0,0 +1,114 @@ +diff -Naur OLD/opt/openoffice.org2.2/share/xdg/base.desktop NEW/opt/openoffice.org2.2/share/xdg/base.desktop +--- OLD/opt/openoffice.org2.2/share/xdg/base.desktop 2007-02-16 08:59:53.000000000 -0600 ++++ NEW/opt/openoffice.org2.2/share/xdg/base.desktop 2007-02-21 17:22:21.000000000 -0600 +@@ -2,11 +2,11 @@ + Version=1.0 + Encoding=UTF-8 + Terminal=false +-Icon=openofficeorg22-base ++Icon=/usr/share/pixmaps/openofficeorg22-base.png + Type=Application + InitialPreference=2 + Categories=Application;Office;X-Red-Hat-Base;X-SuSE-Core-Office; +-Exec=openoffice.org2.2 -base %U ++Exec=sbase %U + MimeType=application/vnd.oasis.opendocument.database;application/vnd.sun.xml.base + Name=OpenOffice.org 2.2 Base + Comment=Manage databases, create queries and reports to track and manage your information by using Base. +diff -Naur OLD/opt/openoffice.org2.2/share/xdg/calc.desktop NEW/opt/openoffice.org2.2/share/xdg/calc.desktop +--- OLD/opt/openoffice.org2.2/share/xdg/calc.desktop 2007-02-16 08:58:50.000000000 -0600 ++++ NEW/opt/openoffice.org2.2/share/xdg/calc.desktop 2007-02-21 17:22:28.000000000 -0600 +@@ -2,11 +2,11 @@ + Version=1.0 + Encoding=UTF-8 + Terminal=false +-Icon=openofficeorg22-calc ++Icon=/usr/share/pixmaps/openofficeorg22-calc.png + Type=Application + InitialPreference=2 + Categories=Application;Office;X-Red-Hat-Base;X-SuSE-Core-Office; +-Exec=openoffice.org2.2 -calc %U ++Exec=scalc %U + MimeType=application/vnd.oasis.opendocument.spreadsheet;application/vnd.oasis.opendocument.spreadsheet-template;application/vnd.sun.xml.calc;application/vnd.sun.xml.calc.template;application/vnd.stardivision.calc;application/vnd.stardivision.chart;application/msexcel;application/vnd.ms-excel + Name=OpenOffice.org 2.2 Calc + Comment=Perform calculation, analyze information and manage lists in spreadsheets by using Calc. +diff -Naur OLD/opt/openoffice.org2.2/share/xdg/draw.desktop NEW/opt/openoffice.org2.2/share/xdg/draw.desktop +--- OLD/opt/openoffice.org2.2/share/xdg/draw.desktop 2007-02-16 08:59:31.000000000 -0600 ++++ NEW/opt/openoffice.org2.2/share/xdg/draw.desktop 2007-02-21 17:22:33.000000000 -0600 +@@ -2,11 +2,11 @@ + Version=1.0 + Encoding=UTF-8 + Terminal=false +-Icon=openofficeorg22-draw ++Icon=/usr/share/pixmaps/openofficeorg22-draw.png + Type=Application + InitialPreference=2 + Categories=Application;Office;X-Red-Hat-Base;X-SuSE-Core-Office; +-Exec=openoffice.org2.2 -draw %U ++Exec=sdraw %U + MimeType=application/vnd.oasis.opendocument.graphics;application/vnd.oasis.opendocument.graphics-template;application/vnd.sun.xml.draw;application/vnd.sun.xml.draw.template;application/vnd.stardivision.draw + Name=OpenOffice.org 2.2 Draw + Comment=Create and edit drawings, flow charts, and logos by using Draw. +diff -Naur OLD/opt/openoffice.org2.2/share/xdg/impress.desktop NEW/opt/openoffice.org2.2/share/xdg/impress.desktop +--- OLD/opt/openoffice.org2.2/share/xdg/impress.desktop 2007-02-16 08:59:40.000000000 -0600 ++++ NEW/opt/openoffice.org2.2/share/xdg/impress.desktop 2007-02-21 17:23:56.000000000 -0600 +@@ -2,11 +2,11 @@ + Version=1.0 + Encoding=UTF-8 + Terminal=false +-Icon=openofficeorg22-impress ++Icon=/usr/share/pixmaps/openofficeorg22-impress.png + Type=Application + InitialPreference=2 + Categories=Application;Office;X-Red-Hat-Base;X-SuSE-Core-Office; +-Exec=openoffice.org2.2 -impress %U ++Exec=simpress %U + MimeType=application/vnd.oasis.opendocument.presentation;application/vnd.oasis.opendocument.presentation-template;application/vnd.sun.xml.impress;application/vnd.sun.xml.impress.template;application/vnd.stardivision.impress;application/mspowerpoint;application/vnd.ms-powerpoint + Name=OpenOffice.org 2.2 Impress + Comment=Create and edit presentations for slideshows, meeting and Web pages by using Impress. +diff -Naur OLD/opt/openoffice.org2.2/share/xdg/math.desktop NEW/opt/openoffice.org2.2/share/xdg/math.desktop +--- OLD/opt/openoffice.org2.2/share/xdg/math.desktop 2007-02-16 09:00:12.000000000 -0600 ++++ NEW/opt/openoffice.org2.2/share/xdg/math.desktop 2007-02-21 17:24:01.000000000 -0600 +@@ -2,11 +2,11 @@ + Version=1.0 + Encoding=UTF-8 + Terminal=false +-Icon=openofficeorg22-math ++Icon=/usr/share/pixmaps/openofficeorg22-math.png + Type=Application + InitialPreference=2 + Categories=Application;Office;X-Red-Hat-Base;X-SuSE-Core-Office; +-Exec=openoffice.org2.2 -math %U ++Exec=smath %U + MimeType=application/vnd.oasis.opendocument.formula;application/vnd.sun.xml.math;application/vnd.stardivision.math + Name=OpenOffice.org 2.2 Math + Comment=Create and edit scientific formulas and equations by using Math. +diff -Naur OLD/opt/openoffice.org2.2/share/xdg/printeradmin.desktop NEW/opt/openoffice.org2.2/share/xdg/printeradmin.desktop +--- OLD/opt/openoffice.org2.2/share/xdg/printeradmin.desktop 2007-02-16 09:18:11.000000000 -0600 ++++ NEW/opt/openoffice.org2.2/share/xdg/printeradmin.desktop 2007-02-21 17:21:50.000000000 -0600 +@@ -2,7 +2,7 @@ + Version=1.0 + Encoding=UTF-8 + Terminal=false +-Icon=openofficeorg22-printeradmin.png ++Icon=/usr/share/pixmaps/openofficeorg22-printeradmin.png + Type=Application + Categories=Application;Office;X-Red-Hat-Base;X-SuSE-Core-Office; + Exec=openoffice.org2.2-printeradmin +diff -Naur OLD/opt/openoffice.org2.2/share/xdg/writer.desktop NEW/opt/openoffice.org2.2/share/xdg/writer.desktop +--- OLD/opt/openoffice.org2.2/share/xdg/writer.desktop 2007-02-16 08:58:36.000000000 -0600 ++++ NEW/opt/openoffice.org2.2/share/xdg/writer.desktop 2007-02-21 17:24:38.000000000 -0600 +@@ -2,11 +2,11 @@ + Version=1.0 + Encoding=UTF-8 + Terminal=false +-Icon=openofficeorg22-writer ++Icon=/usr/share/pixmaps/openofficeorg22-writer.png + Type=Application + InitialPreference=2 + Categories=Application;Office;X-Red-Hat-Base;X-SuSE-Core-Office; +-Exec=openoffice.org2.2 -writer %U ++Exec=swriter %U + MimeType=application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.oasis.opendocument.text-master;application/vnd.sun.xml.writer;application/vnd.sun.xml.writer.template;application/vnd.sun.xml.writer.global;application/vnd.stardivision.writer;application/msword;application/vnd.ms-word;application/x-doc;application/rtf;application/vnd.wordperfect;application/wordperfect + Name=OpenOffice.org 2.2 Writer + Comment=Create and edit text and graphics in letters, reports, documents and Web pages by using Writer. diff --git a/office/openoffice.org/doinst.sh b/office/openoffice.org/doinst.sh new file mode 100644 index 0000000000000..a1aa08630c797 --- /dev/null +++ b/office/openoffice.org/doinst.sh @@ -0,0 +1,7 @@ +if [ -x usr/bin/update-desktop-database ]; then + usr/bin/update-desktop-database -q usr/share/applications +fi + +if [ -x usr/bin/update-mime-database ]; then + usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 +fi diff --git a/office/openoffice.org/openoffice.org.SlackBuild b/office/openoffice.org/openoffice.org.SlackBuild new file mode 100644 index 0000000000000..17b973988b7f0 --- /dev/null +++ b/office/openoffice.org/openoffice.org.SlackBuild @@ -0,0 +1,148 @@ +#!/bin/bash +# +# Slackware build script of openoffice.org (binary repackaging) + +# Copyright 2006-2007 Robby Workman (http://rlworkman.net) +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, is +# permitted provided that the following conditions are met: +# +# 1. Redistributions of this script must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Thanks to Sandman1, Larhzu, and MacIver for early assistance. +# Thanks to Fred Emmott (http://slamd64.com) for some better code in a few +# places and ideas to include the Optimization Solver and disable javaldx. +# Thanks to eroc for the idea to include support for other languages. + +PRGNAM=openoffice.org +VERSION=2.2.1 +ARCH=i586 # The binaries are built for i586 - leave this alone +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +# This should allow you to either pass a different value of OOLANG when you +# run the script (OOLANG=pt-BR ./openoffice.org.SlackBuild for example) or +# change it in this script. Note that you will need to have the correct +# tarball in the build directory for this to work... +# TODO: Find where someone can obtain these localized tarballs... +OOLANG=${OOLANG:-en-US} +PKG_LANG=$(echo $OOLANG | sed s/-/_/) # Leave this alone + +# If you want to disable java support by removing executable permissions +# form OOo's java loader (this will not affect other apps), set this +# variable to "YES" Default is "NO" +# According to Fred Emmott, this is *highly* desirable on 64 bit systems +DISABLE_JAVA=${DISABLE_JAVA:-NO} + +# If you want to include the new experimental Optimization Solver, +# download "scsolver.uno.zip" from the following location: +# http://wiki.services.openoffice.org/wiki/Optimization_Solver +# and place it in the same directory as the SlackBuild script ($CWD) +# Set the following variable to "YES" Default is "NO" +ADD_SOLVER=${ADD_SOLVER:-NO} + +# Yes, I know there is a slackware integration file in the desktop-integration +# directory, but it's mostly worthless to us. I mailed the maintainer of this +# module with suggestions on how to make it more compliant with standard +# Slackware packaging, but I received no response. Anyway, to sum up, we're +# not using that file... + +# Require the script to exit if any command fails +set -e + +# Ignore this - it's just to get the toplevel directory name of the +# extracted tarball archive +SOURCEDIR=$(tar -tzf $CWD/OOo_${VERSION}_LinuxIntel_install_${OOLANG}.tar.gz | head -1 | tr -d \/) +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SOURCEDIR +tar -xzf $CWD/OOo_${VERSION}_LinuxIntel_install_${OOLANG}.tar.gz || exit 1 +cd $SOURCEDIR/RPMS/ +mv desktop-integration/openoffice.org-freedesktop-menus-*.noarch.rpm . +rm -rf desktop-integration +for FILE in *.rpm ; do rpm2cpio < $FILE | cpio -imdv ; done +mv opt usr $PKG +cd $PKG + +# Create symlinks in /usr/bin to actual binaries and edit the +# included wrapper scripts /usr/bin to correct the paths +( cd $PKG/usr/bin + rm -f unopkg_gui # Broken upstream? + for FILE in sbase scalc sdraw simpress smath soffice spadmin swriter unopkg ; do + rm -f $FILE + ln -sf ../../opt/openoffice.org2.2/program/$FILE . ; + done + for i in $(find . -type f) ; do sed -i 's/etc/opt/g' $i ; done +) + +# Correct symlinks in /usr/share/applications +( cd $PKG/usr/share/applications + for APP in base calc draw extension impress math printeradmin writer qstart ; do + rm -f openoffice.org2.2-$APP.desktop + ln -sf ../../../opt/openoffice.org2.2/share/xdg/$APP.desktop \ + openoffice.org2.2-$APP.desktop ; + done +) + +# Correct icon paths and Exec commands in the desktop files +# See http://bugzilla.xfce.org/show_bug.cgi?id=2430 for why we want to +# change the Exec lines +cat $CWD/desktop-file-fix-2.2.diff | patch -p1 + +# Add /usr/share/pixmaps directory and link icons to it +mkdir -p $PKG/usr/share/pixmaps +( cd $PKG/usr/share/pixmaps + for APP in base calc draw extension impress math printeradmin writer ; do + ln -sf ../../../usr/share/icons/hicolor/48x48/apps/openofficeorg22-$APP.png . ; + done +) + +# Move docs to their correct locations +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +for i in README README.html LICENSE LICENSE.html THIRDPARTYLICENSEREADME.html ; do + mv $PKG/opt/openoffice.org2.2/$i $PKG/usr/doc/$PRGNAM-$VERSION/$i ; +done +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +# Fix the permissions on a few icons that are executable +find $PKG/usr/share/icons -name "*.png" -exec chmod 0644 {} \; + +# Disable Java support if desired (see above) +if [ "$DISABLE_JAVA" = "YES" ]; then + chmod -x $PKG/opt/openoffice.org2.2/program/javaldx +fi + +# Add optimization solver if desired (see above) +if [ "$ADD_SOLVER" = "YES" -a -f "$CWD/scsolver.uno.zip" ]; then + ( cd $PKG/opt/openoffice.org2.2 + program/unopkg add --shared $CWD/scsolver.uno.zip + ) +fi + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +# Fix ownership and permissions and make the package +#chown -R root:root . +find . -type d -exec chmod 755 {} \; +chmod -R u+rw,go+r-w,a-s . +/sbin/makepkg -p -c n -l y $OUTPUT/$PRGNAM-${VERSION}_${PKG_LANG}-$ARCH-$BUILD$TAG.tgz diff --git a/office/openoffice.org/openoffice.org.info b/office/openoffice.org/openoffice.org.info new file mode 100644 index 0000000000000..210d87e20ee80 --- /dev/null +++ b/office/openoffice.org/openoffice.org.info @@ -0,0 +1,8 @@ +PRGNAM="openoffice.org" +VERSION="2.2.1" +HOMEPAGE="http://openoffice.org" +DOWNLOAD="http://openoffice.osuosl.org/stable/2.2.1/OOo_2.2.1_LinuxIntel_install_en-US.tar.gz" +MD5SUM="145dd00f6bda18b9848bb72bcec6e7b3" +MAINTAINER="Robby Workman" +EMAIL="rw@rlworkman.net" +APPROVED="BP{k}" diff --git a/office/openoffice.org/slack-desc b/office/openoffice.org/slack-desc new file mode 100644 index 0000000000000..a7ef28d7e1e19 --- /dev/null +++ b/office/openoffice.org/slack-desc @@ -0,0 +1,11 @@ +openoffice.org: OpenOffice.org Office Suite +openoffice.org: +openoffice.org: OpenOffice.org is a full-featured open-source office suite +openoffice.org: that is compatible with all other major office software. +openoffice.org: +openoffice.org: Homepage: http://openoffice.org +openoffice.org: +openoffice.org: +openoffice.org: +openoffice.org: +openoffice.org: |