Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 1 | SUMMARY = "A client-side C library implementing the SSH2 protocol" |
| 2 | HOMEPAGE = "http://www.libssh2.org/" |
| 3 | SECTION = "libs" |
| 4 | |
| 5 | DEPENDS = "zlib" |
| 6 | |
| 7 | LICENSE = "BSD-3-Clause" |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=24a33237426720395ebb1dd1349ca225" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 9 | |
| 10 | SRC_URI = "http://www.libssh2.org/download/${BP}.tar.gz \ |
| 11 | file://run-ptest \ |
| 12 | " |
| 13 | |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 14 | SRC_URI[sha256sum] = "3736161e41e2693324deb38c26cfdc3efe6209d634ba4258db1cecff6a5ad461" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 15 | |
| 16 | inherit autotools pkgconfig ptest |
| 17 | |
| 18 | EXTRA_OECONF += "\ |
| 19 | --with-libz \ |
| 20 | --with-libz-prefix=${STAGING_LIBDIR} \ |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 21 | --disable-rpath \ |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 22 | " |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 23 | DISABLE_STATIC = "" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 24 | |
| 25 | # only one of openssl and gcrypt could be set |
| 26 | PACKAGECONFIG ??= "openssl" |
| 27 | PACKAGECONFIG[openssl] = "--with-crypto=openssl --with-libssl-prefix=${STAGING_LIBDIR}, , openssl" |
| 28 | PACKAGECONFIG[gcrypt] = "--with-crypto=libgcrypt --with-libgcrypt-prefix=${STAGING_EXECPREFIXDIR}, , libgcrypt" |
| 29 | |
| 30 | BBCLASSEXTEND = "native nativesdk" |
| 31 | |
| 32 | # required for ptest on documentation |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 33 | RDEPENDS:${PN}-ptest = "bash man-db openssh util-linux-col" |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 34 | RDEPENDS:${PN}-ptest:append:libc-glibc = " locale-base-en-us" |
| 35 | |
| 36 | do_compile_ptest() { |
| 37 | sed -i "/\$(MAKE) \$(AM_MAKEFLAGS) check-TESTS/d" tests/Makefile |
| 38 | oe_runmake check |
| 39 | } |
| 40 | |
| 41 | do_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 Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 45 | cp -rf ${B}/tests/test_simple ${D}${PTEST_PATH}/tests/ |
Andrew Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 46 | cp -rf ${S}/tests/mansyntax.sh ${D}${PTEST_PATH}/tests/ |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 47 | 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 Geissler | eff2747 | 2021-10-29 15:35:00 -0500 | [diff] [blame] | 50 | mkdir -p ${D}${PTEST_PATH}/docs |
| 51 | cp -r ${S}/docs/* ${D}${PTEST_PATH}/docs/ |
| 52 | } |