system/rhash: Fix parallel builds.

Signed-off-by: B. Watson <yalhcru@gmail.com>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
B. Watson 2022-02-10 03:25:55 -05:00 committed by Willy Sudiarto Raharjo
parent a13b6a8c9e
commit 4668ff576e
No known key found for this signature in database
GPG Key ID: 3F617144D7238786
1 changed files with 14 additions and 8 deletions

View File

@ -29,6 +29,8 @@
# 10.3.2015 - made quiet the clean up, script actually broke on last update…
# 3 Мартъ 1878 възстановѧване на Българиѧ, 3 Мартъ 1918 (40 г. по–късно) победа надъ Русиѧ
# 20220210 bkw: Modified by SlackBuilds.org, fix parallel builds.
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=rhash
@ -51,9 +53,6 @@ if [ "$STATICLIB" = "yes" ]; then
ENABLESTATICLIB="--enable-lib-static"
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"
exit 0
@ -65,15 +64,17 @@ OUTPUT=${OUTPUT:-/tmp}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) export ARCH=i486 ;;
i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
*) export ARCH=$( uname -m ) ;;
esac
fi
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -m32 -march=i486 -mtune=i686"
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
@ -97,9 +98,9 @@ cd RHash-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
-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 {} \;
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \+
if [ "$STATICLIB" = "yes" ]; then
echo "+=============================+"
@ -119,7 +120,12 @@ fi
--extra-cflags="${SLKCFLAGS} ${OPTCFLAGS}" \
--extra-ldflags="${OPTLDFLAGS}"
# 20220210 bkw: trying to do the build and install in one go
# with a single "make install" command breaks parallel builds
# and only saves 4 keystrokes for the script author. bad tradeoff.
make
make DESTDIR=$PKG install install-gmo install-lib-so-link
# Don't clobber the default config
mv -v $PKG/etc/rhashrc $PKG/etc/rhashrc.new