mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-26 08:51:25 +02:00
This commit upgrades the mbedtls library to the recently released 2.16 LTS version. https://tls.mbed.org/tech-updates/releases/mbedtls-2.16.0-2.7.9-and-2.1.18-released The depending packages don't need to be rebuild as the soname doesn't change (libmbedcrypto.so.3, libmbedtls.so.12 and libmbedx509.so.0)
77 lines
1.7 KiB
Plaintext
77 lines
1.7 KiB
Plaintext
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
|
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
|
|
pkgname=mbedtls
|
|
pkgver=2.16.0
|
|
pkgrel=0
|
|
pkgdesc="Light-weight cryptographic and SSL/TLS library"
|
|
url="https://tls.mbed.org"
|
|
arch="all"
|
|
license="Apache-2.0"
|
|
makedepends="cmake perl python3"
|
|
subpackages="$pkgname-static $pkgname-dev $pkgname-utils"
|
|
source="https://tls.mbed.org/download/$pkgname-$pkgver-apache.tgz"
|
|
builddir="$srcdir/$pkgname-$pkgver"
|
|
|
|
# secfixes:
|
|
# 2.14.1-r0:
|
|
# - CVE-2018-19608
|
|
# 2.12.0-r0:
|
|
# - CVE-2018-0498
|
|
# - CVE-2018-0497
|
|
# 2.7.0-r0:
|
|
# - CVE-2018-0488
|
|
# - CVE-2018-0487
|
|
# - CVE-2017-18187
|
|
# 2.6.0-r0:
|
|
# - CVE-2017-14032
|
|
# 2.4.2-r0:
|
|
# - CVE-2017-2784
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
# Enable flags for non-embedded systems.
|
|
sed -i \
|
|
-e 's|//\(#define MBEDTLS_THREADING_C\)|\1|' \
|
|
-e 's|//\(#define MBEDTLS_THREADING_PTHREAD\)|\1|' \
|
|
"$builddir"/include/mbedtls/config.h
|
|
}
|
|
|
|
build() {
|
|
cd "$builddir"
|
|
|
|
cmake . \
|
|
-DCMAKE_BUILD_TYPE="MinSizeRel" \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_VERBOSE_MAKEFILE=ON \
|
|
-DUSE_SHARED_MBEDTLS_LIBRARY=ON
|
|
make
|
|
}
|
|
|
|
check() {
|
|
cd "$builddir"
|
|
make test
|
|
}
|
|
|
|
package() {
|
|
cd "$builddir"
|
|
make DESTDIR="$pkgdir" install
|
|
}
|
|
|
|
utils() {
|
|
pkgdesc="Utilities for mbedtls (including gen_key / cert_write)"
|
|
|
|
mkdir -p "$subpkgdir"/usr
|
|
mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
|
|
}
|
|
|
|
static() {
|
|
pkgdesc="Static files for mbedtls"
|
|
|
|
mkdir -p "$subpkgdir"/usr/lib
|
|
mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/
|
|
chmod -x "$subpkgdir"/usr/lib/*.a
|
|
}
|
|
|
|
sha512sums="765303bc0572b904e05990b254ed160eb18e300a1bbbb4aa5176e5cdbf5464a944d5ad06b712183e2396a48f0c7ae529e0c820303c3995f7d6b9c3f24535d004 mbedtls-2.16.0-apache.tgz"
|