aboutsummaryrefslogtreecommitdiffstats
path: root/community/libssh/APKBUILD
blob: 03013f91da64ece428c2e6672a718c5f626489ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Contributor: Carlo Landmeter <clandmeter@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libssh
pkgver=0.9.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 zlib-dev"
makedepends="$depends_dev cmake doxygen"
checkdepends="cmocka-dev"
subpackages="$pkgname-dev"
source="https://www.libssh.org/files/${pkgver%.*}/libssh-$pkgver.tar.xz
	"

# secfixes:
#   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() {
	mkdir build && cd build
	cmake .. \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DWITH_GSSAPI=OFF \
		-DUNIT_TESTING=OFF
	make
}

check() {
	case "$CARCH" in
		s390x) _disabled_tests="-E torture_threads_buffer"
	esac
	cd "$builddir/build"
	ctest --output-on-failure $_disabled_tests
}

package() {
	cd "$builddir/build"
	make DESTDIR="$pkgdir" install
}

sha512sums="64e692a0bfa7f73585ea7b7b8b1d4c9a7f9be59565bfd4de32ca8cd9db121f87e7ad51f5c80269fbd99545af34dcf1894374ed8a6d6c1ac5f8601c026572ac18  libssh-0.9.5.tar.xz"