[arch-commits] Commit in mbedtls/repos (2 files)
Antonio Rojas
arojas at archlinux.org
Fri Jul 9 17:48:23 UTC 2021
Date: Friday, July 9, 2021 @ 17:48:22
Author: arojas
Revision: 976239
archrelease: copy trunk to community-staging-x86_64
Added:
mbedtls/repos/community-staging-x86_64/
mbedtls/repos/community-staging-x86_64/PKGBUILD
(from rev 976238, mbedtls/trunk/PKGBUILD)
----------+
PKGBUILD | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 62 insertions(+)
Copied: mbedtls/repos/community-staging-x86_64/PKGBUILD (from rev 976238, mbedtls/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2021-07-09 17:48:22 UTC (rev 976239)
@@ -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.27.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=('4f6a43f06ded62aa20ef582436a39b65902e1126cbbe2fb17f394e9e9a552767')
+b2sums=('31840e5a518643495f319cac8e0c876bdca5dbdee6524d30cace3538d5fb5ba7847dd653f61f775f5c3c384ac0533afdbf6172b3e523db515eceecc29fadd2da')
+
+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_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -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