PKGBUILDs/extra/wolfssl/PKGBUILD
2022-11-04 13:27:00 +00:00

61 lines
2 KiB
Bash

# Maintainer: David Runge <dvzrv@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - cmake with -DWOLFSSL_SHA3=ON, required and not set by default for v7
pkgname=wolfssl
pkgver=5.5.3
pkgrel=1
pkgdesc="Lightweight, portable, C-language-based SSL/TLS library"
arch=(x86_64)
url="https://www.wolfssl.com/"
license=(GPL2)
depends=(glibc)
makedepends=(cmake)
provides=(libwolfssl.so)
options=(debug)
source=(
$pkgname-$pkgver-stable.tar.gz::https://github.com/$pkgname/$pkgname/archive/refs/tags/v$pkgver-stable.tar.gz
https://github.com/$pkgname/$pkgname/releases/download/v$pkgver-stable/$pkgname-$pkgver-stable.tar.gz.asc
$pkgname-5.5.1-cmake.patch
)
sha512sums=('ae0c2ae7834f24e2f3acbd2ef4dc9c0cfe94ac18d9404adef0ae681225c82aa3a13f7d1584ffd1bc59ff11696caa4f9837c6ba52513429755c95f4d999c9c115'
'SKIP'
'02e2a6c370b2ad8e737b9d40d435a65babd8ce9c03892e1f1bf484d328f45bda4fe8be82cc051fdcda4946c405f8ea4baa6840d1db5ae54bec0dbc0dcce7da28')
b2sums=('840122df0b313255275612ef2c3519d0bf1fb0c0ac2a01a336b0e9d2cb07b7e0e387198559b176af225b49f6911851607bf0f92cc6df29da7b12de9700c25d87'
'SKIP'
'82cee658075ffb8a2e1ebb2b0a8018b7edbacd29727f7aaca026c8d8808e48cfd617c2e22a01601a80d377423f57d7b6c7dc18186c2f59d8a7ab60bf37ce75ff')
validpgpkeys=(
A2A48E7BCB96C5BECB987314EBC80E415CA29677 # wolfSSL <secure@wolfssl.com>
)
prepare() {
# -Werror not even once: https://github.com/wolfSSL/wolfssl/issues/5553
patch -Np1 -d $pkgname-$pkgver-stable -i ../$pkgname-5.5.1-cmake.patch
}
build() {
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=None \
-DWOLFSSL_CURVE25519=ON \
-DWOLFSSL_CURVE448=ON \
-DWOLFSSL_ED25519=ON \
-DWOLFSSL_ED448=ON \
-DWOLFSSL_SHA3=ON \
-DWOLFSSL_REPRODUCIBLE_BUILD=ON \
-Wno-dev \
-B build \
-S $pkgname-$pkgver-stable
cmake --build build --verbose
}
check() {
cd build
ctest --output-on-failure
}
package() {
DESTDIR="$pkgdir" cmake --install build
install -vDm 644 $pkgname-$pkgver-stable/{README,ChangeLog}.md -t "$pkgdir/usr/share/doc/$pkgname/"
}