blob: 38f16269359edb0188dbcc0632fe8aa10cbee72e [file] [log] [blame]
Brad Bishop2f973922019-11-11 07:58:48 -05001SUMMARY = "A client-side C library implementing the SSH2 protocol"
2HOMEPAGE = "http://www.libssh2.org/"
3SECTION = "libs"
4
5DEPENDS = "zlib"
6
7LICENSE = "BSD-3-Clause"
8LIC_FILES_CHKSUM = "file://COPYING;md5=c5cf34fc0acb44b082ef50ef5e4354ca"
9
Brad Bishop996bc452019-12-02 13:05:15 -050010SRC_URI = "http://www.libssh2.org/download/${BP}.tar.gz \
11 file://CVE-2019-17498.patch \
Andrew Geisslera2681d92020-10-16 10:17:07 -050012 file://run-ptest \
Brad Bishop996bc452019-12-02 13:05:15 -050013"
Brad Bishop2f973922019-11-11 07:58:48 -050014SRC_URI[md5sum] = "1beefafe8963982adc84b408b2959927"
15SRC_URI[sha256sum] = "d5fb8bd563305fd1074dda90bd053fb2d29fc4bce048d182f96eaa466dfadafd"
16
Andrew Geisslera2681d92020-10-16 10:17:07 -050017inherit autotools pkgconfig ptest
Brad Bishop2f973922019-11-11 07:58:48 -050018
19EXTRA_OECONF += "\
20 --with-libz \
21 --with-libz-prefix=${STAGING_LIBDIR} \
22 "
23
24# only one of openssl and gcrypt could be set
25PACKAGECONFIG ??= "openssl"
26PACKAGECONFIG[openssl] = "--with-crypto=openssl --with-libssl-prefix=${STAGING_LIBDIR}, , openssl"
27PACKAGECONFIG[gcrypt] = "--with-crypto=libgcrypt --with-libgcrypt-prefix=${STAGING_EXECPREFIXDIR}, , libgcrypt"
28
Brad Bishope42b3e32020-01-15 22:08:42 -050029BBCLASSEXTEND = "native nativesdk"
Andrew Geisslera2681d92020-10-16 10:17:07 -050030
Andrew Geissler4b7c1152020-11-30 19:55:29 -060031# required for ptest on documentation
32RDEPENDS_${PN}-ptest = "man-db"
33RDEPENDS_${PN}-ptest_append_libc-glibc = " locale-base-en-us"
Andrew Geisslera2681d92020-10-16 10:17:07 -050034
35do_compile_ptest() {
36 sed -i "/\$(MAKE) \$(AM_MAKEFLAGS) check-TESTS/d" tests/Makefile
37 oe_runmake check
38}
39
40do_install_ptest() {
41 install -d ${D}${PTEST_PATH}/tests
42 install -m 0755 ${B}/tests/.libs/simple ${D}${PTEST_PATH}/tests/
43 install -m 0755 ${S}/tests/mansyntax.sh ${D}${PTEST_PATH}/tests/
44 install -m 0755 ${S}/test-driver ${D}${PTEST_PATH}/
Andrew Geissler4b7c1152020-11-30 19:55:29 -060045 mkdir -p ${D}${PTEST_PATH}/docs
46 cp -r ${S}/docs/* ${D}${PTEST_PATH}/docs/
Andrew Geisslera2681d92020-10-16 10:17:07 -050047}