aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2022-04-22 11:01:08 -0400
committerB. Watson <yalhcru@gmail.com>2022-04-22 11:01:08 -0400
commitef8ab03f3b1b7a85090b9d6b1a77ac373cb38f22 (patch)
tree3b7c3d183997eac3688f337d9a8a5d4eb7b9845a
parent9783d5ef8d37772fe7f2ab646e6e66b06f19de59 (diff)
libraries/mbedtls: Fix PRINT_PACKAGE_NAME.
Signed-off-by: B. Watson <yalhcru@gmail.com>
-rw-r--r--libraries/mbedtls/mbedtls.SlackBuild24
1 files changed, 10 insertions, 14 deletions
diff --git a/libraries/mbedtls/mbedtls.SlackBuild b/libraries/mbedtls/mbedtls.SlackBuild
index 6b3ba794568b..792cd7af56b7 100644
--- a/libraries/mbedtls/mbedtls.SlackBuild
+++ b/libraries/mbedtls/mbedtls.SlackBuild
@@ -23,6 +23,8 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20220422 bkw: Modified by SlackBuilds.org: fix PRINT_PACKAGE_NAME.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=mbedtls
@@ -31,14 +33,6 @@ BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
-# 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
-fi
-
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -51,6 +45,11 @@ if [ -z "$ARCH" ]; then
esac
fi
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
@@ -76,9 +75,9 @@ cd $PRGNAM-$PRGNAM-$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 {} \+
mkdir build
cd build
@@ -92,12 +91,9 @@ cd build
-DCMAKE_SKIP_RPATH=TRUE \
-DCMAKE_BUILD_TYPE=Release ..
make
- make install DESTDIR=$PKG
+ make install/strip DESTDIR=$PKG
cd ..
-find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" |
- grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a CONTRIBUTING.md ChangeLog LICENSE README.md $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild