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" |
| 8 | LIC_FILES_CHKSUM = "file://COPYING;md5=3e089ad0cf27edf1e7f261dfcd06acc7" |
| 9 | |
| 10 | SRC_URI = "http://www.libssh2.org/download/${BP}.tar.gz \ |
| 11 | file://run-ptest \ |
| 12 | " |
| 13 | |
| 14 | SRC_URI:append:ptest = " file://0001-Don-t-let-host-enviroment-to-decide-if-a-test-is-bui.patch" |
| 15 | |
| 16 | SRC_URI[sha256sum] = "2d64e90f3ded394b91d3a2e774ca203a4179f69aebee03003e5a6fa621e41d51" |
| 17 | |
| 18 | inherit autotools pkgconfig ptest |
| 19 | |
| 20 | EXTRA_OECONF += "\ |
| 21 | --with-libz \ |
| 22 | --with-libz-prefix=${STAGING_LIBDIR} \ |
| 23 | " |
| 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 |
| 33 | RDEPENDS:${PN}-ptest = "man-db openssh util-linux-col" |
| 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/ |
| 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 | } |