summaryrefslogtreecommitdiff
path: root/user/mbedtls/APKBUILD
diff options
context:
space:
mode:
authorSheila Aman <sheila@vulpine.house>2022-02-10 15:12:25 -0800
committerZach van Rijn <me@zv.io>2022-06-12 23:51:31 +0000
commit82058c47e7fe1eb254643170dcb272a84d1abefc (patch)
treeb4345b8888aed659c4549872591a43ba3db8558b /user/mbedtls/APKBUILD
parent4ad067504137d04fa83481513645c160df7c1609 (diff)
downloadpackages-82058c47e7fe1eb254643170dcb272a84d1abefc.tar.gz
packages-82058c47e7fe1eb254643170dcb272a84d1abefc.tar.bz2
packages-82058c47e7fe1eb254643170dcb272a84d1abefc.tar.xz
packages-82058c47e7fe1eb254643170dcb272a84d1abefc.zip
user/mbedtls: new package.
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"