aboutsummaryrefslogtreecommitdiff
path: root/office/broffice.org/broffice.org.SlackBuild
diff options
context:
space:
mode:
authorOda <edu.oda@gmail.com>2010-06-20 09:47:45 -0400
committerErik Hanson <erik@slackbuilds.org>2010-06-20 15:20:26 -0500
commita3702653e961a177fc3f35b44ad99d3d75dfe621 (patch)
tree560fd5fc64c49dacaf42b58f70fe3892839e4d6a /office/broffice.org/broffice.org.SlackBuild
parent9fc03f12353b737fd98d1efc22cdb7e2e4c59950 (diff)
office/broffice.org: Updated for version 3.2.1.
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'office/broffice.org/broffice.org.SlackBuild')
-rw-r--r--office/broffice.org/broffice.org.SlackBuild60
1 files changed, 46 insertions, 14 deletions
diff --git a/office/broffice.org/broffice.org.SlackBuild b/office/broffice.org/broffice.org.SlackBuild
index 103724a40d5bb..43f688441ab81 100644
--- a/office/broffice.org/broffice.org.SlackBuild
+++ b/office/broffice.org/broffice.org.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for OpenOffice.org
-# Copyright 2006-2009 Robby Workman, Northport, Alabama, USA
+# Copyright 2006,2007,2008,2009,2010 Robby Workman, Northport, Alabama, ASA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,11 +23,20 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=broffice.org
-VERSION=3.1.1
-ARCH=${ARCH:-i586}
+VERSION=3.2.1
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -36,6 +45,11 @@ OUTPUT=${OUTPUT:-/tmp}
# Work just for pt-BR. Other languages must use the OpenOffice.org slackbuild.
OOLANG="pt-BR" # Leave this alone
PKG_LANG=$(echo $OOLANG | sed s/-/_/) # Leave this alone
+# Some localized versions only ship with a bundled JRE, and we'd like this
+# script to work on those as well... More importantly, the non-jre tarballs
+# don't seem to hang around on the mirrors for the last two releases, so I'm
+# just going to use the jre-bundled tarballs.
+WJRE=${WJRE:-yes}
# If you want to disable java support by removing executable permissions
# form OOo's java loader (this will not affect other apps), set this
@@ -44,20 +58,23 @@ DISABLE_JAVA=${DISABLE_JAVA:-NO}
# Change source package name
if [ "$ARCH" = "x86_64" ]; then
- SRCARCH="X86-64"
+ SRCARCH="x86-64"
PKGARCH="$ARCH"
+elif [ "$ARCH" = "arm" ]; then
+ printf "\n$ARCH is unsupported for OOo...\n\n"
+ exit 1
else
- SRCARCH="Intel"
+ SRCARCH="x86"
PKGARCH="i586"
fi
-# Yes, I know there is a Slackware integration file in the desktop-integration
-# directory, but it's worthless to us. I'd prefer to do things correctly.
-
# Ignore this - it's just to get the toplevel directory name of the
# extracted tarball archive
-SOURCEDIR=$(tar tzf $CWD/BrOOo_${VERSION}_Linux${SRCARCH}_install_${OOLANG}.tar.gz | head -1 | tr -d \/)
-
+if [ $WJRE != no ]; then
+ SOURCEDIR=$(tar tzf $CWD/BrOOo_${VERSION}_Linux_${SRCARCH}_install-rpm-wJRE_${OOLANG}.tar.gz 2>/dev/null | head -n 1 | tr -d \/)
+else
+ SOURCEDIR=$(tar tzf $CWD/BrOOo_${VERSION}_Linux_${SRCARCH}_install-rpm_${OOLANG}.tar.gz 2>/dev/null | head -n 1 | tr -d \/)
+fi
# If the above operation failed for some reason, unset SOURCEDIR so that
# the "set -eu" below will cause us to bail out with an error
[ -z $SOURCEDIR ] && unset SOURCEDIR
@@ -68,18 +85,33 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
rm -rf $TMP/$SOURCEDIR
-tar xvf $CWD/BrOOo_${VERSION}_Linux${SRCARCH}_install_${OOLANG}.tar.gz -C $TMP
+# Handle the tarballs that include a bundled JRE
+if [ $WJRE != no ]; then
+ tar xvf $CWD/BrOOo_${VERSION}_Linux_${SRCARCH}_install-rpm-wJRE_${OOLANG}.tar.gz -C $TMP
+else
+ tar xvf $CWD/BrOOo_${VERSION}_Linux_${SRCARCH}_install-rpm_${OOLANG}.tar.gz -C $TMP
+fi
+
+# We'll remove this regardless of whether we're using the jre tarball...
+rm -rf $TMP/$SOURCEDIR/{JavaSetup.jar,installdata,setup}
+rm -rf $TMP/$SOURCEDIR/RPMS/{userland,jre-*-linux-*.rpm}
cd $TMP/$SOURCEDIR/RPMS/
+
+# Yes, I know there is a Slackware integration file in the desktop-integration
+# directory, but it's worthless to us. I'd prefer to do things correctly.
mv desktop-integration/*-freedesktop-menus-*.rpm .
-rm *onlineupdate*.rpm # We don't want/need this
+
+# No, I don't want to update our packaged files after the fact
+rm -f *onlineupdate*.rpm # We don't want this
+
for FILE in *.rpm ; do rpm2cpio < $FILE | cpio -imdv ; done
rm -rf desktop-integration *.rpm
mv opt usr $PKG
cd $PKG
# Kill a broken symlink
-rm -f $PKG/usr/share/applications/startcenter.desktop
+rm -f $PKG/usr/share/applications/broffice.org3-startcenter.desktop
# Create symlinks in /usr/bin to actual binaries
cd $PKG/usr/bin
@@ -91,7 +123,7 @@ cd $PKG/usr/bin
cd -
# Remove DejaVu and Liberation fonts - these are included in other packages
-rm -f opt/openoffice.org/basis3.1/share/fonts/truetype/[DL]*.ttf
+rm -f opt/openoffice.org/basis3.2/share/fonts/truetype/[DL]*.ttf
# Fix Exec commands in the desktop files
# See http://bugzilla.xfce.org/show_bug.cgi?id=2430