[arch-commits] Commit in mbedtls/repos (2 files)

Antonio Rojas arojas at gemini.archlinux.org
Tue Dec 28 10:20:02 UTC 2021


    Date: Tuesday, December 28, 2021 @ 10:20:02
  Author: arojas
Revision: 1085476

archrelease: copy trunk to community-staging-x86_64

Added:
  mbedtls/repos/community-staging-x86_64/
  mbedtls/repos/community-staging-x86_64/PKGBUILD
    (from rev 1085475, mbedtls/trunk/PKGBUILD)

----------+
 PKGBUILD |   62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

Copied: mbedtls/repos/community-staging-x86_64/PKGBUILD (from rev 1085475, mbedtls/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2021-12-28 10:20:02 UTC (rev 1085476)
@@ -0,0 +1,62 @@
+# Maintainer: Kyle Keen <keenerd at gmail.com>
+# Contributor: Mihai Militaru <mihai militaru at xmpp dot ro>
+# Contributor: carstene1ns <arch carsten-teibes.de>
+
+pkgname=mbedtls
+pkgver=2.28.0
+pkgrel=1
+pkgdesc="Portable cryptographic and SSL/TLS library, aka polarssl"
+arch=('x86_64')
+url="https://tls.mbed.org"
+license=('Apache')
+depends=('glibc' 'sh')
+checkdepends=('python')
+makedepends=('cmake')
+provides=('polarssl' 'libmbedcrypto.so' 'libmbedtls.so' 'libmbedx509.so')
+replaces=('polarssl')
+conflicts=('polarssl')
+options=('staticlibs')
+source=(https://github.com/ARMmbed/mbedtls/archive/${pkgname}-${pkgver}.tar.gz)
+sha256sums=('f644248f23cf04315cf9bb58d88c4c9471c16ca0533ecf33f86fb7749a3e5fa6')
+b2sums=('1141465bc5b73e7fd94bbd02c79290093fd075626be93aea839a54ebff81fb00917f0a4fe7911fee983a36147fa4922d258714a330b40b0da4764a3b2419df8b')
+
+prepare() {
+  cd "$pkgname-$pkgname-$pkgver"
+  # enable flags for non-embedded systems
+  sed -i 's|//\(#define MBEDTLS_THREADING_C\)|\1|' include/mbedtls/config.h
+  sed -i 's|//\(#define MBEDTLS_THREADING_PTHREAD\)|\1|' include/mbedtls/config.h
+}
+
+build() {
+  cd "$pkgname-$pkgname-$pkgver"
+  cmake \
+    -B build \
+    -DCMAKE_INSTALL_PREFIX=/usr \
+    -DCMAKE_C_FLAGS="${CFLAGS} -ffat-lto-objects" \
+    -DMBEDTLS_FATAL_WARNINGS=OFF \
+    -DCMAKE_VERBOSE_MAKEFILE=ON \
+    -DUSE_SHARED_MBEDTLS_LIBRARY=ON \
+    -DCMAKE_INSTALL_RPATH=
+  make -C build
+}
+
+check() {
+  cd "$pkgname-$pkgname-$pkgver"
+  make -C build test
+  # make check?
+}
+
+package() {
+  cd "$pkgname-$pkgname-$pkgver"
+  make -C build DESTDIR="$pkgdir" install
+
+  # 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
+}



More information about the arch-commits mailing list