diff options
Diffstat (limited to 'office/libreoffice/libreoffice.SlackBuild')
-rw-r--r-- | office/libreoffice/libreoffice.SlackBuild | 49 |
1 files changed, 27 insertions, 22 deletions
diff --git a/office/libreoffice/libreoffice.SlackBuild b/office/libreoffice/libreoffice.SlackBuild index 78f3b0802e079..d7edc19227f14 100644 --- a/office/libreoffice/libreoffice.SlackBuild +++ b/office/libreoffice/libreoffice.SlackBuild @@ -26,15 +26,15 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# Modified by Niels Horn <niels.horn@gmail.com> for LibreOffice -# Revision date: 2010/09/30 +# Modified by Niels Horn <niels.horn@gmail.com> +# Revision date: 2010/11/24 PRGNAM=libreoffice -VERSION="3.3.0_beta1" +VERSION="3.3.0_beta3" BUILD=${BUILD:-1} TAG=${TAG:-_SBo} -SRCVERSION=${VERSION//_/-} +SRCVERSION=$(echo $VERSION | cut -f1 -d_) if [ -z "$ARCH" ]; then case "$( uname -m )" in @@ -83,13 +83,22 @@ else PKGARCH="i586" fi -# Ignore this - it's just to get the toplevel directory name of the -# extracted tarball archive if [ $WJRE != no ]; then - SOURCEDIR=$(tar tzf $CWD/LO_${SRCVERSION}_Linux_${SRCARCH}_install-rpm-wJRE_${LOLANG}.tar.gz 2>/dev/null | head -n 1 | tr -d \/) + TARJRE="-wJRE" else - SOURCEDIR=$(tar tzf $CWD/LO_${SRCVERSION}_Linux_${SRCARCH}_install-rpm_${LOLANG}.tar.gz 2>/dev/null | head -n 1 | tr -d \/) + TARJRE="" +fi + +# We have all the variables, construct the name of the tarball +TARNAME="LibO_${SRCVERSION}_Linux_${SRCARCH}_install-rpm${TARJRE}_${LOLANG}.tar.gz" +if [ ! -r $TARBALL ]; then + echo "$TARBALL not found" + exit 1 fi + +# 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 [ -z $SOURCEDIR ] && unset SOURCEDIR @@ -100,12 +109,8 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT rm -rf $TMP/$SOURCEDIR -# Handle the tarballs that include a bundled JRE -if [ $WJRE != no ]; then - tar xvf $CWD/LO_${SRCVERSION}_Linux_${SRCARCH}_install-rpm-wJRE_${LOLANG}.tar.gz -C $TMP -else - tar xvf $CWD/LO_${SRCVERSION}_Linux_${SRCARCH}_install-rpm_${LOLANG}.tar.gz -C $TMP -fi +# 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} @@ -114,7 +119,7 @@ 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/libreoffice3.3-freedesktop-menus-3.3-9526.noarch.rpm . +mv desktop-integration/libreoffice3.3-freedesktop-menus-3.3-2.noarch.rpm . # No, I don't want to update our packaged files after the fact rm -f *onlineupdate*.rpm # We don't want this @@ -132,25 +137,25 @@ cd $PKG/usr/bin for FILE in \ sbase scalc sdraw simpress smath soffice spadmin swriter unopkg ; do rm -f $FILE - ln -sf ../../opt/libreoffice3/program/$FILE $FILE ; + ln -sf ../../opt/libreoffice/program/$FILE $FILE ; done cd - # Remove DejaVu and Liberation fonts - these are included in other packages -rm -f opt/libreoffice/basis3.3/share/fonts/truetype/[DL]*.ttf +rm -f opt/libreoffice/basis3.3/share/fonts/truetype/{DejaVu,Liberation}*.ttf # Fix Exec commands in the desktop files # See http://bugzilla.xfce.org/show_bug.cgi?id=2430 -cd $PKG//opt/libreoffice3/share/xdg/ +cd $PKG//opt/libreoffice/share/xdg/ for APP in base calc draw impress math writer; do - sed -i 's%Exec=libreoffice3 -%Exec=s%' $APP.desktop ; + sed -i 's%Exec=libreoffice -%Exec=/opt/libreoffice/program/s%' $APP.desktop ; done cd - ## Install extensions ### --> TODO: Doesn't work for now <-- ### -#UNOPKG_BIN=$PKG/opt/libreoffice3/program/unopkg -#DICT_DIR=$PKG/opt/libreoffice3/share/extension/install +#UNOPKG_BIN=$PKG/opt/libreoffice/program/unopkg +#DICT_DIR=$PKG/opt/libreoffice/share/extension/install #if [ -x "$UNOPKG_BIN" ]; then # UNOPKG_TMP=$TMP/$$$$$$ # find $DICT_DIR -type f -name "*.oxt" \ @@ -161,7 +166,7 @@ cd - # Move docs to their expected locations mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cd $PKG/opt/libreoffice3 +cd $PKG/opt/libreoffice mv README* *LICENSE* readmes licenses $PKG/usr/doc/$PRGNAM-$VERSION cd - cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild |