Browse Source

Revert "l/mbedtls: Upgraded to mbedtls-2.2.1."

This reverts commit 13c745da83.
slackware-14.2
Damien Goutte-Gattat 6 years ago
parent
commit
08b114bb26
  1. 1
      l/mbedtls/mbedtls-2.2.0-gpl.tgz.sha1
  2. 1
      l/mbedtls/mbedtls-2.2.1-gpl.tgz.sha1
  3. 39
      l/mbedtls/mbedtls.SlackBuild

1
l/mbedtls/mbedtls-2.2.0-gpl.tgz.sha1

@ -0,0 +1 @@
69eb876cbdd8a3dc5122be2234d0cfe187437e95 mbedtls-2.2.0-gpl.tgz

1
l/mbedtls/mbedtls-2.2.1-gpl.tgz.sha1

@ -1 +0,0 @@
513f8cd8afd82e3181ab742eefcfe32fc1a4594d mbedtls-2.2.1-gpl.tgz

39
l/mbedtls/mbedtls.SlackBuild

@ -1,6 +1,6 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2014,2015,2016 Damien Goutte-Gattat
# Copyright (C) 2014,2015 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
@ -26,7 +26,7 @@
# Source package infos
NAMESRC=${NAMESRC:-mbedtls}
VERSION=${VERSION:-2.2.1}
VERSION=${VERSION:-2.2.0}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION-gpl.tgz}
WGET=${WGET:-https://tls.mbed.org/download/$ARCHIVE}
@ -45,9 +45,6 @@ CWD=$(pwd)
set -e # Quit if a command returns non-zero
LIBDIRSUFFIX=
[ "x$ARCH" = xx86_64 ] && LIBDIRSUFFIX=64
# Sanity checks
if [ $UID -eq 0 ]; then
echo "You should NOT run this script as ROOT!"
@ -58,6 +55,21 @@ if [ ! -d $TMP ]; then
exit 1
fi
# Compilation flags
LIBDIRSUFFIX=""
case "$ARCH" in
i?86)
CPUOPT="-O2 -march=$ARCH -mtune=i686"
;;
x86_64)
CPUOPT="-O2 -fPIC"
LIBDIRSUFFIX="64"
;;
*)
CPUOPT="-O2"
;;
esac
# Get and verify the source archive
if [ ! -r $ARCHIVE ]; then
wget -c -O $ARCHIVE.part "$WGET"
@ -71,20 +83,17 @@ cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
mkdir build && cd build
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DLIB_INSTALL_DIR=lib$LIBDIRSUFFIX \
-DENABLE_PROGRAMS=Off \
-DUSE_SHARED_MBEDTLS_LIBRARY=On \
..
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
make -j $JOBS
make install/strip DESTDIR=$PKG
make check
mkdir -p $PKG/usr/lib$LIBDIRSUFFIX $PKG/usr/include/mbedtls
install -m 644 library/libmbed{tls,x509,crypto}.a $PKG/usr/lib$LIBDIRSUFFIX/
cp -r include/mbedtls $PKG/usr/include
# Install the documentation
mkdir -p $PKG/usr/doc/$NAME
install -m 644 ../ChangeLog ../gpl-2.0.txt ../README.md $PKG/usr/doc/$NAME
install -m 644 ChangeLog LICENSE README.md $PKG/usr/doc/$NAME
# Copy slack-desc file
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc

Loading…
Cancel
Save