blob: 072d6819c0cee2547de74f4427acc81571e7a53b [file] [log] [blame]
Andrew Geisslereff27472021-10-29 15:35:00 -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=3e089ad0cf27edf1e7f261dfcd06acc7"
9
10SRC_URI = "http://www.libssh2.org/download/${BP}.tar.gz \
11 file://run-ptest \
12 "
13
14SRC_URI:append:ptest = " file://0001-Don-t-let-host-enviroment-to-decide-if-a-test-is-bui.patch"
15
16SRC_URI[sha256sum] = "2d64e90f3ded394b91d3a2e774ca203a4179f69aebee03003e5a6fa621e41d51"
17
18inherit autotools pkgconfig ptest
19
20EXTRA_OECONF += "\
21 --with-libz \
22 --with-libz-prefix=${STAGING_LIBDIR} \
23 "
24
25# only one of openssl and gcrypt could be set
26PACKAGECONFIG ??= "openssl"
27PACKAGECONFIG[openssl] = "--with-crypto=openssl --with-libssl-prefix=${STAGING_LIBDIR}, , openssl"
28PACKAGECONFIG[gcrypt] = "--with-crypto=libgcrypt --with-libgcrypt-prefix=${STAGING_EXECPREFIXDIR}, , libgcrypt"
29
30BBCLASSEXTEND = "native nativesdk"
31
32# required for ptest on documentation
33RDEPENDS:${PN}-ptest = "man-db openssh util-linux-col"
34RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-en-us"
35
36do_compile_ptest() {
37 sed -i "/\$(MAKE) \$(AM_MAKEFLAGS) check-TESTS/d" tests/Makefile
38 oe_runmake check
39}
40
41do_install_ptest() {
42 install -d ${D}${PTEST_PATH}/tests
43 install -m 0755 ${S}/test-driver ${D}${PTEST_PATH}/
44 cp -rf ${B}/tests/.libs/* ${D}${PTEST_PATH}/tests/
45 cp -rf ${S}/tests/mansyntax.sh ${D}${PTEST_PATH}/tests/
46 cp -rf ${S}/tests/ssh2.sh ${D}${PTEST_PATH}/tests/
47 cp -rf ${S}/tests/etc ${D}${PTEST_PATH}/tests/
48 mkdir -p ${D}${PTEST_PATH}/docs
49 cp -r ${S}/docs/* ${D}${PTEST_PATH}/docs/
50}