aboutsummaryrefslogtreecommitdiffstats
path: root/community/mbedtls
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2016-03-18 06:30:11 +0000
committerTimo Teräs <timo.teras@iki.fi>2016-03-18 06:30:11 +0000
commit0f7bad94558268b009016f58634b68736446105e (patch)
tree90537d22273be1125517ce47b550e499dae579ff /community/mbedtls
parente69c6a196c7fd7fcfbda773beba4c96d450ad5fb (diff)
downloadaports-0f7bad94558268b009016f58634b68736446105e.tar.bz2
aports-0f7bad94558268b009016f58634b68736446105e.tar.xz
community/mbedtls: moved from testing
Diffstat (limited to 'community/mbedtls')
-rw-r--r--community/mbedtls/APKBUILD60
1 files changed, 60 insertions, 0 deletions
diff --git a/community/mbedtls/APKBUILD b/community/mbedtls/APKBUILD
new file mode 100644
index 0000000000..cdffbf2755
--- /dev/null
+++ b/community/mbedtls/APKBUILD
@@ -0,0 +1,60 @@
+# Contributor: Łukasz Jendrysik <scadu@yandex.com>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=mbedtls
+pkgver=2.2.1
+pkgrel=0
+pkgdesc="Light-weight cryptographic and SSL/TLS library"
+url="https://tls.mbed.org/"
+arch="all"
+license="GPLv2+ with exceptions"
+depends=""
+depends_dev=""
+makedepends="$depends_dev cmake perl"
+install=""
+subpackages="$pkgname-static $pkgname-dev $pkgname-utils"
+source="https://tls.mbed.org/download/mbedtls-$pkgver-gpl.tgz"
+
+_builddir="$srcdir"/mbedtls-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ # enable flags for non-embedded systems
+ sed -i -e 's|//\(#define MBEDTLS_THREADING_C\)|\1|' -e 's|//\(#define MBEDTLS_THREADING_PTHREAD\)|\1|' include/mbedtls/config.h
+ cmake . \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_BUILD_TYPE="Release" \
+ -DUSE_SHARED_MBEDTLS_LIBRARY=1 \
+ || return 1
+ make || return 1
+ make test || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+}
+
+utils() {
+ pkgdesc="Utilities for mbedtls"
+ mkdir -p "$subpkgdir"/usr/libexec
+ mv "$pkgdir"/usr/bin "$subpkgdir"/usr/libexec/mbedtls || return 1
+}
+
+static() {
+ pkgdesc="Static files for mbedtls"
+ mkdir -p "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/*.a "$subpkgdir"/usr/lib/
+}
+
+md5sums="b6909d94600fc5f644e9bca52e96fb27 mbedtls-2.2.1-gpl.tgz"
+sha256sums="bb1bffa3ac5ab143be2aae3d45a7a92b36112888ef465024d83724865fe62974 mbedtls-2.2.1-gpl.tgz"
+sha512sums="03c32b46369d35e61acfeac83f417d09307d2f1e4358f9ea6af275d9a9a2319ca7a244733b5950a48d59f6305e4adcad6a66e589b42ee7417d1d4362c2595a4f mbedtls-2.2.1-gpl.tgz"