summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xlibreoffice/build/libreoffice36.SlackBuild197
1 files changed, 159 insertions, 38 deletions
diff --git a/libreoffice/build/libreoffice36.SlackBuild b/libreoffice/build/libreoffice36.SlackBuild
index 3e47c4f4..422635f0 100755
--- a/libreoffice/build/libreoffice36.SlackBuild
+++ b/libreoffice/build/libreoffice36.SlackBuild
@@ -83,9 +83,113 @@ TMP=${TMP:-/tmp/build}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-# If you want automatic download to work, supply a URL for 'SRCURL' below:
-SOURCE[0]="$SRCDIR/${PRGNAM}-${VERSION}.tar.xz"
+# Core components of LibreOffice (downloaded or checked-out) are:
+# artwork base bootstrap build calc components extras filters help
+# impress libs-gui libs-core libs-extern postprocess sdk testing
+# ure writer libs-extern-sys extensions l10n
+
+# We will need the "build" tarball first.
+
+SOURCE[0]="$SRCDIR/sources/libreoffice-build-${VERSION}.tar.xz"
SRCURL[0]=""
+GITURI[0]="git://anongit.freedesktop.org/git/libreoffice/build"
+
+SOURCE[1]="$SRCDIR/sources/libreoffice-artwork-${VERSION}.tar.xz"
+SRCURL[1]=""
+GITURI[1]="git://anongit.freedesktop.org/git/libreoffice/artwork"
+
+SOURCE[2]="$SRCDIR/sources/libreoffice-base-${VERSION}.tar.xz"
+SRCURL[2]=""
+GITURI[2]="git://anongit.freedesktop.org/git/libreoffice/base"
+
+SOURCE[3]="$SRCDIR/sources/libreoffice-bootstrap-${VERSION}.tar.xz"
+SRCURL[3]=""
+GITURI[3]="git://anongit.freedesktop.org/git/libreoffice/bootstrap"
+
+SOURCE[4]="$SRCDIR/sources/libreoffice-calc-${VERSION}.tar.xz"
+SRCURL[4]=""
+GITURI[4]="git://anongit.freedesktop.org/git/libreoffice/calc"
+
+SOURCE[5]="$SRCDIR/sources/libreoffice-components-${VERSION}.tar.xz"
+SRCURL[5]=""
+GITURI[5]="git://anongit.freedesktop.org/git/libreoffice/components"
+
+SOURCE[6]="$SRCDIR/sources/libreoffice-extras-${VERSION}.tar.xz"
+SRCURL[6]=""
+GITURI[6]="git://anongit.freedesktop.org/git/libreoffice/extras"
+
+SOURCE[7]="$SRCDIR/sources/libreoffice-filters-${VERSION}.tar.xz"
+SRCURL[7]=""
+GITURI[7]="git://anongit.freedesktop.org/git/libreoffice/filters"
+
+SOURCE[8]="$SRCDIR/sources/libreoffice-help-${VERSION}.tar.xz"
+SRCURL[8]=""
+GITURI[8]="git://anongit.freedesktop.org/git/libreoffice/help"
+
+SOURCE[9]="$SRCDIR/sources/libreoffice-impress-${VERSION}.tar.xz"
+SRCURL[9]=""
+GITURI[9]="git://anongit.freedesktop.org/git/libreoffice/impress"
+
+SOURCE[10]="$SRCDIR/sources/libreoffice-libs-gui-${VERSION}.tar.xz"
+SRCURL[10]=""
+GITURI[10]="git://anongit.freedesktop.org/git/libreoffice/libs-gui"
+
+SOURCE[11]="$SRCDIR/sources/libreoffice-libs-core-${VERSION}.tar.xz"
+SRCURL[11]=""
+GITURI[11]="git://anongit.freedesktop.org/git/libreoffice/libs-core"
+
+SOURCE[12]="$SRCDIR/sources/libreoffice-libs-extern-${VERSION}.tar.xz"
+SRCURL[12]=""
+GITURI[12]="git://anongit.freedesktop.org/git/libreoffice/libs-extern"
+
+SOURCE[13]="$SRCDIR/sources/libreoffice-postprocess-${VERSION}.tar.xz"
+SRCURL[13]=""
+GITURI[13]="git://anongit.freedesktop.org/git/libreoffice/postprocess"
+
+SOURCE[14]="$SRCDIR/sources/libreoffice-sdk-${VERSION}.tar.xz"
+SRCURL[14]=""
+GITURI[14]="git://anongit.freedesktop.org/git/libreoffice/sdk"
+
+SOURCE[15]="$SRCDIR/sources/libreoffice-testing-${VERSION}.tar.xz"
+SRCURL[15]=""
+GITURI[15]="git://anongit.freedesktop.org/git/libreoffice/testing"
+
+SOURCE[16]="$SRCDIR/sources/libreoffice-ure-${VERSION}.tar.xz"
+SRCURL[16]=""
+GITURI[16]="git://anongit.freedesktop.org/git/libreoffice/ure"
+
+SOURCE[17]="$SRCDIR/sources/libreoffice-writer-${VERSION}.tar.xz"
+SRCURL[17]=""
+GITURI[17]="git://anongit.freedesktop.org/git/libreoffice/writer"
+
+SOURCE[18]="$SRCDIR/sources/libreoffice-libs-extern-sys-${VERSION}.tar.xz"
+SRCURL[18]=""
+GITURI[18]="git://anongit.freedesktop.org/git/libreoffice/libs-extern-sys"
+
+SOURCE[19]="$SRCDIR/sources/libreoffice-extensions-${VERSION}.tar.xz"
+SRCURL[19]=""
+GITURI[19]="git://anongit.freedesktop.org/git/libreoffice/extensions"
+
+SOURCE[20]="$SRCDIR/sources/libreoffice-l10n-${VERSION}.tar.xz"
+SRCURL[20]=""
+GITURI[20]="git://anongit.freedesktop.org/git/libreoffice/l10n"
+
+# Extra libraries / binaries required to build LibreOffice from source:
+
+SOURCE[21]="$SRCDIR/sources/ooo-cli-prebuilt-3.3.tar.bz2"
+SRCURL[21]="http://download.go-oo.org//DEV300/ooo-cli-prebuilt-3.3.tar.bz2"
+
+SOURCE[22]="$SRCDIR/sources/cairo-1.4.10.tar.gz"
+SRCURL[22]="http://cairographics.org/releases//cairo-1.4.10.tar.gz"
+
+SOURCE[23]="$SRCDIR/sources/mdbtools-0.6pre1.tar.gz"
+SRCURL[23]="http://download.go-oo.org//SRC680/mdbtools-0.6pre1.tar.gz"
+
+SOURCE[24]="$SRCDIR/sources/extras-3.1.tar.bz2"
+SRCURL[24]="http://download.go-oo.org//SRC680/extras-3.1.tar.bz2"
+
+SOURCE[25]="$SRCDIR/sources/biblio.tar.bz2"
+SRCURL[25]="http://download.go-oo.org//SRC680/biblio.tar.bz2"
# Use the src_checkout() function if no downloadable tarball exists.
# This function checks out sources from SVN/CVS and creates a tarball of them.
@@ -101,32 +205,30 @@ src_checkout() {
"tar.bz2") TARCOMP="j" ;;
*) echo "Archive can only have extension 'tar.xz', '.tar.gz' '.tar.bz2' or '.tgz'" ; exit 1 ;;
esac
- case ${1} in
- 0) # LibreOffice checkout from git:
- GITURI="git://anongit.freedesktop.org/git/libreoffice/build"
- BRANCH=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':"
- mkdir libreoffice_temp_checkout_$$ \
- && cd libreoffice_temp_checkout_$$
- if [ "$SRCVER" != "HEAD" ]; then
- git clone ${GITURI} libreoffice-${VERSION} \
- && cd libreoffice-${VERSION} \
- && git checkout $BRANCH \
- && git checkout $(git rev-list -n 1 --before="`date -d $VERSION`" $BRANCH) \
- && cd ..
- else
- git clone --depth=1 ${GITURI} libreoffice-${VERSION}
- fi
- chown -R root:root .
- tar --exclude .git -${TARCOMP}cf ${2} libreoffice-${VERSION}
- cd ..
- rm -rf libreoffice_temp_checkout_$$
- ;;
- *) # Do nothing
- ;;
- 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} \
+ && git checkout $BRANCH \
+ && git checkout $(git rev-list -n 1 --before="`date -d $VERSION`" $BRANCH) \
+ && cd ..
+ else
+ git clone --depth=1 ${GITURI[$1]} ${PBASE}
+ fi
+ tar --exclude .git -${TARCOMP}cf ${2} ${PBASE}
+ cd $RETDIR
+ rm -rf $CODIR/libreoffice_temp_checkout_$$
}
##
@@ -179,12 +281,19 @@ else
# 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 is writable at all - if not, download to $OUTPUT
- [ -w "$SRCDIR" ] || SOURCE[$i]="$OUTPUT/$(basename ${SOURCE[$i]})"
+ # 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
@@ -218,13 +327,15 @@ echo "++"
cd $TMP/tmp-$PRGNAM
if [ "$P1" != "--oldbuild" ]; then
- echo "Extracting the source archive(s) for $PRGNAM..."
- tar -xvf ${SOURCE[0]}
+ echo "Extracting source archive(s) for $PRGNAM..."
+ for (( i = 0; i < 21; i++ )) ; do
+ tar -xvf ${SOURCE[$i]}
+ done
fi
-cd ${PRGNAM}-${VERSION}
+chown -R root:root *
+chmod -R u+w,go+r-w,a+X-s *
-chown -R root:root .
-chmod -R u+w,go+r-w,a+X-s .
+cd ${PRGNAM}-build-${VERSION}
echo Building ...
@@ -290,11 +401,20 @@ enable_pam=no \
${KDEOPTS} \
2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
-./download \
- 2>&1 | tee $OUTPUT/download-${PRGNAM}.log
+#./download \
+# 2>&1 | tee $OUTPUT/download-${PRGNAM}.log
+
+if [ "$P1" != "--oldbuild" ]; then
+ echo "Moving additional components into build directory for $PRGNAM..."
+ mv ../${PRGNAM}-*-${VERSION}/* build/${PRGNAM}-${VERSION}/
+ echo "Copying external sources into build directory for $PRGNAM..."
+ for (( i = 22; i < ${#SOURCE[*]}; i++ )) ; do
+ cp -a ${SOURCE[$i]} src/
+ done
+fi
# Compile everything (takes many hours):
-make -i verbose=yes \
+make -i VERBOSE=yes \
2>&1 | tee $OUTPUT/make-${PRGNAM}.log
# Install the lot:
@@ -328,6 +448,7 @@ if [ ! -z "${ADD_LANGUAGES}" ]; then
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'..."
mkdir -p ${PKG}-l10n-$lang
tar cf - --remove-files \
$(find . -name "README*$lolang*" \