blob: 5c8f6e6b36812f21a5b2145bce0bff4429a63c42 (
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
54
55
56
57
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mbedtls
pkgver=2.0.0
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-2.0.0
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"
cmake . \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE="Release" \
-DUSE_SHARED_MBEDTLS_LIBRARY=1 \
|| return 1
make || return 1
}
package() {
cd "$_builddir"
make DESTDIR="$pkgdir" install || return 1
rm -f "$pkgdir"/usr/lib/*.la
}
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="6b8246a19a7a77737856e729cc8a0952 mbedtls-2.0.0-gpl.tgz"
sha256sums="149a06621368540b7e1cef1b203c268439c2edbf29e2e9471d8021125df34952 mbedtls-2.0.0-gpl.tgz"
sha512sums="184b7ad8a673db80321de9b63d6d1e19e1f62bea585efc6ac67e1c58ed312d112370dfd157ed1ff2db76f2ff5dc2bc7e9808e4c6779707f2b2c426726c2e1f1c mbedtls-2.0.0-gpl.tgz"
|