blob: ce3a5ba42e2a7e903867885d61a994b1abf90d31 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mbedtls
pkgver=2.4.1
pkgrel=0
pkgdesc="Light-weight cryptographic and SSL/TLS library"
url="https://tls.mbed.org/"
arch="all"
license="GPL2+ ASL 2.0"
depends=""
makedepends="cmake perl"
subpackages="$pkgname-static $pkgname-dev $pkgname-utils"
source="$pkgname-$pkgver.tar.gz::https://github.com/ARMmbed/$pkgname/archive/$pkgname-$pkgver.tar.gz
verbose-testsuite.patch"
builddir="$srcdir/$pkgname-$pkgname-$pkgver"
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="a4494630e2c2e3705238526d51428971 mbedtls-2.4.1.tar.gz
8136afec9a4503c0087fa93eb1920bd9 verbose-testsuite.patch"
sha256sums="0c85fe59e1f0426b1c8f17efdc0c41bd531828b6cff746c392beb53c774af4cb mbedtls-2.4.1.tar.gz
21460d566f678f76bef8c2895e6c93d8a23792f6481aed5853dc63daf8cfcbaa verbose-testsuite.patch"
sha512sums="c452ec701c90bca236be1fbacb728036a01eca257c9df8b0d738e02f4a3570183e34ae23221ca61933dd34e42ca7659bae9ce5de0a6fdd870e77c4b7154d3688 mbedtls-2.4.1.tar.gz
1a0f0c8c794f8aab2a050b660e86f3cba293fcd4d0ffba9a1a1b8fd88f631d68fe194256495ed584d13e577c577829f0bbe821ffaf11165163b5a78c9d68efe8 verbose-testsuite.patch"
|