diff options
-rw-r--r-- | testing/wolfssl/APKBUILD | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/testing/wolfssl/APKBUILD b/testing/wolfssl/APKBUILD index eab221dfe42..df45af421fa 100644 --- a/testing/wolfssl/APKBUILD +++ b/testing/wolfssl/APKBUILD @@ -3,7 +3,7 @@ pkgname=wolfssl pkgver=5.3.0 _pkgver=$pkgver-stable -pkgrel=0 +pkgrel=1 pkgdesc="Embedded TLS Library" url="https://www.wolfssl.com" arch="all" @@ -13,7 +13,7 @@ makedepends=" automake libtool " -subpackages="$pkgname-dbg $pkgname-dev" +subpackages="$pkgname-dev $pkgname-fast" source="https://github.com/wolfSSL/wolfssl/archive/v$_pkgver/wolfssl-$_pkgver.tar.gz" builddir="$srcdir/$pkgname-$_pkgver" options="!check" # there are actually no tests! >_< @@ -22,16 +22,25 @@ prepare() { default_prepare ./autogen.sh + + cp -ar "$builddir" "$builddir~fast" } build() { - # Note: Primary development uses automake, the support for CMake is - # still under development. + _build + + cd "$builddir~fast" local extra_opts= case "$CARCH" in - x86_64) extra_opts="--enable-aesni";; + x86_64) extra_opts="--enable-intelasm --enable-sp-asm";; esac + CFLAGS="${CFLAGS/-Os/} -O3" _build --enable-sp $extra_opts +} + +_build() { + # Note: Primary development uses automake, the support for CMake is + # still under development. # We use --enable-all and --enable-reproducible-build instead of # --enable-distro to ensure options.h gets installed. @@ -54,17 +63,27 @@ build() { --enable-sni \ --enable-pkcs11 \ --disable-examples \ - $extra_opts + "$@" make } package() { + provider_priority=100 # highest (other provider is $pkgname-fast) + make DESTDIR="$pkgdir" install # No useful stuff here. rm -rf "$pkgdir"/usr/share/doc } +fast() { + pkgdesc="$pkgdesc - optimized for performance" + provider_priority=10 # lowest (other provider is $pkgname) + + mkdir -p "$subpkgdir"/usr/lib + cp -P "$builddir~fast"/src/.libs/libwolfssl.so.* "$subpkgdir"/usr/lib/ +} + sha512sums=" 399d2b8aad58471d237d21dea68c33fde2b9a3c117c554c241d9174db02847a6c31afae2908839d18f9ada317b2388560a24c077b76014f663227061342bf045 wolfssl-5.3.0-stable.tar.gz " |