summaryrefslogtreecommitdiff
path: root/user/mbedtls/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'user/mbedtls/APKBUILD')
-rw-r--r--user/mbedtls/APKBUILD40
1 files changed, 40 insertions, 0 deletions
diff --git a/user/mbedtls/APKBUILD b/user/mbedtls/APKBUILD
new file mode 100644
index 000000000..bcd87c1b5
--- /dev/null
+++ b/user/mbedtls/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: Síle Ekaterin Liszka <sheila@vulpine.house>
+# Maintainer: Síle Ekaterin Liszka <sheila@vulpine.house>
+pkgname=mbedtls
+pkgver=2.28.0
+pkgrel=0
+pkgdesc="Lightweight TLS library"
+url="https://tls.mbed.org"
+arch="all"
+license="Apache-2.0"
+depends=""
+checkdepends="python3"
+makedepends="cmake"
+subpackages="$pkgname-dev"
+source="mbedtls-$pkgver.tar.gz::https://github.com/ARMmbed/mbedtls/archive/refs/tags/v$pkgver.tar.gz"
+
+build() {
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_SHARED_LIBS=True \
+ -DCMAKE_BUILD_TYPE=RelWithDebugInfo \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS -fPIC" \
+ -DCMAKE_C_FLAGS="$CFLAGS -fPIC" \
+ ${CMAKE_CROSSOPTS} \
+ .
+ make
+}
+
+check() {
+ CTEST_OUTPUT_ON_FAILURE=TRUE ctest
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="907867edf532ba3b099f4fb7ce31f5773ceceb072a8d067b1d830e879d541f92f401d64f13bbe6b4eb0845e58bb765d7d28896be414bb0fc7ac5b3876066be5f mbedtls-2.28.0.tar.gz"