summaryrefslogtreecommitdiff
path: root/office/openoffice.org/openoffice.org.SlackBuild
diff options
context:
space:
mode:
authorRyan P.C. McQuen <ryanpcmcquen@gmail.com>2014-04-09 23:37:28 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-04-09 23:37:28 +0700
commit52af0e533a50aa8f7e03ad3e3d9ef6aea3b878a9 (patch)
treececabe09d1ae107aef5b035abf9f3dd47b9b3f40 /office/openoffice.org/openoffice.org.SlackBuild
parent08b7e111dfcdc269e43985cab063809650b5b7cf (diff)
downloadslackbuilds-52af0e533a50aa8f7e03ad3e3d9ef6aea3b878a9.tar.gz
office/openoffice.org: Updated for version 4.0.1 + new maintainer.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'office/openoffice.org/openoffice.org.SlackBuild')
-rw-r--r--office/openoffice.org/openoffice.org.SlackBuild109
1 files changed, 35 insertions, 74 deletions
diff --git a/office/openoffice.org/openoffice.org.SlackBuild b/office/openoffice.org/openoffice.org.SlackBuild
index 1e535033a6..8e78edea2b 100644
--- a/office/openoffice.org/openoffice.org.SlackBuild
+++ b/office/openoffice.org/openoffice.org.SlackBuild
@@ -1,8 +1,12 @@
#!/bin/sh
-# Slackware build script for OpenOffice
+# Slackware build script for openoffice.org
-# Copyright 2006,2007,2008,2009,2010 Robby Workman, Northport, Alabama, ASA
+# Originally written by Niki Kovacs <info@microlinux.fr)
+#
+# Rewritten for slackbuilds.org by Ryan P.C. McQuen
+# Copyright 2014 Ryan P.C. McQuen, ryan.q@linux.com, WA
+#
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,17 +26,11 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-# Modified (and currently maintained by) by Gerardo, email: gerardo.gr90@gmail.com
-
-
PRGNAM=openoffice.org
-VERSION=${VERSION:-3.3.0}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-4.0.1}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-
-# These variables seem to change with (almost) every release...
-SRCVERSION=$VERSION
-SRCSHORT=$(echo $VERSION | cut -f1-2 -d.) #"3.3"
+SRCSHORT=$(echo $VERSION | cut -f1-2 -d.)
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -43,21 +41,13 @@ if [ -z "$ARCH" ]; then
fi
CWD=$(pwd)
-TMP=${TMP:-/tmp/SBo} # For consistency's sake, use this
+TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
-OUTPUT=${OUTPUT:-/tmp} # Drop the package in /tmp
+OUTPUT=${OUTPUT:-/tmp}
OOLANG=${OOLANG:-en-US}
PKG_LANG=${OOLANG//-/_} # Leave this alone
-# Until now all releases were without the JRE...
-WJRE=${WJRE:-yes}
-
-# If you want to disable java support by removing executable permissions
-# from OpenOffice's java loader (this will not affect other apps), set this
-# variable to "YES" Default is "NO"
-DISABLE_JAVA=${DISABLE_JAVA:-NO}
-
# Change source package name
if [ "$ARCH" = "x86_64" ]; then
SRCARCH="x86-64"
@@ -70,33 +60,19 @@ else
PKGARCH="i586"
fi
-# Specify if we are going to include de JRE pkg
-if [ $WJRE != no ]; then
- TARJRE="-wJRE"
-else
- TARJRE=""
-fi
+set -e
# Building the final name.
-TARNAME="OOo_${VERSION}_Linux_${SRCARCH}_install-rpm${TARJRE}_${OOLANG}.tar.gz"
-
-ls $TARNAME
-
-# Check if we have the tarball
-if [ ! -r $TARBALL ]; then
- echo "$TARBALL not found"
- exit 1
-fi
+TARNAME="Apache_OpenOffice_${VERSION}_Linux_${SRCARCH}_install-rpm_${OOLANG}.tar.gz"
# Ignore this - it's just to get the toplevel directory name of the
# extracted tarball archive
SOURCEDIR=$(tar tzf $CWD/$TARNAME 2>/dev/null | head -n 1 | tr -d \/)
# 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
+# Normally SOURCEDIR=en-US
[ -z $SOURCEDIR ] && unset SOURCEDIR
-set -eu
-
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
rm -rf $TMP/$SOURCEDIR
@@ -104,61 +80,46 @@ rm -rf $TMP/$SOURCEDIR
# Extract tarball
tar xvf $CWD/$TARNAME -C $TMP
-# 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
# We only need the freedesktop integration, so we move it to the current location
-mv desktop-integration/openoffice.org$SRCSHORT-freedesktop-menus-$SRCSHORT-*.noarch.rpm .
+mv desktop-integration/openoffice$SRCSHORT-freedesktop-menus-$SRCSHORT-*.noarch.rpm .
# We don't want this, so we delete the *onlineupdate*.rpm
rm -f *onlineupdate*.rpm
# Extract the files from the *.rpm
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/openoffice.org3-startcenter.desktop
-
-# Create symlinks in /usr/bin to actual binaries
-# Cambiar los nombres de sbase,scalc, etc, por los de open office
+# Fix broken symlinks
cd $PKG/usr/bin
+ rm -f soffice
+ ln -s ../../opt/openoffice4/program/soffice .
+cd -
+cd $PKG/usr/share/applications
for FILE in \
- sbase scalc sdraw simpress smath soffice spadmin swriter unopkg ; do
- rm -f $FILE
- ln -sf ../../opt/openoffice.org3/program/$FILE $FILE ;
+ base calc draw impress javafilter math printeradmin startcenter writer ; do
+ rm -f openoffice4-$FILE.desktop
+ ln -sf ../../../opt/openoffice4/share/xdg/$FILE.desktop $FILE.desktop ;
done
cd -
-# Remove DejaVu and Liberation fonts - these are included in other packages
-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
-cd $PKG//opt/openoffice.org3/share/xdg/
- for APP in base calc draw impress math writer; do
- sed -i 's%Exec=openoffice.org3 -%Exec=s%' $APP.desktop ;
- done
-cd -
+# Remove DejaVu fonts - these are included in other packages
+rm -f $PKG/opt/openoffice4/share/fonts/truetype/DejaVu*.ttf
# Move docs to their expected locations
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cd $PKG/opt/openoffice.org3
- mv README* *LICENSE* readmes $PKG/usr/doc/$PRGNAM-$VERSION
+cd $PKG/opt/openoffice4
+ mv README* share/readme/* $PKG/usr/doc/$PRGNAM-$VERSION
+ rmdir share/readme
cd -
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-# Disable Java support if desired (see above)
-if [ "$DISABLE_JAVA" = "YES" ]; then
- chmod -x $PKG/opt/$PRGNAM$SRCSHORT/ure/bin/javaldx
-fi
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-# We create the install dir, and add to it the slack-desc and doinst.sh file
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
@@ -166,9 +127,9 @@ 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 {} \;
-find -L . \
- \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
- -o -perm 511 \) -exec chmod 755 {} \; -o \
- \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+chmod -R u+rw,go+r-w,a-s .
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-${VERSION}_${PKG_LANG}-$PKGARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+
+# Cleanup
+cd $TMP
+rm -rf $OOLANG $PKG