summaryrefslogtreecommitdiffstats
path: root/libreoffice/build/libreoffice42.SlackBuild
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2013-01-28 12:48:41 +0000
committer Eric Hameleers <alien@slackware.com>2013-01-28 12:48:41 +0000
commit6833d2a94c47ac0faec7a54e08ec524732e4f379 (patch)
treee0acd5a7c1f60d8e583dc14b10623d4f5caa8f89 /libreoffice/build/libreoffice42.SlackBuild
parentadf77a6c47242d172c310213f493d6fd5ef86325 (diff)
downloadasb-6833d2a94c47ac0faec7a54e08ec524732e4f379.tar.gz
asb-6833d2a94c47ac0faec7a54e08ec524732e4f379.tar.xz
Initial revision
Diffstat (limited to 'libreoffice/build/libreoffice42.SlackBuild')
-rwxr-xr-xlibreoffice/build/libreoffice42.SlackBuild1341
1 files changed, 1341 insertions, 0 deletions
diff --git a/libreoffice/build/libreoffice42.SlackBuild b/libreoffice/build/libreoffice42.SlackBuild
new file mode 100755
index 00000000..168ed80f
--- /dev/null
+++ b/libreoffice/build/libreoffice42.SlackBuild
@@ -0,0 +1,1341 @@
+#!/bin/sh
+# $Id$
+# Copyright 2010, 2011, 2012, 2013 Eric Hameleers, Eindhoven, NL
+# All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software for
+# any purpose with or without fee is hereby granted, provided that
+# the above copyright notice and this permission notice appear in all
+# copies.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+# CONTRIBUTORS 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.
+# -----------------------------------------------------------------------------
+#
+# Slackware SlackBuild script
+# ===========================
+# By: Eric Hameleers <alien@slackware.com>
+# For: libreoffice
+# Descr: free office suite
+# URL: http://www.libreoffice.org/
+# Needs:
+# Build-time: apache-ant,jdk,perl-archive-zip
+# (and for Slackware 13.37, you need to install mozilla-nss and
+# also upgrade to the seamonkey and seamonkey-solibs in /patches !)
+# Changelog:
+# 20101010-1: 10/oct/2010 by Eric Hameleers <alien@slackware.com>
+# * Initial build from git. I will refine this SlackBuild, once a
+# stable software version becomes available.
+# 20101012-1: 12/oct/2010 by Eric Hameleers <alien@slackware.com>
+# * Add the internal version number to the package name,
+# so that the package version will be like "3.2.99.2_20101012".
+# Remove the slack-required file, since this package has no
+# run-time dependencies any more.
+# 3.2.99.3-1: 21/nov/2010 by Eric Hameleers <alien@slackware.com>
+# * LibreOffice 3.3-beta3.
+# Fix permissions of LICENSE.odt file.
+# 3.2.99.3-2: 28/nov/2010 by Eric Hameleers <alien@slackware.com>
+# * Do not create a language pack for the default language.
+# Compile -without "-O2" - this seems to be required to stay
+# compatible with OOo extensions.
+# Use the correct location of apache-ant in Slackware.conf.in.
+# Make preparations for off-line build (the SlackBuild downloads
+# all sources first).
+# 3.3.0.1-1: 06/dec/2010 by Eric Hameleers <alien@slackware.com>
+# * Update to 3.3.0-rc1
+# 3.3.0.2-1: 24/dec/2010 by Eric Hameleers <alien@slackware.com>
+# * Update to 3.3.0-rc2
+# 3.3.0.3-1: 14/jan/2011 by Eric Hameleers <alien@slackware.com>
+# * Update to 3.3.0-rc3
+# 3.3.0.3-2: 15/jan/2011 by Eric Hameleers <alien@slackware.com>
+# * Had to fix the menu entries (.desktop files) because the
+# program names changed (like oowriter -> lowriter).
+# 3.3.0.4-1: 21/jan/2011 by Eric Hameleers <alien@slackware.com>
+# * Updated to Release Candidate 4 of the upcoming 3.3.0.
+# 3.3.0-1: 25/jan/2011 by Eric Hameleers <alien@slackware.com>
+# * Release 3.3.0, the first ever LibreOffice after the split-off
+# from OpenOffice.org. In fact, this is the same code as the RC4.
+# I rebuilt it anyway because I promised to add a couple of
+# language packs.
+# 3.3.1-1: 24/feb/2011 by Eric Hameleers <alien@slackware.com>
+# * Update to new release 3.3.1, added more language packs.
+# Also this time, really add the dictionaries for some of the
+# major world languages.
+# 3.3.1-2: 04/mar/2011 by Eric Hameleers <alien@slackware.com>
+# * Not really a rebuild, but I uploaded the wrong 64bit packages,
+# and had to change the BUILD number for when I upload the
+# correct packages...
+# 3.3.2-1: 23/mar/2011 by Eric Hameleers <alien@slackware.com>
+# * Update to a new release.
+# The SlackBuild has been updated to use new LibreOffice menu
+# icons instead of the old OOo versions.
+# Also add italian dictionary (request).
+# 3.4.0-1: 03/jun/2011 by Eric Hameleers <alien@slackware.com>
+# * A new major release. The source tarballs are identical to the
+# second release candidate.
+# Added german dictionary (dict-de-DE_frami) and polish pl-dict
+# on request. Added bundled scripting extensions.
+# Stopped building from the 'build' tarball since that seems
+# to be deprecated soon. Stupid decision folks! It makes proper
+# packaging so much harder.
+# 3.4.1-1: 04/jul/2011 by Eric Hameleers <alien@slackware.com>
+# * Bugfix release - 'still not ready for production use' but
+# 3.4.2-1: 01/aug/2011 by Eric Hameleers <alien@slackware.com>
+# * New release says "Safe for production use by most users and
+# enterprises".
+# 3.4.3-1: 31/aug/2011 by Eric Hameleers <alien@slackware.com>
+# * New release.
+# Split off the browser plugin to a separate package.
+# 3.4.4-1: 09/nov/2011 by Eric Hameleers <alien@slackware.com>
+# * New release.
+# 3.4.4-2: 24/nov/2011 by Eric Hameleers <alien@slackware.com>
+# * Apply two patches to fix annoying issues with KDE (black
+# tooltips and non-movable horizontal scrollbar).
+# 3.4.5-1: 17/jan/2012 by Eric Hameleers <alien@slackware.com>
+# * Added Swedish dictionary (requested by eXpander). Fixed the
+# name of the Polish dictionary so that it gets really included.
+# Moved a lot of language-specific files to their language packs.
+# Thanks to Andrzej Szelachow for reporting about the dictionary
+# and language files.
+# 3.5.2-1: 08/apr/2012 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 3.5.3-1: 03/may/2012 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 3.5.3-3: 08/may/2012 by Eric Hameleers <alien@slackware.com>
+# * Fix general input/output error on save/open of a
+# password-protected file
+# 3.5.3-4: 17/may/2012 by Eric Hameleers <alien@slackware.com>
+# * I accidentally had the download of .oxt files commented out.
+# Also, LO would not start on secondary monitor, see bug
+# https://bugs.freedesktop.org/show_bug.cgi?id=49365
+# 3.5.4-1: 31/may/2012 by Eric Hameleers <alien@slackware.com>
+# * Minor update.
+# 3.5.5-1: 11/jul/2012 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 3.5.6-1: 17/jul/2012 by Eric Hameleers <alien@slackware.com>
+# * Update.
+# 3.6.1-1: 02/oct/2012 by Eric Hameleers <alien@slackware.com>
+# * New release, still built for Slackware 13.37.
+# 3.6.2-1: 05/oct/2012 by Eric Hameleers <alien@slackware.com>
+# * New release, still built for Slackware 13.37.
+# 3.6.2-2: 10/oct/2012 by Eric Hameleers <alien@slackware.com>
+# * Try to fix the "save with password" issue
+# (general input/output error).
+# 3.6.3-1: 02/nov/2012 by Eric Hameleers <alien@slackware.com>
+# * New release, still built for Slackware 13.37.
+# 3.6.4-1: 06/dec/2012 by Eric Hameleers <alien@slackware.com>
+# * New release. Refreshed the swedish dictionary.
+# 4.0.0-1: 28/jan/2013 by Eric Hameleers <alien@slackware.com>
+# * Preview of the new 4.0.0 release.
+#
+# Run 'sh libreoffice.SlackBuild' to build a Slackware package.
+# The package (.txz) and .txt file as well as build logs are created in /tmp .
+# Install it using 'installpkg'.
+#
+# -----------------------------------------------------------------------------
+
+# Set initial variables:
+
+PRGNAM=libreoffice
+PRGNAM2=mozplugin
+BUILD=${BUILD:-1}
+TAG=${TAG:-alien}
+
+# SRCVER is the variable you control. It can be one of:
+# "HEAD" - in which case a new git # snapshot will be pulled,
+# "yyyymmdd" - like "20101126", if you downloaded a git snapshot before, or
+# "X.Y.Z" - like "3.2.99.3", meaning a release tarball is used.
+# **
+# ** NOTE: the script may be broken for GIT builds at the moment! **
+# **
+#SRCVER=${SRCVER:-20101121}
+#SRCVER=${SRCVER:-HEAD}
+#SRCVER=${SRCVER:-3.3.0.4}
+
+SRCVER=${SRCVER:-4.0.0}
+SUBVER=".2"
+
+# If we pull a git shapshot, use today's date as the VERSION:
+# If we are building offline, we do not want git checks:
+if [ "$SRCVER" = "HEAD" ]; then
+ VERSION=$(date +%Y%m%d)
+ USE_GIT="yes"
+ COMPR="xz"
+elif [ "$(echo $SRCVER |cut -c1,2)" = "20" ]; then
+ VERSION=$SRCVER
+ USE_GIT="yes"
+ COMPR="xz"
+else
+ VERSION=$SRCVER
+ USE_GIT="no"
+ COMPR="xz"
+fi
+
+DOCS="AUTHORS COPYING* MAINTAINERS NEWS README* TODO"
+
+NUMCPUS=${NUMCPUS:-2}
+
+PACKAGER="Eric Hameleers"
+
+# Where do we look for sources?
+SRCDIR=$(cd $(dirname $0); pwd)
+
+# Select default langue for the libreoffice package:
+DEF_LANG=${DEF_LANG:-"en_US"}
+
+# If this variable is non-empty, we will build additional language packs;
+# otherwise LibreOffice will be built for one language, defined in DEF_LANG:
+# Note:
+# The languages plus their descriptive names are kept in an external file
+# called 'languages' in the same directory as the SlackBuild script.
+# Edit that file if you want to add more languages.
+# Note:
+# The packagenames use official language code like 'en_US' while LibreOffice
+# uses 'en-US'.
+#
+#ADD_LANGUAGES=""
+ADD_LANGUAGES="$(cat $SRCDIR/languages |grep -v "^#" |cut -f1 -d= |tr '\n' ' ' |tr -s ' ' |sed -e 's/ *$//')"
+
+# Place to build (TMP) package (PKG) and output (OUTPUT) the program:
+TMP=${TMP:-/tmp/build}
+PKG=$TMP/package-$PRGNAM
+PKG2=$TMP/package-$PRGNAM-$PRGNAM2
+OUTPUT=${OUTPUT:-/tmp}
+
+# Base resource locators for tarballs and snapshots
+# - if you are building from git snapshots, it is wise to point GITBASE to
+# a local directory where you keep clones of the remote repositories:
+SRCBASE="http://download.documentfoundation.org/libreoffice/src/${VERSION}"
+GITBASE="git://anongit.freedesktop.org/git/libreoffice"
+
+# Core components of LibreOffice (downloaded or checked-out) are:
+# core dictionaries help translations
+
+# Use SRCURL for tarball releases and GITURI for git snapshots:
+
+SOURCE[0]="$SRCDIR/sources/libreoffice-${VERSION}${SUBVER}.tar.${COMPR}"
+SRCURL[0]="$SRCBASE/libreoffice-${VERSION}${SUBVER}.tar.${COMPR}"
+GITURI[0]="$GITBASE/core"
+
+SOURCE[1]="$SRCDIR/sources/libreoffice-dictionaries-${VERSION}${SUBVER}.tar.${COMPR}"
+SRCURL[1]="$SRCBASE/libreoffice-dictionaries-${VERSION}${SUBVER}.tar.${COMPR}"
+GITURI[1]="$GITBASE/dictionaries"
+
+SOURCE[2]="$SRCDIR/sources/libreoffice-help-${VERSION}${SUBVER}.tar.${COMPR}"
+SRCURL[2]="$SRCBASE/libreoffice-help-${VERSION}${SUBVER}.tar.${COMPR}"
+GITURI[2]="$GITBASE/help"
+
+SOURCE[3]="$SRCDIR/sources/libreoffice-translations-${VERSION}${SUBVER}.tar.${COMPR}"
+SRCURL[3]="$SRCBASE/libreoffice-translations-${VERSION}${SUBVER}.tar.${COMPR}"
+GITURI[3]="$GITBASE/translations"
+
+# Two files that are used to determine what needs to be downloaded:
+SOURCE[4]="$SRCDIR/sources/download.lst-${VERSION}${SUBVER}"
+SRCURL[4]="http://cgit.freedesktop.org/libreoffice/core/plain/download.lst?id=libreoffice-${VERSION}${SUBVER}"
+SOURCE[5]="$SRCDIR/sources/Makefile.fetch-${VERSION}${SUBVER}"
+SRCURL[5]="http://cgit.freedesktop.org/libreoffice/core/plain/Makefile.fetch?id=libreoffice-${VERSION}${SUBVER}"
+
+# Additional dictionaries I'd like to have installed:
+
+SOURCE[6]="$SRCDIR/sources/dict-en-US.oxt"
+SRCURL[6]="http://extensions.services.openoffice.org/e-files/1470/1/en_US.oxt"
+SOURCE[7]="$SRCDIR/sources/dict-en-GB.oxt"
+SRCURL[7]="http://numbertext.org/tmp/dict-en.oxt"
+SOURCE[8]="$SRCDIR/sources/dict-es.oxt"
+#SRCURL[8]="http://extensions.services.openoffice.org/e-files/2979/3/es_ES.oxt"
+SRCURL[8]="http://extensions.services.openoffice.org/e-files/1639/1/es_ANY.oxt"
+SOURCE[9]="$SRCDIR/sources/dict-fr.oxt"
+SRCURL[9]="http://extensions.services.openoffice.org/e-files/3554/3/ooo-dictionnaire-fr-moderne-v4.0.oxt"
+SOURCE[10]="$SRCDIR/sources/dict-nl.oxt"
+SRCURL[10]="http://extensions.services.openoffice.org/e-files/1456/6/nl-dict-v2.00g.oxt"
+SOURCE[11]="$SRCDIR/sources/dict-it.oxt"
+SRCURL[11]="http://extensions.services.openoffice.org/e-files/1064/0/dict-it-IT_and_Latin_2010-08-23.oxt"
+SOURCE[12]="$SRCDIR/sources/dict-de.oxt"
+SRCURL[12]="http://extensions.services.openoffice.org/e-files/1075/8/dict-de_DE-frami_2010-12-04.oxt"
+SOURCE[13]="$SRCDIR/sources/dict-pl.oxt"
+SRCURL[13]="http://extensions.services.openoffice.org/e-files/806/4/pl-dict.oxt"
+SOURCE[14]="$SRCDIR/sources/dict-sv.oxt"
+SRCURL[14]="http://extensions.libreoffice.org/extension-center/swedish-spelling-dictionary-den-stora-svenska-ordlistan/releases/2.11/ooo_swedish_dict_2.11.oxt"
+
+# Extra libraries / binaries required to build LibreOffice from source:
+# Lots of tarballs of which I am not sure which one are really needed...
+#
+# A quick way to find if the array needs editing is to run this command
+# (it should output nothing):
+# for FILE in `wget -q -O - "http://cgit.freedesktop.org/libreoffice/core/plain/ooo.lst.in?id=$(echo $PRGNAM-$VERSION$SUBVER)" |grep -v "^http://"` |grep -v "^@" ; do if [ ! -f sources/$FILE ]; then echo $FILE; fi ; done;
+#
+
+# --- Start of section generated by gensrc_lo4.sh ---
+# External sources for libreoffice-4.0.0.2
+
+SOURCE[15]="$SRCDIR/sources/185d60944ea767075d27247c3162b3bc-unowinreg.dll"
+SRCURL[15]="http://dev-www.libreoffice.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll"
+
+SOURCE[16]="$SRCDIR/sources/libcdr-0.0.9.tar.bz2"
+SRCURL[16]="http://dev-www.libreoffice.org/src/libcdr-0.0.9.tar.bz2"
+
+SOURCE[17]="$SRCDIR/sources/libmspub-0.0.3.tar.bz2"
+SRCURL[17]="http://dev-www.libreoffice.org/src/libmspub-0.0.3.tar.bz2"
+
+SOURCE[18]="$SRCDIR/sources/libvisio-0.0.24.tar.bz2"
+SRCURL[18]="http://dev-www.libreoffice.org/src/libvisio-0.0.24.tar.bz2"
+
+SOURCE[19]="$SRCDIR/sources/1756c4fa6c616ae15973c104cd8cb256-Adobe-Core35_AFMs-314.tar.gz"
+SRCURL[19]="http://dev-www.libreoffice.org/src/1756c4fa6c616ae15973c104cd8cb256-Adobe-Core35_AFMs-314.tar.gz"
+
+SOURCE[20]="$SRCDIR/sources/af3c3acf618de6108d65fcdc92b492e1-commons-codec-1.3-src.tar.gz"
+SRCURL[20]="http://dev-www.libreoffice.org/src/af3c3acf618de6108d65fcdc92b492e1-commons-codec-1.3-src.tar.gz"
+
+SOURCE[21]="$SRCDIR/sources/2c9b0f83ed5890af02c0df1c1776f39b-commons-httpclient-3.1-src.tar.gz"
+SRCURL[21]="http://dev-www.libreoffice.org/src/2c9b0f83ed5890af02c0df1c1776f39b-commons-httpclient-3.1-src.tar.gz"
+
+SOURCE[22]="$SRCDIR/sources/2ae988b339daec234019a7066f96733e-commons-lang-2.3-src.tar.gz"
+SRCURL[22]="http://dev-www.libreoffice.org/src/2ae988b339daec234019a7066f96733e-commons-lang-2.3-src.tar.gz"
+
+SOURCE[23]="$SRCDIR/sources/3c219630e4302863a9a83d0efde889db-commons-logging-1.1.1-src.tar.gz"
+SRCURL[23]="http://dev-www.libreoffice.org/src/3c219630e4302863a9a83d0efde889db-commons-logging-1.1.1-src.tar.gz"
+
+SOURCE[24]="$SRCDIR/sources/f02578f5218f217a9f20e9c30e119c6a-boost_1_44_0.tar.bz2"
+SRCURL[24]="http://dev-www.libreoffice.org/src/f02578f5218f217a9f20e9c30e119c6a-boost_1_44_0.tar.bz2"
+
+SOURCE[25]="$SRCDIR/sources/ea570af93c284aa9e5621cd563f54f4d-bsh-2.0b1-src.tar.gz"
+SRCURL[25]="http://dev-www.libreoffice.org/src/ea570af93c284aa9e5621cd563f54f4d-bsh-2.0b1-src.tar.gz"
+
+SOURCE[26]="$SRCDIR/sources/f101a9e88b783337b20b2e26dfd26d5f-cairo-1.10.2.tar.gz"
+SRCURL[26]="http://dev-www.libreoffice.org/src/f101a9e88b783337b20b2e26dfd26d5f-cairo-1.10.2.tar.gz"
+
+SOURCE[27]="$SRCDIR/sources/48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz"
+SRCURL[27]="http://dev-www.libreoffice.org/src/48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz"
+
+SOURCE[28]="$SRCDIR/sources/b2371dc7cf4811c9d32146eec913d296-libcmis-0.3.0.tar.gz"
+SRCURL[28]="http://dev-www.libreoffice.org/src/b2371dc7cf4811c9d32146eec913d296-libcmis-0.3.0.tar.gz"
+
+SOURCE[29]="$SRCDIR/sources/fa9aa839145cdf860bf596532bb8af97-cppunit-1.13.1.tar.gz"
+SRCURL[29]="http://dev-www.libreoffice.org/src/fa9aa839145cdf860bf596532bb8af97-cppunit-1.13.1.tar.gz"
+
+SOURCE[30]="$SRCDIR/sources/451ccf439a36a568653b024534669971-ConvertTextToNumber-1.3.2.oxt"
+SRCURL[30]="http://dev-www.libreoffice.org/src/451ccf439a36a568653b024534669971-ConvertTextToNumber-1.3.2.oxt"
+
+SOURCE[31]="$SRCDIR/sources/3fa4d5236f2a36ca5c3af6715e837691-curl-7.26.0.tar.gz"
+SRCURL[31]="http://dev-www.libreoffice.org/src/3fa4d5236f2a36ca5c3af6715e837691-curl-7.26.0.tar.gz"
+
+SOURCE[32]="$SRCDIR/sources/3ade8cfe7e59ca8e65052644fed9fca4-epm-3.7.tar.gz"
+SRCURL[32]="http://dev-www.libreoffice.org/src/3ade8cfe7e59ca8e65052644fed9fca4-epm-3.7.tar.gz"
+
+SOURCE[33]="$SRCDIR/sources/dd7dab7a5fea97d2a6a43f511449b7cd-expat-2.1.0.tar.gz"
+SRCURL[33]="http://dev-www.libreoffice.org/src/dd7dab7a5fea97d2a6a43f511449b7cd-expat-2.1.0.tar.gz"
+
+SOURCE[34]="$SRCDIR/sources/77e15a92006ddc2adbb06f840d591c0e-fontconfig-2.8.0.tar.gz"
+SRCURL[34]="http://dev-www.libreoffice.org/src/77e15a92006ddc2adbb06f840d591c0e-fontconfig-2.8.0.tar.gz"
+
+SOURCE[35]="$SRCDIR/sources/f872f4ac066433d8ff92f5e316b36ff9-dejavu-fonts-ttf-2.33.zip"
+SRCURL[35]="http://dev-www.libreoffice.org/src/f872f4ac066433d8ff92f5e316b36ff9-dejavu-fonts-ttf-2.33.zip"
+
+SOURCE[36]="$SRCDIR/sources/35efabc239af896dfb79be7ebdd6e6b9-gentiumbasic-fonts-1.10.zip"
+SRCURL[36]="http://dev-www.libreoffice.org/src/35efabc239af896dfb79be7ebdd6e6b9-gentiumbasic-fonts-1.10.zip"
+
+SOURCE[37]="$SRCDIR/sources/0be45d54cc5e1c2e3102e32b8c190346-liberation-fonts-ttf-1.07.1.tar.gz"
+SRCURL[37]="http://dev-www.libreoffice.org/src/0be45d54cc5e1c2e3102e32b8c190346-liberation-fonts-ttf-1.07.1.tar.gz"
+
+SOURCE[38]="$SRCDIR/sources/5c781723a0d9ed6188960defba8e91cf-liberation-fonts-ttf-2.00.1.tar.gz"
+SRCURL[38]="http://dev-www.libreoffice.org/src/5c781723a0d9ed6188960defba8e91cf-liberation-fonts-ttf-2.00.1.tar.gz"
+
+SOURCE[39]="$SRCDIR/sources/e7a384790b13c29113e22e596ade9687-LinLibertineG-20120116.zip"
+SRCURL[39]="http://dev-www.libreoffice.org/src/e7a384790b13c29113e22e596ade9687-LinLibertineG-20120116.zip"
+
+SOURCE[40]="$SRCDIR/sources/7a15edea7d415ac5150ea403e27401fd-open-sans-font-ttf-1.10.tar.gz"
+SRCURL[40]="http://dev-www.libreoffice.org/src/7a15edea7d415ac5150ea403e27401fd-open-sans-font-ttf-1.10.tar.gz"
+
+SOURCE[41]="$SRCDIR/sources/c3c1a8ba7452950636e871d25020ce0d-pt-serif-font-1.0000W.tar.gz"
+SRCURL[41]="http://dev-www.libreoffice.org/src/c3c1a8ba7452950636e871d25020ce0d-pt-serif-font-1.0000W.tar.gz"
+
+SOURCE[42]="$SRCDIR/sources/0279a21fab6f245e85a6f85fea54f511-source-code-font-1.009.tar.gz"
+SRCURL[42]="http://dev-www.libreoffice.org/src/0279a21fab6f245e85a6f85fea54f511-source-code-font-1.009.tar.gz"
+
+SOURCE[43]="$SRCDIR/sources/1e9ddfe25ac9577da709d7b2ea36f939-source-sans-font-1.036.tar.gz"
+SRCURL[43]="http://dev-www.libreoffice.org/src/1e9ddfe25ac9577da709d7b2ea36f939-source-sans-font-1.036.tar.gz"
+
+SOURCE[44]="$SRCDIR/sources/dbf2caca1d3afd410a29217a9809d397-freetype-2.4.8.tar.bz2"
+SRCURL[44]="http://dev-www.libreoffice.org/src/dbf2caca1d3afd410a29217a9809d397-freetype-2.4.8.tar.bz2"
+
+SOURCE[45]="$SRCDIR/sources/f5ef3f7f10fa8c3542c6a085a233080b-graphite2-1.2.0.tgz"
+SRCURL[45]="http://dev-www.libreoffice.org/src/f5ef3f7f10fa8c3542c6a085a233080b-graphite2-1.2.0.tgz"
+
+SOURCE[46]="$SRCDIR/sources/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip"
+SRCURL[46]="http://dev-www.libreoffice.org/src/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip"
+
+SOURCE[47]="$SRCDIR/sources/3121aaf3e13e5d88dfff13fb4a5f1ab8-hunspell-1.3.2.tar.gz"
+SRCURL[47]="http://dev-www.libreoffice.org/src/3121aaf3e13e5d88dfff13fb4a5f1ab8-hunspell-1.3.2.tar.gz"
+
+SOURCE[48]="$SRCDIR/sources/a2f6010987e1c601274ab5d63b72c944-hyphen-2.8.4.tar.gz"
+SRCURL[48]="http://dev-www.libreoffice.org/src/a2f6010987e1c601274ab5d63b72c944-hyphen-2.8.4.tar.gz"
+
+SOURCE[49]="$SRCDIR/sources/fc188d2ed5c2cbcf7a021b34b9f88478-icudt49l-subset.zip"
+SRCURL[49]="http://dev-www.libreoffice.org/src/fc188d2ed5c2cbcf7a021b34b9f88478-icudt49l-subset.zip"
+
+SOURCE[50]="$SRCDIR/sources/7c53f83e0327343f4060c0eb83842daf-icu4c-49_1_1-src.tgz"
+SRCURL[50]="http://dev-www.libreoffice.org/src/7c53f83e0327343f4060c0eb83842daf-icu4c-49_1_1-src.tgz"
+
+SOURCE[51]="$SRCDIR/sources/ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip"
+SRCURL[51]="http://dev-www.libreoffice.org/src/ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip"
+
+SOURCE[52]="$SRCDIR/sources/d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip"
+SRCURL[52]="http://dev-www.libreoffice.org/src/d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip"
+
+SOURCE[53]="$SRCDIR/sources/eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip"
+SRCURL[53]="http://dev-www.libreoffice.org/src/eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip"
+
+SOURCE[54]="$SRCDIR/sources/3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip"
+SRCURL[54]="http://dev-www.libreoffice.org/src/3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip"
+
+SOURCE[55]="$SRCDIR/sources/3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip"
+SRCURL[55]="http://dev-www.libreoffice.org/src/3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip"
+
+SOURCE[56]="$SRCDIR/sources/db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip"
+SRCURL[56]="http://dev-www.libreoffice.org/src/db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip"
+
+SOURCE[57]="$SRCDIR/sources/97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip"
+SRCURL[57]="http://dev-www.libreoffice.org/src/97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip"
+
+SOURCE[58]="$SRCDIR/sources/8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip"
+SRCURL[58]="http://dev-www.libreoffice.org/src/8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip"
+
+SOURCE[59]="$SRCDIR/sources/f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip"
+SRCURL[59]="http://dev-www.libreoffice.org/src/f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip"
+
+SOURCE[60]="$SRCDIR/sources/ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip"
+SRCURL[60]="http://dev-www.libreoffice.org/src/ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip"
+
+SOURCE[61]="$SRCDIR/sources/39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip"
+SRCURL[61]="http://dev-www.libreoffice.org/src/39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip"
+
+SOURCE[62]="$SRCDIR/sources/a2c10c04f396a9ce72894beb18b4e1f9-jpeg-8c.tar.gz"
+SRCURL[62]="http://dev-www.libreoffice.org/src/a2c10c04f396a9ce72894beb18b4e1f9-jpeg-8c.tar.gz"
+
+SOURCE[63]="$SRCDIR/sources/b63e6340a02ff1cacfeadb2c42286161-JLanguageTool-1.7.0.tar.bz2"
+SRCURL[63]="http://dev-www.libreoffice.org/src/b63e6340a02ff1cacfeadb2c42286161-JLanguageTool-1.7.0.tar.bz2"
+
+SOURCE[64]="$SRCDIR/sources/861ef15fa0bc018f9ddc932c4ad8b6dd-lcms2-2.4.tar.gz"
+SRCURL[64]="http://dev-www.libreoffice.org/src/861ef15fa0bc018f9ddc932c4ad8b6dd-lcms2-2.4.tar.gz"
+
+SOURCE[65]="$SRCDIR/sources/dc3d21a3921931096d6e80f6701f6763-libexttextcat-3.4.0.tar.bz2"
+SRCURL[65]="http://dev-www.libreoffice.org/src/dc3d21a3921931096d6e80f6701f6763-libexttextcat-3.4.0.tar.bz2"
+
+SOURCE[66]="$SRCDIR/sources/54e578c91b1b68e69c72be22adcb2195-liblangtag-0.4.0.tar.bz2"
+SRCURL[66]="http://dev-www.libreoffice.org/src/54e578c91b1b68e69c72be22adcb2195-liblangtag-0.4.0.tar.bz2"
+
+SOURCE[67]="$SRCDIR/sources/1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz"
+SRCURL[67]="http://dev-www.libreoffice.org/src/1f24ab1d39f4a51faf22244c94a6203f-xmlsec1-1.2.14.tar.gz"
+
+SOURCE[68]="$SRCDIR/sources/7740a8ec23878a2f50120e1faa2730f2-libxml2-2.7.6.tar.gz"
+SRCURL[68]="http://dev-www.libreoffice.org/src/7740a8ec23878a2f50120e1faa2730f2-libxml2-2.7.6.tar.gz"
+
+SOURCE[69]="$SRCDIR/sources/e61d0364a30146aaa3001296f853b2b9-libxslt-1.1.26.tar.gz"
+SRCURL[69]="http://dev-www.libreoffice.org/src/e61d0364a30146aaa3001296f853b2b9-libxslt-1.1.26.tar.gz"
+
+SOURCE[70]="$SRCDIR/sources/26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz"
+SRCURL[70]="http://dev-www.libreoffice.org/src/26b3e95ddf3d9c077c480ea45874b3b8-lp_solve_5.5.tar.gz"
+
+SOURCE[71]="$SRCDIR/sources/9f9e15966b5624834157fe3d748312bc-mdds_0.6.1.tar.bz2"
+SRCURL[71]="http://dev-www.libreoffice.org/src/9f9e15966b5624834157fe3d748312bc-mdds_0.6.1.tar.bz2"
+
+SOURCE[72]="$SRCDIR/sources/a169ab152209200a7bad29a275cb0333-seamonkey-1.1.14.source.tar.gz"
+SRCURL[72]="http://dev-www.libreoffice.org/src/a169ab152209200a7bad29a275cb0333-seamonkey-1.1.14.source.tar.gz"
+
+SOURCE[73]="$SRCDIR/sources/0981bda6548a8c8233ffce2b6e4b2a23-mysql-connector-c++-1.1.0.tar.gz"
+SRCURL[73]="http://dev-www.libreoffice.org/src/0981bda6548a8c8233ffce2b6e4b2a23-mysql-connector-c++-1.1.0.tar.gz"
+
+SOURCE[74]="$SRCDIR/sources/46e92b68e31e858512b680b3b61dc4c1-mythes-1.2.3.tar.gz"
+SRCURL[74]="http://dev-www.libreoffice.org/src/46e92b68e31e858512b680b3b61dc4c1-mythes-1.2.3.tar.gz"
+
+SOURCE[75]="$SRCDIR/sources/ff369e69ef0f0143beb5626164e87ae2-neon-0.29.5.tar.gz"
+SRCURL[75]="http://dev-www.libreoffice.org/src/ff369e69ef0f0143beb5626164e87ae2-neon-0.29.5.tar.gz"
+
+SOURCE[76]="$SRCDIR/sources/a0a861f539f0e7a91d05e6b9457e4db1-nss-3.13.5-with-nspr-4.9.1.tar.gz"
+SRCURL[76]="http://dev-www.libreoffice.org/src/a0a861f539f0e7a91d05e6b9457e4db1-nss-3.13.5-with-nspr-4.9.1.tar.gz"
+
+SOURCE[77]="$SRCDIR/sources/804c6cb5698db30b75ad0ff1c25baefd-openldap-2.4.31.tgz"
+SRCURL[77]="http://dev-www.libreoffice.org/src/804c6cb5698db30b75ad0ff1c25baefd-openldap-2.4.31.tgz"
+
+SOURCE[78]="$SRCDIR/sources/51a40a81b3b7abe8a5c33670bd3da0ce-openssl-0.9.8v.tar.gz"
+SRCURL[78]="http://dev-www.libreoffice.org/src/51a40a81b3b7abe8a5c33670bd3da0ce-openssl-0.9.8v.tar.gz"
+
+SOURCE[79]="$SRCDIR/sources/8755aac23317494a9028569374dc87b2-liborcus_0.3.0.tar.bz2"
+SRCURL[79]="http://dev-www.libreoffice.org/src/8755aac23317494a9028569374dc87b2-liborcus_0.3.0.tar.bz2"
+
+SOURCE[80]="$SRCDIR/sources/c63f411b3ad147db2bcce1bf262a0e02-pixman-0.24.4.tar.bz2"
+SRCURL[80]="http://dev-www.libreoffice.org/src/c63f411b3ad147db2bcce1bf262a0e02-pixman-0.24.4.tar.bz2"
+
+SOURCE[81]="$SRCDIR/sources/9e5d864bce8f06751bbd99962ecf4aad-libpng-1.5.10.tar.gz"
+SRCURL[81]="http://dev-www.libreoffice.org/src/9e5d864bce8f06751bbd99962ecf4aad-libpng-1.5.10.tar.gz"
+
+SOURCE[82]="$SRCDIR/sources/c0b4799ea9850eae3ead14f0a60e9418-postgresql-9.2.1.tar.bz2"
+SRCURL[82]="http://dev-www.libreoffice.org/src/c0b4799ea9850eae3ead14f0a60e9418-postgresql-9.2.1.tar.bz2"
+
+SOURCE[83]="$SRCDIR/sources/b3b2524f72409d919a4137826a870a8f-Python-3.3.0.tar.bz2"
+SRCURL[83]="http://dev-www.libreoffice.org/src/b3b2524f72409d919a4137826a870a8f-Python-3.3.0.tar.bz2"
+
+SOURCE[84]="$SRCDIR/sources/284e768eeda0e2898b0d5bf7e26a016e-raptor-1.4.18.tar.gz"
+SRCURL[84]="http://dev-www.libreoffice.org/src/284e768eeda0e2898b0d5bf7e26a016e-raptor-1.4.18.tar.gz"
+
+SOURCE[85]="$SRCDIR/sources/fca8706f2c4619e2fa3f8f42f8fc1e9d-rasqal-0.9.16.tar.gz"
+SRCURL[85]="http://dev-www.libreoffice.org/src/fca8706f2c4619e2fa3f8f42f8fc1e9d-rasqal-0.9.16.tar.gz"
+
+SOURCE[86]="$SRCDIR/sources/ca66e26082cab8bb817185a116db809b-redland-1.0.8.tar.gz"
+SRCURL[86]="http://dev-www.libreoffice.org/src/ca66e26082cab8bb817185a116db809b-redland-1.0.8.tar.gz"
+
+SOURCE[87]="$SRCDIR/sources/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip"
+SRCURL[87]="http://dev-www.libreoffice.org/src/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip"
+
+SOURCE[88]="$SRCDIR/sources/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip"
+SRCURL[88]="http://dev-www.libreoffice.org/src/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip"
+
+SOURCE[89]="$SRCDIR/sources/2a177023f9ea8ec8bd00837605c5df1b-jakarta-tomcat-5.0.30-src.tar.gz"
+SRCURL[89]="http://dev-www.libreoffice.org/src/2a177023f9ea8ec8bd00837605c5df1b-jakarta-tomcat-5.0.30-src.tar.gz"
+
+SOURCE[90]="$SRCDIR/sources/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz"
+SRCURL[90]="http://dev-www.libreoffice.org/src/0168229624cfac409e766913506961a8-ucpp-1.3.2.tar.gz"
+
+SOURCE[91]="$SRCDIR/sources/ea91f2fb4212a21d708aced277e6e85a-vigra1.4.0.tar.gz"
+SRCURL[91]="http://dev-www.libreoffice.org/src/ea91f2fb4212a21d708aced277e6e85a-vigra1.4.0.tar.gz"
+
+SOURCE[92]="$SRCDIR/sources/e7f84e3199dfee9122949448cab3823f-libwpd-0.9.6.tar.bz2"
+SRCURL[92]="http://dev-www.libreoffice.org/src/e7f84e3199dfee9122949448cab3823f-libwpd-0.9.6.tar.bz2"
+
+SOURCE[93]="$SRCDIR/sources/9d283e02441d8cebdcd1e5d9df227d67-libwpg-0.2.1.tar.bz2"
+SRCURL[93]="http://dev-www.libreoffice.org/src/9d283e02441d8cebdcd1e5d9df227d67-libwpg-0.2.1.tar.bz2"
+
+SOURCE[94]="$SRCDIR/sources/d197bd6211669a2fa4ca648faf04bcb1-libwps-0.2.7.tar.bz2"
+SRCURL[94]="http://dev-www.libreoffice.org/src/d197bd6211669a2fa4ca648faf04bcb1-libwps-0.2.7.tar.bz2"
+
+SOURCE[95]="$SRCDIR/sources/599dc4cc65a07ee868cf92a667a913d2-xpdf-3.02.tar.gz"
+SRCURL[95]="http://dev-www.libreoffice.org/src/599dc4cc65a07ee868cf92a667a913d2-xpdf-3.02.tar.gz"
+
+SOURCE[96]="$SRCDIR/sources/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip"
+SRCURL[96]="http://dev-www.libreoffice.org/src/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip"
+
+SOURCE[97]="$SRCDIR/sources/2ab442d169156f34c379c968f3f482dd-zlib-1.2.7.tar.bz2"
+SRCURL[97]="http://dev-www.libreoffice.org/src/2ab442d169156f34c379c968f3f482dd-zlib-1.2.7.tar.bz2"
+
+# --- End of section generated by gensrc_lo4.sh ---
+
+# --- End of section generated by gensrc_lo4.sh ---
+
+# Use the src_checkout() function if no downloadable tarball exists.
+# This function checks out sources from SVN/CVS and creates a tarball of them.
+src_checkout() {
+ # Param #1 : index in the SOURCE[] array.
+ # Param #2 : full path to where SOURCE[$1] tarball should be created.
+ # Determine the tarball extension:
+ PEXT=$(echo "${2}" | sed -r -e 's/.*[^.].(tar.xz|tar.gz|tar.bz2|tgz).*/\1/')
+ case "$PEXT" in
+ "tar.xz") TARCOMP="J" ;;
+ "tar.gz") TARCOMP="z" ;;
+ "tgz") TARCOMP="z" ;;
+ "tar.bz2") TARCOMP="j" ;;
+ *) echo "Archive can only have extension 'tar.xz', '.tar.gz' '.tar.bz2' or '.tgz'" ; exit 1 ;;
+ esac
+ # Determine the directory name to create for the archive root:
+ PBASE=$(basename ${2} .${PEXT})
+ # Determine the directory where we create our checkout:
+ CODIR=$(dirname ${2})
+ # LibreOffice checkout from git:
+ BRANCH=${BRANCH[$1]:-master}
+ # Checkout code from a certain branch and/or date; this will take a
+ # long time because we have to clone the complete git-repository first:
+ echo "Checking out $BRANCH at date $VERSION from '${GITURI[$1]}':"
+ RETDIR=$(pwd)
+ mkdir -p $CODIR/libreoffice_temp_checkout_$$ \
+ && cd $CODIR/libreoffice_temp_checkout_$$
+ if [ "$SRCVER" != "HEAD" ]; then
+ git clone ${GITURI[$1]} ${PBASE}
+ cd ${PBASE}
+ # Differentiate between a git release tag and a snapshot date:
+ if [ "$(echo $VERSION |cut -c1,2)" = "20" ]; then
+ git checkout $BRANCH \
+ && git checkout $(git rev-list -n 1 --before="`date -d $VERSION`" $BRANCH)
+ else
+ #git checkout $(echo "libreoffice-$VERSION" | tr 'a-z.-' 'A-Z_')
+ git checkout $(echo "libreoffice-$VERSION")
+ fi
+ cd ..
+ else
+ git clone --depth=1 ${GITURI[$1]} ${PBASE}
+ fi
+ if [ "$SRCVER" = "HEAD" ]; then
+ # Shallow clone, does not contain a lot in .git
+ tar -${TARCOMP}cf ${2} ${PBASE}
+ else
+ # Full clone, especially libreoffice-l10n is several GB in size:
+ tar --exclude .git -${TARCOMP}cf ${2} ${PBASE}
+ fi
+ cd $RETDIR
+ rm -rf $CODIR/libreoffice_temp_checkout_$$
+}
+
+##
+## --- with a little luck, you won't have to edit below this point --- ##
+##
+
+# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
+if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+fi
+
+case "$ARCH" in
+ i486) SLKCFLAGS="-march=i486 -mtune=i686"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ;;
+ x86_64) SLKCFLAGS="-fPIC"
+ SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
+ ;;
+ armv7hl) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16 -std=c++98"
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ;;
+ *) SLKCFLAGS=""
+ SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ;;
+esac
+
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
+# Exit the script on errors:
+set -e
+trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR
+# Catch unitialized variables:
+set -u
+P1=${1:-1}
+
+# Save old umask and set to 0022:
+_UMASK_=$(umask)
+umask 0022
+
+if [ "$P1" == "--oldbuild" ]; then
+ echo "Re-using a previous compilation."
+else
+ # Create working directories:
+ mkdir -p $OUTPUT # place for the package to be saved
+ mkdir -p $TMP/tmp-$PRGNAM # location to build the source
+ mkdir -p $PKG # place for the package to be built
+ rm -rf $PKG/* # always erase old package's contents
+ rm -rf $PKG2/* # always erase old package's contents
+ rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build
+ rm -rf $OUTPUT/{configure,make,install,error,makepkg}-$PRGNAM.log
+ # remove old log files
+fi
+
+# Make variables for the working directories absolute now that they exist:
+TMP=$(cd $TMP; pwd)
+PKG=$(cd $PKG; pwd)
+OUTPUT=$(cd $OUTPUT; pwd)
+
+# Source file availability:
+for (( i = 0; i < ${#SOURCE[*]}; i++ )) ; do
+ if ! [ -f ${SOURCE[$i]} ]; then
+ echo "Source '$(basename ${SOURCE[$i]})' not available yet..."
+ # Check if the $SRCDIR/sources is writable - if not, download to $OUTPUT
+ mkdir "$SRCDIR/sources" 2>/dev/null || true
+ [ -w "$SRCDIR/sources" ] || SOURCE[$i]="$OUTPUT/$(basename ${SOURCE[$i]})"
+ if [ -f ${SOURCE[$i]} ]; then echo "Ah, found it!"; continue; fi
+ if ! [ "x${SRCURL[$i]}" == "x" ]; then
+ echo "Will download file to $(dirname $SOURCE[$i])"
+ wget -nv -T 20 -O "${SOURCE[$i]}" "${SRCURL[$i]}" || true
+ if [ $? -ne 0 -o ! -s "${SOURCE[$i]}" ]; then
+ echo "Fail to download '$(basename ${SOURCE[$i]})'. Aborting the build."
+ mv -f "${SOURCE[$i]}" "${SOURCE[$i]}".FAIL
+ exit 1
+ fi
+ else
+ # Try if we have a SVN/CVS download routine for ${SOURCE[$i]}
+ echo "Will checkout sources to $(dirname $SOURCE[$i])"
+ src_checkout $i "${SOURCE[$i]}" 2>&1 > $OUTPUT/checkout-$(basename ${SOURCE[$i]}).log
+ fi
+ if [ ! -f "${SOURCE[$i]}" -o ! -s "${SOURCE[$i]}" ]; then
+ echo "File '$(basename ${SOURCE[$i]})' not available. Aborting the build."
+ exit 1
+ fi
+ fi
+done
+
+# Maybe we need even more?
+echo "** Please examine the following output (enclosed in '-+-+-+' lines)."
+echo "** If you see any filenames there, it means that these are still missing."
+echo "** Since they will not be downloaded when LibreOffice starts compiling,"
+echo "** you may run into problems later."
+echo "** NOTE: this indicates that this SlackBuild needs to be updated."
+echo "-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-"
+for FILE in $(wget -q -O - "http://cgit.freedesktop.org/libreoffice/core/tree/download.lst?id=$PRGNAM-$VERSION$SUBVER" | grep "^export " |grep -v "MOZ_ZIP" | cut -d' ' -f4) ; do if [ ! -f $SRCDIR/sources/$FILE ]; then echo $FILE; fi ; done;
+echo "-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-"
+
+if [ "$P1" == "--download" ]; then
+ echo "Download complete."
+ exit 0
+fi
+
+# --- PACKAGE BUILDING ---
+
+echo "++"
+echo "|| $PRGNAM-$VERSION"
+echo "++"
+
+cd $TMP/tmp-$PRGNAM
+if [ "$P1" != "--oldbuild" ]; then
+ echo "Extracting source archive(s) for $PRGNAM..."
+ for (( i = 0; i < 5; i++ )) ; do
+ echo -n " ."
+ tar -xf ${SOURCE[$i]}
+ done
+ echo ""
+ # Remove multiple git-hooks directories:
+ find . -name git-hooks -type d -depth -exec rm -rf {} \;
+ # Add all sources together for a bootstrap build:
+ #mkdir build
+ # The build is done from within the core sice 3.5:
+ mv libreoffice-core-* build
+ for SUBDIR in libreoffice-*/* ; do mv $(pwd)/$SUBDIR build/ ; done
+
+ echo "Copying all external archives into src directory for $PRGNAM..."
+ mkdir -p extsrc
+ for (( i = 5; i < ${#SOURCE[*]}; i++ )) ; do
+ ln -sf ${SOURCE[$i]} extsrc/
+ done
+ #touch src.downloaded
+fi
+
+chown -R root:root .
+chmod -R u+w,go+r-w,a+X-s .
+
+# Enter the build directory:
+cd $TMP/tmp-$PRGNAM/build
+
+echo Building ...
+
+# Apply our own (borrowed) patches.
+touch $OUTPUT/patch-$PRGNAM.log
+
+## Fix compilation of hsqldb using java 1.7:
+#cat $SRCDIR/hsqldb.jdk7.patch | patch -p1 --verbose \
+# 2>&1 | tee -a $OUTPUT/patch-$PRGNAM.log
+## Fix building on armv7hl:
+#cat $SRCDIR/libreoffice.gcc3_linux_arm.patch | patch -p1 --verbose \
+# 2>&1 | tee -a $OUTPUT/patch-$PRGNAM.log
+## Fix general input/output error on save/open password-protected file:
+#cat $SRCDIR/libreoffice.nss_init.patch | patch -p1 --verbose \
+# 2>&1 | tee -a $OUTPUT/patch-$PRGNAM.log
+#cat $SRCDIR/libreoffice.mozprofile.patch | patch -p1 --verbose \
+# 2>&1 | tee -a $OUTPUT/patch-$PRGNAM.log
+## LO would not start on secondary monitor (hopefully fixed in LO 3.5.4),
+## see also https://bugs.freedesktop.org/show_bug.cgi?id=49365 :
+#cat $SRCDIR/libreoffice.multimonitor.patch | patch -p1 --verbose \
+# 2>&1 | tee -a $OUTPUT/patch-$PRGNAM.log
+
+if [ -z "$SRCURL[0]" ]; then
+ # Git build; find out what this version of LibreOffice calls itself:
+ # Look for something like: AC_INIT(libreoffice-build, 3.2.99.2)
+ LOVER=$(cat configure.in | grep ^AC_INIT | sed -e 's/.*, \(.\+\))/\1/')_
+else
+ LOVER=""
+fi
+
+# Check for an installed KDE4 and assume Qt4:
+KDEDIRS=${KDEDIRS:-""} # to avoid "KDEDIRS: unbound variable"
+if [ ! -z "$KDEDIRS" ]; then
+ # Stupid but what can I do... LibreOffice detection routines suck:
+ export KDE4DIR="$KDEDIRS"
+ export QT4INC="$QT4DIR/include"
+ export QT4LIB="$QT4DIR/lib${LIBDIRSUFFIX}"
+ KDEOPTS="--enable-kde4"
+else
+ KDEOPTS="--disable-kde4"
+fi
+
+# Regular build flags:
+export LDFLAGS="$SLKLDFLAGS"
+export CXXFLAGS="$SLKCFLAGS"
+export CFLAGS="$SLKCFLAGS"
+
+# Make it install into proper directories:
+export OOInBase="/usr/lib${LIBDIRSUFFIX}/libreoffice"
+export OOInstall="/usr/lib${LIBDIRSUFFIX}/libreoffice"
+export OODESTDIR="$PKG"
+
+# If this local directory does not exist during configuration,
+# support for Open Clip Art will be disabled:
+mkdir -p /usr/share/openclipart
+
+# Do we generate language packs?
+if [ -z "$ADD_LANGUAGES" ]; then
+ # Actually the compilation breaks if we specify "en_US" explicitly as the
+ # one default language - in this case the string should be empty. The error:
+ # " Error: ../unxlngx6.pro/misc/sysui/dummy/localize.sdf 0 Bytes! "
+ [ "$DEF_LANG" = "en_US" ] && LANGUAGES="" || LANGUAGES="$DEF_LANG"
+else
+ LANGUAGES="${DEF_LANG} $(echo ${ADD_LANGUAGES} |sed -e "s/${DEF_LANG} *//")"
+fi
+
+echo "Building for these languages: $LANGUAGES"
+
+if [ "$USE_GIT" = "yes" ]; then
+ GITOPTS="--with-git"
+else
+ GITOPTS="--with-git=no --disable-fetch-external"
+fi
+
+case "$ARCH" in
+ arm*)
+ ARCHOPTS="--with-arch=arm --disable-postgresql-sdbc " ;;
+ *)
+ ARCHOPTS="--with-arch=x86 " ;;
+esac
+
+#enable_pam=no \
+./autogen.sh \
+ --prefix=/usr \
+ --docdir=/usr/doc/$PRGNAM-${LOVER}$VERSION \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --with-arch-flags="$SLKCFLAGS" \
+ --with-build-version="SlackBuild for ${LOVER}$VERSION by $PACKAGER" \
+ --with-vendor="Slackware Team ($PACKAGER)" \
+ --with-package-format="native archive installed tardist" \
+ --with-distro=Slackware \
+ --with-docdir=/usr/doc/$PRGNAM-${LOVER}$VERSION \
+ --with-install-dirname=$PRGNAM \
+ --with-lang="$(echo ${LANGUAGES} |tr _ -)" \
+ --with-num-cpus=${NUMCPUS} \
+ --without-binsuffix \
+ --with-external-tar="$TMP/tmp-$PRGNAM/extsrc" \
+ ${GITOPTS} \
+ ${KDEOPTS} \
+ ${ARCHOPTS} \
+ --disable-epm \
+ --disable-gconf \
+ --disable-gnome-vfs \
+ --disable-kde \
+ --disable-lockdown \
+ --disable-mathmldtd \
+ --disable-mono \
+ --disable-pam \
+ --disable-pam-link \
+ --disable-post-install-scripts \
+ --enable-binfilter \
+ --enable-cairo \
+ --enable-crypt-link \
+ --enable-dbus \
+ --enable-ext-nlpsolver \
+ --enable-ext-presenter-minimizer \
+ --enable-ext-report-builder \
+ --enable-ext-scripting-beanshell \
+ --enable-ext-scripting-javascript \
+ --enable-ext-wiki-publisher \
+ --enable-gstreamer \
+ --enable-hids \
+ --enable-libart \
+ --enable-libsn \
+ --enable-odk \
+ --enable-ogltrans \
+ --enable-opengl \
+ --enable-openxml \
+ --enable-python=system \
+ --enable-randr-link \
+ --enable-release-build \
+ --enable-symbols \
+ --enable-systray \
+ --enable-vba \
+ --enable-xrender-link \
+ --with-ant-home=/usr/share/ant \
+ --with-dict=ALL \
+ --with-extension-integration \
+ --with-external-dict-dir=/usr/share/hunspell \
+ --with-external-hyph-dir=/usr/share/hyphen \
+ --with-external-thes-dir=/usr/share/mythes \
+ --with-fonts \
+ --with-java-target-version=1.5 \
+ --with-jdk-home=$JAVA_HOME \
+ --with-openclipart=/usr/share/openclipart \
+ --with-openldap \
+ --with-system-boost \
+ --with-system-cairo \
+ --with-system-curl \
+ --with-system-db \
+ --with-system-dicts \
+ --with-system-expat \
+ --with-system-jpeg \
+ --with-system-libxml \
+ --with-system-libxslt \
+ --with-system-mesa-headers \
+ --with-system-mozilla=seamonkey \
+ --with-system-mysql \
+ --with-system-neon \
+ --with-system-nss \
+ --with-system-openssl \
+ --with-system-poppler \
+ --with-system-python \
+ --with-system-redland \
+ --with-system-stdlibs \
+ --with-system-zlib \
+ --with-vba-package-format=builtin \
+ --with-x \
+ --without-myspell-dicts \
+ --without-gssapi \
+ --without-junit \
+ --without-krb5 \
+ --without-system-icu \
+ --without-system-jars \
+ --without-system-libtextcat \
+ --without-system-libvisio \
+ --without-system-sampleicc \
+ --without-system-servlet-api \
+ --without-unix-wrapper \
+ --build=$TARGET \
+ 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
+
+touch src.downloaded
+
+# Compile everything (takes many hours):
+touch $OUTPUT/make-${PRGNAM}.log
+echo "Starting $PRGNAM compilation (takes a long time)..."
+#./bootstrap 2>&1 | tee -a $OUTPUT/make-${PRGNAM}.log
+make VERBOSE=yes 2>&1 | tee -a $OUTPUT/make-${PRGNAM}.log
+
+# Install the lot:
+echo "Starting the packaging stage for $PRGNAM..."
+make DESTDIR=$PKG distro-pack-install \
+ 2>&1 | tee $OUTPUT/install-${PRGNAM}.log
+
+# Remove cruft:
+rm -f $PKG/gid_Module*
+
+## Copy the omitted math file into the package (seems that my packages never
+## shipped with a functional math module???)
+#if [ ! -f $PKG/usr/lib${LIBDIRSUFFIX}/libreoffice/share/registry/math.xcd ]
+#then
+# cp -a postprocess/unxl*.pro/misc/math.xcd $PKG/usr/lib${LIBDIRSUFFIX}/libreoffice/share/registry/
+#fi
+
+## Move the SDK files to sane locations:
+#mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/sdk
+#mv $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/sdk/{docs,examples,index.html} \
+# $PKG/usr/doc/$PRGNAM-$VERSION/sdk/
+#ln -sf /usr/doc/$PRGNAM-$VERSION/sdk/docs \
+# $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/sdk/
+#ln -sf /usr/doc/$PRGNAM-$VERSION/sdk/index.html \
+# $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/sdk/
+#ln -sf /usr/doc/$PRGNAM-$VERSION/sdk/examples \
+# $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/sdk/
+
+if [ ! -L $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/sdk/classes ]; then
+ mkdir -p $PKG/usr/share/${PRGNAM}/sdk
+ mv $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/sdk/classes \
+ $PKG/usr/share/${PRGNAM}/sdk/
+ ln -sf /usr/share/${PRGNAM}/sdk/classes \
+ $(readlink -f $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/sdk)/
+fi
+
+if [ ! -L $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/sdk/idl ]; then
+ mkdir -p $PKG/usr/share/idl
+ mv $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/sdk/idl \
+ $PKG/usr/share/idl/${PRGNAM}
+ ln -sf /usr/share/idl/${PRGNAM} \
+ $(readlink -f $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/sdk)/idl
+fi
+
+if [ ! -L $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/sdk/include ]; then
+ mkdir -p $PKG/usr/include
+ mv $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/sdk/include \
+ $PKG/usr/include/${PRGNAM}
+ ln -sf /usr/include/${PRGNAM} \
+ $(readlink -f $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/sdk)/include
+fi
+
+# Link the browser plugin into the mozilla plugins directory if we built one:
+if [ -f $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/program/libnpsoplugin.so ]; then
+ ( mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
+ cd $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins
+ ln -sf /usr/lib${LIBDIRSUFFIX}/$PRGNAM/program/libnpsoplugin.so
+ )
+fi
+
+# Replace redundant fonts with symlinks to save space:
+( cd $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/share/fonts/truetype/
+ for FONT in DejaVu*.ttf Liberation*.ttf ; do
+ rm -f $FONT
+ ln -sf /usr/share/fonts/TTF/$FONT
+ done
+)
+
+# If we have any dictionaries in the sources directory, now is the time to
+# copy them into the package:
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/share/extensions/install
+cp -a $SRCDIR/sources/dict-*.oxt \
+ $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/share/extensions/install/
+chown -R root:root $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/share/extensions/install
+
+# Create aliases for locales that have matching languages in LibreOffice.
+# This enables people with these locales to use the autocorrect function:
+# (code taken from Fedora's libreoffice.spec)
+cd $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/share/autocorr
+ en_GB_aliases="en-AG en-AU en-BS en-BW en-BZ en-CA en-DK en-GH en-HK en-IE en-IN en-JM en-NG en-NZ en-SG en-TT"
+ for lang in $en_GB_aliases; do
+ ln -sf acor_en-GB.dat acor_$lang.dat
+ done
+ en_US_aliases="en-PH"
+ for lang in $en_US_aliases; do
+ ln -sf acor_en-US.dat acor_$lang.dat
+ done
+ #en-ZA exists and has a good autocorrect file with two or three extras that make sense for
+ #neighbouring english speaking territories
+ en_ZA_aliases="en-NA en-ZW"
+ for lang in $en_ZA_aliases; do
+ ln -sf acor_en-ZA.dat acor_$lang.dat
+ done
+ if [ ! -z "$ADD_LANGUAGES" ]; then
+ af_ZA_aliases="af-NA"
+ for lang in $af_ZA_aliases; do
+ ln -sf acor_af-ZA.dat acor_$lang.dat
+ done
+ de_DE_aliases="de-AT de-BE de-CH de-LI de-LU"
+ for lang in $de_DE_aliases; do
+ ln -sf acor_de-DE.dat acor_$lang.dat
+ done
+ es_ES_aliases="es-AR es-BO es-CL es-CO es-CR es-CU es-DO es-EC es-GT es-HN es-MX es-NI es-PA es-PE es-PR es-PY es-SV es-US es-UY es-VE"
+ for lang in $es_ES_aliases; do
+ ln -sf acor_es-ES.dat acor_$lang.dat
+ done
+ fr_FR_aliases="fr-BE fr-CA fr-CH fr-LU fr-MC"
+ for lang in $fr_FR_aliases; do
+ ln -sf acor_fr-FR.dat acor_$lang.dat
+ done
+ it_IT_aliases="it-CH"
+ for lang in $it_IT_aliases; do
+ ln -sf acor_it-IT.dat acor_$lang.dat
+ done
+ nl_BE_aliases="nl-AW"
+ for lang in $nl_BE_aliases; do
+ ln -sf acor_nl-BE.dat acor_$lang.dat
+ done
+ sv_SE_aliases="sv-FI"
+ for lang in $sv_SE_aliases; do
+ ln -sf acor_sv-SE.dat acor_$lang.dat
+ done
+ [ -f acor_lt_LT.dat ] && mv acor_lt_LT.dat acor_lt-LT.dat
+ else
+ rm -f acor_[a-df-z]*.dat acor_e[su]*.dat
+ fi
+cd -
+
+# Split out language packs if we have built additional languages:
+if [ ! -z "${ADD_LANGUAGES}" ]; then
+ cd $PKG
+ for lang in $(echo ${ADD_LANGUAGES} |sed -e "s/${DEF_LANG} *//") ; do
+ langdesc="$(grep ^${lang}= $SRCDIR/languages |cut -f2 -d=)"
+ lolang=$(echo $lang | tr _ -)
+ echo "Splitting out '$lang' ($langdesc) - looking for '$lolang'..."
+ rm -rf ${PKG}-l10n-$lang
+ mkdir -p ${PKG}-l10n-$lang
+ tar cf - --remove-files \
+ $(find . -depth -name "README*$lolang*" \
+ -o -name "LICENSE*${lolang}*" \
+ -o -name "description_${lolang}.txt" \
+ -o -type d -name "${lolang}" \
+ -o -path "*/autocorr/*" -name "*${lolang}.dat" \
+ -o -path "*/resource/*" -name "*${lolang}.res" \
+ -o -path "*/registry/*" -name "*_${lolang}.xcd" \
+ -o -path "*/registry/*" -name "*-${lolang}.xcd" \
+ -o -name "Lang_*${lolang}.xba" \
+ -o -name "Langpack-${lolang}.xcu" \
+ -o -name "*${lolang}.oxt") \
+ | ( cd ${PKG}-l10n-$lang ; tar xf - )
+ # Create slack-desc and doinst.sh :
+ mkdir -p ${PKG}-l10n-$lang/install
+ cat $SRCDIR/slack-desc.l10n \
+ | sed -e "s/@LANG@/$lang/g" -e "s/@LANGDESC@/$langdesc/g" > \
+ ${PKG}-l10n-$lang/install/slack-desc
+ # Install per-language dictionary:
+ cat $SRCDIR/doinst.sh.l10n \
+ | sed -e "s/@LIBDIRSUFFIX@/${LIBDIRSUFFIX}/g" \
+ -e "s/@LANG@/${lolang}/g" -e "s/@PRGNAM@/$PRGNAM/" \
+ > ${PKG}-l10n-$lang/install/doinst.sh
+ cd ${PKG}-l10n-$lang
+ /sbin/makepkg -p -l y -c n $OUTPUT/${PRGNAM}-l10n-${lang}-${LOVER}${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz}
+ cd -
+ cd $OUTPUT
+ md5sum ${PRGNAM}-l10n-${lang}-${LOVER}${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz} > ${PRGNAM}-l10n-$lang-${LOVER}${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz}.md5
+ cd -
+ cat $PKG-l10n-$lang/install/slack-desc | grep "^${PRGNAM}-l10n-$lang" > $OUTPUT/${PRGNAM}-l10n-$lang-${LOVER}${VERSION}-${ARCH}-${BUILD}${TAG}.txt
+ done
+fi # End of splitting out language packs
+
+# Back to base:
+cd $TMP/tmp-$PRGNAM/build
+
+# Libreoffice suddenly adds version numbers to the name of the wrapper script
+# as well as the to the names of icons, so I'll remove that
+# (with thanks to Fedora's David Tardon):
+cd sysui/unxl*.pro/misc/libreoffice
+ sed -i -e "s/^PREFIX=.*$/PREFIX=${PRGNAM}/" \
+ -e "s/^ICON_PREFIX=.*$/ICON_PREFIX=${PRGNAM}/" \
+ -e "s/^PRODUCTVERSION=.*$/PRODUCTVERSION=''/" \
+ -e "s/^office_prefix=.*$/office_prefix=\/usr\/lib${LIBDIRSUFFIX}\/${PRGNAM}/" \
+ create_tree.sh
+
+ # Time to start doing what the deprecated 'build' tarball used to do for us:
+ # We need to generate the icons and mime type files ourselves now.
+ # All the other created stuff can be discarded:
+ KDEMAINDIR=/usr GNOMEDIR=/usr GNOME_MIME_THEME=hicolor \
+ DESTDIR=../../../output \
+ ./create_tree.sh
+cd -
+
+# We are going to filter these version strings out of program descriptions:
+export $(grep "^PRODUCTVERSIONSHORT =" solenv/inc/productversion.mk | sed -e "s/ //g")
+export $(grep "PRODUCTVERSION[ ]*=[ ]*" solenv/inc/productversion.mk | sed -e "s/ //g")
+ICONVERSION=`echo $PRODUCTVERSION | sed -e 's/\.//'`
+
+mkdir -p $PKG/usr/share/applications/
+# What about template.desktop ?
+cd $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/share/xdg/
+ for FILE in base calc impress writer math draw startcenter ; do
+ sed -i \
+ -e "s/$PRODUCTVERSION//g" \
+ -e "s/$ICONVERSION//g" \
+ -e "s/$PRODUCTVERSIONSHORT//g" \
+ ${FILE}.desktop
+ echo "StartupNotify=true" >> ${FILE}.desktop
+ install -m0644 ${FILE}.desktop \
+ $PKG/usr/share/applications/${PRGNAM}-${FILE}.desktop
+ done
+cd -
+# Add an entry for the LibO extension manager which went missing:
+cat <<EOF > $PKG/usr/share/applications/${PRGNAM}-extension-manager.desktop
+[Desktop Entry]
+Version=1.0
+Terminal=false
+TryExec=unopkg
+Exec=unopkg gui %U
+Type=Application
+Icon=${PRGNAM}-startcenter
+StartupNotify=true
+Categories=Office;
+MimeType=application/vnd.openofficeorg.extension;
+Name=LibreOffice Extension Manager
+GenericName=Extension Manager
+Comment=Add and organize the LibreOffice extensions.
+EOF
+
+# Copy icons and mime definitions but exclude Gnome-specific stuff:
+cd $TMP/tmp-$PRGNAM/build/sysui/output/usr/share
+ rm -r icons/{gnome,locolor}
+ cp -a icons $PKG/usr/share
+ cp -a mime $PKG/usr/share
+cd -
+
+# Add a bash-completion script that was removed (?) after 3.3.2.2:
+if [ ! -f $PKG/etc/bash_completion.d/${PRGNAM}.sh ]; then
+ mkdir -p $PKG/etc/bash_completion.d
+ install -m0755 $SRCDIR/bash_completion.sh \
+ $PKG/etc/bash_completion.d/${PRGNAM}.sh
+fi
+
+# Add wrapper scripts (if they do not exist yet) that call the real binaries:
+( mkdir -p $PKG/usr/bin
+ cd $PKG/usr/bin
+ if ! [ -f ${PRGNAM} -o -L ${PRGNAM} ]; then
+ cat <<EOF > $PKG/usr/bin/${PRGNAM}
+#!/bin/sh
+/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/program/soffice "\$@"
+EOF
+ chmod 0755 $PKG/usr/bin/${PRGNAM}
+ fi
+ if ! [ -f loweb -o -L loweb ]; then
+ cat <<EOF > $PKG/usr/bin/loweb
+#!/bin/sh
+/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/program/soffice --web "\$@"
+EOF
+ chmod 0755 $PKG/usr/bin/loweb
+ fi
+ if ! [ -f localc -o -L localc ]; then
+ cat <<EOF > $PKG/usr/bin/localc
+#!/bin/sh
+/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/program/soffice --calc "\$@"
+EOF
+ chmod 0755 $PKG/usr/bin/localc
+ fi
+ if ! [ -f lobase -o -L lobase ]; then
+ cat <<EOF > $PKG/usr/bin/lobase
+#!/bin/sh
+/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/program/soffice --base "\$@"-
+EOF
+ chmod 0755 $PKG/usr/bin/lobase
+ fi
+ if ! [ -f lofromtemplate -o -L lofromtemplate ]; then
+ cat <<EOF > $PKG/usr/bin/lofromtemplate
+#!/bin/sh
+/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/program/soffice .uno:NewDoc "\$@"
+EOF
+ chmod 0755 $PKG/usr/bin/lofromtemplate
+ fi
+ if ! [ -f lowriter -o -L lowriter ]; then
+ cat <<EOF > $PKG/usr/bin/lowriter
+#!/bin/sh
+/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/program/soffice --writer "\$@"
+EOF
+ chmod 0755 $PKG/usr/bin/lowriter
+ fi
+ if ! [ -f unopkg -o -L unopkg ]; then
+ cat <<EOF > $PKG/usr/bin/unopkg
+#!/bin/sh
+/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/program/unopkg "\$@"
+EOF
+ chmod 0755 $PKG/usr/bin/unopkg
+ fi
+ if ! [ -f lodraw -o -L lodraw ]; then
+ cat <<EOF > $PKG/usr/bin/lodraw
+#!/bin/sh
+/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/program/soffice --draw "\$@"
+EOF
+ chmod 0755 $PKG/usr/bin/lodraw
+ fi
+ if ! [ -f lomath -o -L lomath ]; then
+ cat <<EOF > $PKG/usr/bin/lomath
+#!/bin/sh
+/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/program/soffice --math "\$@"
+EOF
+ chmod 0755 $PKG/usr/bin/lomath
+ fi
+ if ! [ -f loimpress -o -L loimpress ]; then
+ cat <<EOF > $PKG/usr/bin/loimpress
+#!/bin/sh
+/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/program/soffice --impress "\$@"
+EOF
+ chmod 0755 $PKG/usr/bin/loimpress
+ fi
+)
+
+# Back to base:
+cd $TMP/tmp-$PRGNAM/build
+
+# Create the package's post-install script:
+mkdir -p $PKG/install
+# Install language dictionary:
+cat $SRCDIR/doinst.sh.l10n \
+ | sed -e "s/@LIBDIRSUFFIX@/${LIBDIRSUFFIX}/g" \
+ -e "s/@LANG@/$(echo ${DEF_LANG} |tr _ -)/g" -e "s/@PRGNAM@/$PRGNAM/" \
+ > ${PKG}/install/doinst.sh
+cat <<EOT >> $PKG/install/doinst.sh
+# Update the desktop database:
+if [ -x usr/bin/update-desktop-database ]; then
+ chroot . /usr/bin/update-desktop-database usr/share/applications 1> /dev/null 2> /dev/null
+fi
+
+# Update the mime database:
+if [ -x usr/bin/update-mime-database ]; then
+ chroot . /usr/bin/update-mime-database usr/share/mime 1> /dev/null 2> /dev/null
+fi
+
+# Update hicolor theme cache:
+if [ -d usr/share/icons/hicolor ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ chroot . /usr/bin/gtk-update-icon-cache -f -t usr/share/icons/hicolor 1> /dev/null 2> /dev/null
+ fi
+fi
+
+EOT
+
+# Add documentation:
+mkdir -p $PKG/usr/doc/$PRGNAM-${LOVER}$VERSION
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-${LOVER}$VERSION || true
+cat $SRCDIR/$(basename $0) > $PKG/usr/doc/$PRGNAM-${LOVER}$VERSION/$PRGNAM.SlackBuild
+#cat $SRCDIR/Slackware.conf.in > $PKG/usr/doc/$PRGNAM-${LOVER}$VERSION/Slackware.conf.in
+mkdir -p $PKG/usr/doc/$PRGNAM-${LOVER}$VERSION/patches
+cp $SRCDIR/*.patch $SRCDIR/*.diff $PKG/usr/doc/$PRGNAM-${LOVER}$VERSION/patches/ || true
+chown -R root:root $PKG/usr/doc/$PRGNAM-${LOVER}$VERSION
+find $PKG/usr/doc -type f -exec chmod 644 {} \;
+
+# Fix permissions of license files:
+chmod 0644 $PKG/usr/lib${LIBDIRSUFFIX}/${PRGNAM}/*.odt
+
+# Fix weird permissions:
+find ${PKG} -perm 444 -exec chmod 644 {} \;
+find ${PKG} -perm 555 -exec chmod 755 {} \;
+
+# Compress the man page(s):
+if [ -d $PKG/usr/man ]; then
+ find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
+ for i in $(find $PKG/usr/man -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+fi
+
+# Strip binaries (if any):
+find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+# Split off the browser plugin if we built it, not everyone will want it:
+if [ -f $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/program/libnpsoplugin.so ]; then
+
+ echo -e "**\n** splitting off the mozilla plugin ...\n**"
+ # Move the mozilla plugin:
+ mkdir -p $PKG2/usr/lib${LIBDIRSUFFIX}/$PRGNAM/program
+ mv $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM/program/libnpsoplugin.so \
+ $PKG2/usr/lib${LIBDIRSUFFIX}/$PRGNAM/program/
+ mkdir -p $PKG2/usr/lib${LIBDIRSUFFIX}/mozilla/
+ mv $PKG/usr/lib${LIBDIRSUFFIX}/mozilla/plugins \
+ $PKG2/usr/lib${LIBDIRSUFFIX}/mozilla/
+ rmdir $PKG/usr/lib${LIBDIRSUFFIX}/mozilla 2>/dev/null || true
+
+ # Add some package information:
+ mkdir -p $PKG2/install
+ cat $SRCDIR/slack-desc.$PRGNAM2 > $PKG2/install/slack-desc
+ cat $SRCDIR/slack-required.$PRGNAM2 > $PKG2/install/slack-required
+
+ # Create the package:
+ ( cd $PKG2
+ makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${PRGNAM2}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz} 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}_${PRGNAM2}.log
+ )
+ ( cd $OUTPUT
+ md5sum ${PRGNAM}-${PRGNAM2}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz} > ${PRGNAM}-${PRGNAM2}-${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz}.md5
+ )
+ cat $PKG2/install/slack-desc | grep "^${PRGNAM}-${PRGNAM2}" > $OUTPUT/${PRGNAM}-${PRGNAM2}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt
+ cat $PKG2/install/slack-required > $OUTPUT/${PRGNAM}-${PRGNAM2}-${VERSION}-${ARCH}-${BUILD}${TAG}.dep
+
+fi # End splitting off the mozplugin
+
+# Continuing with the main package:
+
+# Add a package description:
+mkdir -p $PKG/install
+cat $SRCDIR/slack-desc > $PKG/install/slack-desc
+#cat $SRCDIR/slack-required > $PKG/install/slack-required
+
+# Build the package:
+cd $PKG
+/sbin/makepkg -p -l y -c n $OUTPUT/${PRGNAM}-${LOVER}${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz} 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
+cd $OUTPUT
+md5sum ${PRGNAM}-${LOVER}${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz} > ${PRGNAM}-${LOVER}${VERSION}-${ARCH}-${BUILD}${TAG}.${PKGTYPE:-txz}.md5
+cd -
+cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${LOVER}${VERSION}-${ARCH}-${BUILD}${TAG}.txt
+#cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${LOVER}${VERSION}-${ARCH}-${BUILD}${TAG}.dep
+
+# Restore the original umask:
+umask ${_UMASK_}
+