# Contributor: Carlo Landmeter # Maintainer: Natanael Copa pkgname=libssh pkgver=0.10.5 pkgrel=0 pkgdesc="Library for accessing ssh client services through C libraries" options="!check" # Tests require CLIENT_TESTING enabled which needs socket_wrapper url="https://www.libssh.org/" arch="all" license="LGPL-2.1-or-later BSD-2-Clause" depends_dev="openssl-dev>3 zlib-dev" makedepends="$depends_dev cmake samurai" checkdepends="cmocka-dev" subpackages="$pkgname-dev" source="https://www.libssh.org/files/${pkgver%.*}/libssh-$pkgver.tar.xz" # secfixes: # 0.9.6-r0: # - CVE-2021-3634 # 0.9.5-r0: # - CVE-2020-16135 # 0.9.4-r0: # - CVE-2020-1730 # 0.9.3-r0: # - CVE-2019-14889 # 0.7.6-r0: # - CVE-2018-10933 build() { CFLAGS="$CFLAGS -flto=auto" \ cmake -B build -G Ninja \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DWITH_GSSAPI=OFF \ -DUNIT_TESTING=OFF cmake --build build } check() { case "$CARCH" in s390x) _disabled_tests="-E torture_threads_buffer" esac cd build CTEST_OUTPUT_ON_FAILURE=TRUE ctest $_disabled_tests } package() { DESTDIR="$pkgdir" cmake --install build } sha512sums=" 2b758f9df2b5937865d4aee775ffeafafe3ae6739a89dfc470e38c7394e3c3cb5fcf8f842fdae04929890ee7e47bf8f50e3a38e82dfd26a009f3aae009d589e0 libssh-0.10.5.tar.xz "