From be644c2afd412174cce86f992a61f26395085b45 Mon Sep 17 00:00:00 2001 From: Heinz Wiesinger Date: Sun, 4 Jul 2021 15:59:56 +0200 Subject: office/broffice.org: Fix support for PRINT_PACKAGE_NAME Signed-off-by: Heinz Wiesinger --- office/broffice.org/broffice.org.SlackBuild | 34 +++++++++++++++-------------- 1 file changed, 18 insertions(+), 16 deletions(-) (limited to 'office/broffice.org') diff --git a/office/broffice.org/broffice.org.SlackBuild b/office/broffice.org/broffice.org.SlackBuild index 36831bcff1e7e..4552de5aab446 100644 --- a/office/broffice.org/broffice.org.SlackBuild +++ b/office/broffice.org/broffice.org.SlackBuild @@ -38,11 +38,27 @@ if [ -z "$ARCH" ]; then esac fi +# Work just for pt-BR. Other languages must use the OpenOffice.org slackbuild. +OOLANG="pt-BR" # Leave this alone +PKG_LANG=$(echo $OOLANG | sed s/-/_/) # Leave this alone + +# Change source package name +if [ "$ARCH" = "x86_64" ]; then + SRCARCH="x86-64" + PKGARCH="$ARCH" +elif [ "$ARCH" = "arm" ]; then + printf "\n$ARCH is unsupported for OOo...\n\n" + exit 1 +else + SRCARCH="x86" + PKGARCH="i586" +fi + # If the variable PRINT_PACKAGE_NAME is set, then this script will report what # the name of the created package would be, and then exit. This information # could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then - echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + echo "$PRGNAM-${VERSION}_${PKG_LANG}-$PKGARCH-$BUILD$TAG.$PKGTYPE" exit 0 fi @@ -50,9 +66,6 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -# Work just for pt-BR. Other languages must use the OpenOffice.org slackbuild. -OOLANG="pt-BR" # Leave this alone -PKG_LANG=$(echo $OOLANG | sed s/-/_/) # Leave this alone # Some localized versions only ship with a bundled JRE, and we'd like this # script to work on those as well... More importantly, the non-jre tarballs # don't seem to hang around on the mirrors for the last two releases, so I'm @@ -64,18 +77,6 @@ WJRE=${WJRE:-yes} # variable to "YES" Default is "NO" DISABLE_JAVA=${DISABLE_JAVA:-NO} -# Change source package name -if [ "$ARCH" = "x86_64" ]; then - SRCARCH="x86-64" - PKGARCH="$ARCH" -elif [ "$ARCH" = "arm" ]; then - printf "\n$ARCH is unsupported for OOo...\n\n" - exit 1 -else - SRCARCH="x86" - PKGARCH="i586" -fi - # Ignore this - it's just to get the toplevel directory name of the # extracted tarball archive if [ $WJRE != no ]; then @@ -176,4 +177,5 @@ find -L . \ -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 {} \; + /sbin/makepkg -c n -l y $OUTPUT/$PRGNAM-${VERSION}_${PKG_LANG}-$PKGARCH-$BUILD$TAG.$PKGTYPE -- cgit v1.2.3