blob: edc25db1b16647317a936dbe79b4f6b398e63b16 [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"
Andrew Geissler8f840682023-07-21 09:09:43 -05008LIC_FILES_CHKSUM = "file://COPYING;md5=24a33237426720395ebb1dd1349ca225"
Andrew Geisslereff27472021-10-29 15:35:00 -05009
10SRC_URI = "http://www.libssh2.org/download/${BP}.tar.gz \
11 file://run-ptest \
12 "
13
Andrew Geissler8f840682023-07-21 09:09:43 -050014SRC_URI[sha256sum] = "3736161e41e2693324deb38c26cfdc3efe6209d634ba4258db1cecff6a5ad461"
Andrew Geisslereff27472021-10-29 15:35:00 -050015
16inherit autotools pkgconfig ptest
17
18EXTRA_OECONF += "\
19 --with-libz \
20 --with-libz-prefix=${STAGING_LIBDIR} \
Andrew Geissler8f840682023-07-21 09:09:43 -050021 --disable-rpath \
Andrew Geisslereff27472021-10-29 15:35:00 -050022 "
Andrew Geissler8f840682023-07-21 09:09:43 -050023DISABLE_STATIC = ""
Andrew Geisslereff27472021-10-29 15:35:00 -050024
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
Andrew Geissler8f840682023-07-21 09:09:43 -050033RDEPENDS:${PN}-ptest = "bash man-db openssh util-linux-col"
Andrew Geisslereff27472021-10-29 15:35:00 -050034RDEPENDS:${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/
Andrew Geissler8f840682023-07-21 09:09:43 -050045 cp -rf ${B}/tests/test_simple ${D}${PTEST_PATH}/tests/
Andrew Geisslereff27472021-10-29 15:35:00 -050046 cp -rf ${S}/tests/mansyntax.sh ${D}${PTEST_PATH}/tests/
Andrew Geissler8f840682023-07-21 09:09:43 -050047 cp -rf ${S}/tests/key* ${D}${PTEST_PATH}/tests/
48 cp -rf ${S}/tests/openssh_server/ ${D}${PTEST_PATH}/tests/
49 cp -rf ${S}/tests/*.test ${D}${PTEST_PATH}/tests/
Andrew Geisslereff27472021-10-29 15:35:00 -050050 mkdir -p ${D}${PTEST_PATH}/docs
51 cp -r ${S}/docs/* ${D}${PTEST_PATH}/docs/
52}