Date: Wednesday, April 19, 2023 @ 12:16:36
Author: alucryd
Revision: 1447441
archrelease: copy trunk to community-staging-x86_64
Added:
mbedtls/repos/community-staging-x86_64/
mbedtls/repos/community-staging-x86_64/PKGBUILD
(from rev 1447440, mbedtls/trunk/PKGBUILD)
----------+
PKGBUILD | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 71 insertions(+)
Copied: mbedtls/repos/community-staging-x86_64/PKGBUILD (from rev 1447440,
mbedtls/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2023-04-19 12:16:36 UTC (rev 1447441)
@@ -0,0 +1,71 @@
+# Maintainer: Maxime Gauduin <[email protected]>
+# Contributor: Kyle Keen <[email protected]>
+# Contributor: Mihai Militaru <mihai militaru at xmpp dot ro>
+# Contributor: carstene1ns <arch carsten-teibes.de>
+
+pkgname=mbedtls
+pkgver=3.4.0
+pkgrel=1
+pkgdesc='An open source, portable, easy to use, readable and flexible TLS
library'
+arch=(x86_64)
+url=https://tls.mbed.org
+license=(Apache)
+depends=(
+ glibc
+ sh
+)
+checkdepends=(python)
+makedepends=(
+ cmake
+ git
+ ninja
+)
+provides=(
+ libmbedcrypto.so
+ libmbedtls.so
+ libmbedx509.so
+ polarssl
+)
+replaces=(polarssl)
+conflicts=(polarssl)
+options=(staticlibs)
+_tag=1873d3bfc2da771672bd8e7e8f41f57e0af77f33
+source=(git+https://github.com/ARMmbed/mbedtls.git#tag=${_tag})
+b2sums=(SKIP)
+
+pkgver() {
+ cd mbedtls
+ git describe --tags | sed 's/^v//; s/^mbedtls-//'
+}
+
+build() {
+ export CFLAGS+=' -ffat-lto-objects'
+ cmake -S mbedtls -B build -G Ninja \
+ -DCMAKE_BUILD_TYPE=None \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DUSE_SHARED_MBEDTLS_LIBRARY=ON \
+ -DUSE_STATIC_MBEDTLS_LIBRARY=ON \
+ -Wno-dev
+ cmake --build build
+}
+
+check() {
+ LD_LIBRARY_PATH="${srcdir}"/build/library ctest --test-dir build
+}
+
+package() {
+ DESTDIR="${pkgdir}" cmake --install build
+
+ # rename generic utils
+ local _prog _baseprog
+ for _prog in "${pkgdir}"/usr/bin/*; do
+ _baseprog=$(basename "$_prog")
+ mv -v "$_prog" "${_prog//$_baseprog/mbedtls_$_baseprog}"
+ done
+
+ # fixup static lib permissions
+ chmod 644 "$pkgdir"/usr/lib/*.a
+}
+
+# vim: ts=2 sw=2 et: