summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2010-11-28 00:13:45 +0000
committer Eric Hameleers <alien@slackware.com>2010-11-28 00:13:45 +0000
commitb7dd1f69bbeb491db84093b66724fb82d0024bcd (patch)
tree17c8bb6c0cf954ed3d919d85a1c72314278c781d
parent5bb2966d62965d6381e38b2659f74e261d5a6bc0 (diff)
downloadasb-b7dd1f69bbeb491db84093b66724fb82d0024bcd.tar.gz
asb-b7dd1f69bbeb491db84093b66724fb82d0024bcd.tar.xz
Offline build. Do not use git unless we are using HEAD as version
-rwxr-xr-xlibreoffice/build/libreoffice36.SlackBuild128
1 files changed, 72 insertions, 56 deletions
diff --git a/libreoffice/build/libreoffice36.SlackBuild b/libreoffice/build/libreoffice36.SlackBuild
index 094ed429..2140277b 100755
--- a/libreoffice/build/libreoffice36.SlackBuild
+++ b/libreoffice/build/libreoffice36.SlackBuild
@@ -70,10 +70,19 @@ TAG=${TAG:-alien}
SRCVER=${SRCVER:-3.2.99.3}
# 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="no"
+ COMPR="xz"
else
VERSION=$SRCVER
+ USE_GIT="no"
+ COMPR="bz2"
fi
DOCS="AUTHORS COPYING* MAINTAINERS NEWS README* TODO TOTEST"
@@ -104,7 +113,9 @@ TMP=${TMP:-/tmp/build}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-# Base resource locators for tarballs and snapshots:
+# 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"
GITBASE="git://anongit.freedesktop.org/git/libreoffice"
@@ -116,94 +127,89 @@ GITBASE="git://anongit.freedesktop.org/git/libreoffice"
# We will need the "build" tarball first.
# Use SRCURL for tarball releases and GITURI for git snapshots:
#SRCURL[0]=""
-SRCURL[0]="$SRCBASE/libreoffice-build-3.2.99.3.tar.gz"
+SOURCE[0]="$SRCDIR/sources/libreoffice-build-${VERSION}.tar.gz"
+SRCURL[0]="$SRCBASE/libreoffice-build-${VERSION}.tar.gz"
GITURI[0]="$GITBASE/build"
-if [ -z "$SRCURL[0]" ]; then
- SOURCE[0]="$SRCDIR/sources/libreoffice-build-${VERSION}.tar.xz"
-else
- SOURCE[0]="$SRCDIR/sources/$(basename ${SRCURL[0]})"
-fi
-
# And the rest...
-SOURCE[1]="$SRCDIR/sources/libreoffice-artwork-${VERSION}.tar.xz"
-SRCURL[1]=""
+SOURCE[1]="$SRCDIR/sources/libreoffice-artwork-${VERSION}.tar.${COMPR}"
+SRCURL[1]="$SRCBASE/libreoffice-artwork-${VERSION}.tar.${COMPR}"
GITURI[1]="$GITBASE/artwork"
-SOURCE[2]="$SRCDIR/sources/libreoffice-base-${VERSION}.tar.xz"
-SRCURL[2]=""
+SOURCE[2]="$SRCDIR/sources/libreoffice-base-${VERSION}.tar.${COMPR}"
+SRCURL[2]="$SRCBASE/libreoffice-base-${VERSION}.tar.${COMPR}"
GITURI[2]="$GITBASE/base"
-SOURCE[3]="$SRCDIR/sources/libreoffice-bootstrap-${VERSION}.tar.xz"
-SRCURL[3]=""
+SOURCE[3]="$SRCDIR/sources/libreoffice-bootstrap-${VERSION}.tar.${COMPR}"
+SRCURL[3]="$SRCBASE/libreoffice-bootstrap-${VERSION}.tar.${COMPR}"
GITURI[3]="$GITBASE/bootstrap"
-SOURCE[4]="$SRCDIR/sources/libreoffice-calc-${VERSION}.tar.xz"
-SRCURL[4]=""
+SOURCE[4]="$SRCDIR/sources/libreoffice-calc-${VERSION}.tar.${COMPR}"
+SRCURL[4]="$SRCBASE/libreoffice-calc-${VERSION}.tar.${COMPR}"
GITURI[4]="$GITBASE/calc"
-SOURCE[5]="$SRCDIR/sources/libreoffice-components-${VERSION}.tar.xz"
-SRCURL[5]=""
+SOURCE[5]="$SRCDIR/sources/libreoffice-components-${VERSION}.tar.${COMPR}"
+SRCURL[5]="$SRCBASE/libreoffice-components-${VERSION}.tar.${COMPR}"
GITURI[5]="$GITBASE/components"
-SOURCE[6]="$SRCDIR/sources/libreoffice-extras-${VERSION}.tar.xz"
-SRCURL[6]=""
+SOURCE[6]="$SRCDIR/sources/libreoffice-extras-${VERSION}.tar.${COMPR}"
+SRCURL[6]="$SRCBASE/libreoffice-extras-${VERSION}.tar.${COMPR}"
GITURI[6]="$GITBASE/extras"
-SOURCE[7]="$SRCDIR/sources/libreoffice-filters-${VERSION}.tar.xz"
-SRCURL[7]=""
+SOURCE[7]="$SRCDIR/sources/libreoffice-filters-${VERSION}.tar.${COMPR}"
+SRCURL[7]="$SRCBASE/libreoffice-filters-${VERSION}.tar.${COMPR}"
GITURI[7]="$GITBASE/filters"
-SOURCE[8]="$SRCDIR/sources/libreoffice-help-${VERSION}.tar.xz"
-SRCURL[8]=""
+SOURCE[8]="$SRCDIR/sources/libreoffice-help-${VERSION}.tar.${COMPR}"
+SRCURL[8]="$SRCBASE/libreoffice-help-${VERSION}.tar.${COMPR}"
GITURI[8]="$GITBASE/help"
-SOURCE[9]="$SRCDIR/sources/libreoffice-impress-${VERSION}.tar.xz"
-SRCURL[9]=""
+SOURCE[9]="$SRCDIR/sources/libreoffice-impress-${VERSION}.tar.${COMPR}"
+SRCURL[9]="$SRCBASE/libreoffice-impress-${VERSION}.tar.${COMPR}"
GITURI[9]="$GITBASE/impress"
-SOURCE[10]="$SRCDIR/sources/libreoffice-libs-gui-${VERSION}.tar.xz"
-SRCURL[10]=""
+SOURCE[10]="$SRCDIR/sources/libreoffice-libs-gui-${VERSION}.tar.${COMPR}"
+SRCURL[10]="$SRCBASE/libreoffice-libs-gui-${VERSION}.tar.${COMPR}"
GITURI[10]="$GITBASE/libs-gui"
-SOURCE[11]="$SRCDIR/sources/libreoffice-libs-core-${VERSION}.tar.xz"
-SRCURL[11]=""
+SOURCE[11]="$SRCDIR/sources/libreoffice-libs-core-${VERSION}.tar.${COMPR}"
+SRCURL[11]="$SRCBASE/libreoffice-libs-core-${VERSION}.tar.${COMPR}"
GITURI[11]="$GITBASE/libs-core"
-SOURCE[12]="$SRCDIR/sources/libreoffice-libs-extern-${VERSION}.tar.xz"
-SRCURL[12]=""
+SOURCE[12]="$SRCDIR/sources/libreoffice-libs-extern-${VERSION}.tar.${COMPR}"
+SRCURL[12]="$SRCBASE/libreoffice-libs-extern-${VERSION}.tar.${COMPR}"
GITURI[12]="$GITBASE/libs-extern"
-SOURCE[13]="$SRCDIR/sources/libreoffice-postprocess-${VERSION}.tar.xz"
-SRCURL[13]=""
+SOURCE[13]="$SRCDIR/sources/libreoffice-postprocess-${VERSION}.tar.${COMPR}"
+SRCURL[13]="$SRCBASE/libreoffice-postprocess-${VERSION}.tar.${COMPR}"
GITURI[13]="$GITBASE/postprocess"
-SOURCE[14]="$SRCDIR/sources/libreoffice-sdk-${VERSION}.tar.xz"
-SRCURL[14]=""
+SOURCE[14]="$SRCDIR/sources/libreoffice-sdk-${VERSION}.tar.${COMPR}"
+SRCURL[14]="$SRCBASE/libreoffice-sdk-${VERSION}.tar.${COMPR}"
GITURI[14]="$GITBASE/sdk"
-SOURCE[15]="$SRCDIR/sources/libreoffice-testing-${VERSION}.tar.xz"
-SRCURL[15]=""
+SOURCE[15]="$SRCDIR/sources/libreoffice-testing-${VERSION}.tar.${COMPR}"
+SRCURL[15]="$SRCBASE/libreoffice-testing-${VERSION}.tar.${COMPR}"
GITURI[15]="$GITBASE/testing"
-SOURCE[16]="$SRCDIR/sources/libreoffice-ure-${VERSION}.tar.xz"
-SRCURL[16]=""
+SOURCE[16]="$SRCDIR/sources/libreoffice-ure-${VERSION}.tar.${COMPR}"
+SRCURL[16]="$SRCBASE/libreoffice-ure-${VERSION}.tar.${COMPR}"
GITURI[16]="$GITBASE/ure"
-SOURCE[17]="$SRCDIR/sources/libreoffice-writer-${VERSION}.tar.xz"
-SRCURL[17]=""
+SOURCE[17]="$SRCDIR/sources/libreoffice-writer-${VERSION}.tar.${COMPR}"
+SRCURL[17]="$SRCBASE/libreoffice-writer-${VERSION}.tar.${COMPR}"
GITURI[17]="$GITBASE/writer"
-SOURCE[18]="$SRCDIR/sources/libreoffice-libs-extern-sys-${VERSION}.tar.xz"
-SRCURL[18]=""
+SOURCE[18]="$SRCDIR/sources/libreoffice-libs-extern-sys-${VERSION}.tar.${COMPR}"
+SRCURL[18]="$SRCBASE/libreoffice-libs-extern-sys-${VERSION}.tar.${COMPR}"
GITURI[18]="$GITBASE/libs-extern-sys"
-SOURCE[19]="$SRCDIR/sources/libreoffice-extensions-${VERSION}.tar.xz"
-SRCURL[19]=""
+SOURCE[19]="$SRCDIR/sources/libreoffice-extensions-${VERSION}.tar.${COMPR}"
+SRCURL[19]="$SRCBASE/libreoffice-extensions-${VERSION}.tar.${COMPR}"
GITURI[19]="$GITBASE/extensions"
-SOURCE[20]="$SRCDIR/sources/libreoffice-l10n-${VERSION}.tar.xz"
-SRCURL[20]=""
+SOURCE[20]="$SRCDIR/sources/libreoffice-l10n-${VERSION}.tar.${COMPR}"
+SRCURL[20]="$SRCBASE/libreoffice-l10n-${VERSION}.tar.${COMPR}"
GITURI[20]="$GITBASE/l10n"
# Extra libraries / binaries required to build LibreOffice from source:
@@ -417,16 +423,24 @@ src_checkout() {
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 ..
+ 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_')
+ fi
+ cd ..
else
git clone --depth=1 ${GITURI[$1]} ${PBASE}
fi
- #tar --exclude .git -${TARCOMP}cf ${2} ${PBASE}
- tar -${TARCOMP}cf ${2} ${PBASE}
+ if [ "$USE_GIT" = "yes" ]; then
+ tar -${TARCOMP}cf ${2} ${PBASE}
+ else
+ tar --exclude .git -${TARCOMP}cf ${2} ${PBASE}
+ fi
cd $RETDIR
rm -rf $CODIR/libreoffice_temp_checkout_$$
}
@@ -585,13 +599,14 @@ fi
echo "Building for these languages: $LANGUAGES"
+[ "$USE_GIT" = "yes" ] && GITOPTS="--with-git" || GITOPTS=""
+
enable_pam=no \
./autogen.sh \
--with-arch-flags="$SLKCFLAGS" \
--with-build-version="SlackBuild by Eric Hameleers" \
--with-distro=Slackware \
--with-docdir=/usr/doc/$PRGNAM-${LOVER}$VERSION \
- --with-git \
--with-installed-ooo-dirname=$PRGNAM \
--with-lang="$(echo ${LANGUAGES} |tr _ -)" \
--with-num-cpus=${NUMCPUS} \
@@ -600,6 +615,7 @@ enable_pam=no \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--mandir=/usr/man \
+ ${GITOPTS} \
${KDEOPTS} \
2>&1 | tee $OUTPUT/configure-${PRGNAM}.log