aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2019-05-01 09:22:57 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2019-05-01 13:59:57 +0000
commit8cb89d090383465951e0de2784328902463de063 (patch)
tree0cc1bc7dfc01cf71b511a450de94c9ff6a84f7eb /main
parentc03365b2f559614b17bf29b480153987acf31028 (diff)
downloadaports-8cb89d090383465951e0de2784328902463de063.tar.bz2
aports-8cb89d090383465951e0de2784328902463de063.tar.xz
main/mbedtls: moved from community
needed by bctoolbox which is needed by ortp which is needed by sngtc_client which is needed by Freeswitch
Diffstat (limited to 'main')
-rw-r--r--main/mbedtls/APKBUILD76
1 files changed, 76 insertions, 0 deletions
diff --git a/main/mbedtls/APKBUILD b/main/mbedtls/APKBUILD
new file mode 100644
index 0000000000..6b7bda1c87
--- /dev/null
+++ b/main/mbedtls/APKBUILD
@@ -0,0 +1,76 @@
+# Contributor: Ɓukasz Jendrysik <scadu@yandex.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=mbedtls
+pkgver=2.16.1
+pkgrel=1
+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="9e436ef22f1a43d8e139be4dcba1544291ee2cdb3b05335c4d6127536b122f95c2d894bab965d3242a53509637860aad72715651c5cf7d176103fa762eea6a68 mbedtls-2.16.1-apache.tgz"