Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -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=c5cf34fc0acb44b082ef50ef5e4354ca" |
| 9 | |
Brad Bishop | 996bc45 | 2019-12-02 13:05:15 -0500 | [diff] [blame] | 10 | SRC_URI = "http://www.libssh2.org/download/${BP}.tar.gz \ |
| 11 | file://CVE-2019-17498.patch \ |
Andrew Geissler | a2681d9 | 2020-10-16 10:17:07 -0500 | [diff] [blame] | 12 | file://run-ptest \ |
Brad Bishop | 996bc45 | 2019-12-02 13:05:15 -0500 | [diff] [blame] | 13 | " |
Andrew Geissler | 72956ed | 2021-01-08 16:11:14 -0600 | [diff] [blame] | 14 | |
| 15 | SRC_URI_append_ptest = " file://0001-Don-t-let-host-enviroment-to-decide-if-a-test-is-bui.patch" |
| 16 | |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame] | 17 | SRC_URI[md5sum] = "1beefafe8963982adc84b408b2959927" |
| 18 | SRC_URI[sha256sum] = "d5fb8bd563305fd1074dda90bd053fb2d29fc4bce048d182f96eaa466dfadafd" |
| 19 | |
Andrew Geissler | a2681d9 | 2020-10-16 10:17:07 -0500 | [diff] [blame] | 20 | inherit autotools pkgconfig ptest |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame] | 21 | |
| 22 | EXTRA_OECONF += "\ |
| 23 | --with-libz \ |
| 24 | --with-libz-prefix=${STAGING_LIBDIR} \ |
| 25 | " |
| 26 | |
| 27 | # only one of openssl and gcrypt could be set |
| 28 | PACKAGECONFIG ??= "openssl" |
| 29 | PACKAGECONFIG[openssl] = "--with-crypto=openssl --with-libssl-prefix=${STAGING_LIBDIR}, , openssl" |
| 30 | PACKAGECONFIG[gcrypt] = "--with-crypto=libgcrypt --with-libgcrypt-prefix=${STAGING_EXECPREFIXDIR}, , libgcrypt" |
| 31 | |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 32 | BBCLASSEXTEND = "native nativesdk" |
Andrew Geissler | a2681d9 | 2020-10-16 10:17:07 -0500 | [diff] [blame] | 33 | |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 34 | # required for ptest on documentation |
Andrew Geissler | 72956ed | 2021-01-08 16:11:14 -0600 | [diff] [blame] | 35 | RDEPENDS_${PN}-ptest = "man-db openssh" |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 36 | RDEPENDS_${PN}-ptest_append_libc-glibc = " locale-base-en-us" |
Andrew Geissler | a2681d9 | 2020-10-16 10:17:07 -0500 | [diff] [blame] | 37 | |
| 38 | do_compile_ptest() { |
| 39 | sed -i "/\$(MAKE) \$(AM_MAKEFLAGS) check-TESTS/d" tests/Makefile |
| 40 | oe_runmake check |
| 41 | } |
| 42 | |
| 43 | do_install_ptest() { |
| 44 | install -d ${D}${PTEST_PATH}/tests |
Andrew Geissler | a2681d9 | 2020-10-16 10:17:07 -0500 | [diff] [blame] | 45 | install -m 0755 ${S}/test-driver ${D}${PTEST_PATH}/ |
Andrew Geissler | 72956ed | 2021-01-08 16:11:14 -0600 | [diff] [blame] | 46 | cp -rf ${B}/tests/.libs/* ${D}${PTEST_PATH}/tests/ |
| 47 | cp -rf ${S}/tests/mansyntax.sh ${D}${PTEST_PATH}/tests/ |
| 48 | cp -rf ${S}/tests/ssh2.sh ${D}${PTEST_PATH}/tests/ |
| 49 | cp -rf ${S}/tests/etc ${D}${PTEST_PATH}/tests/ |
Andrew Geissler | 4b7c115 | 2020-11-30 19:55:29 -0600 | [diff] [blame] | 50 | mkdir -p ${D}${PTEST_PATH}/docs |
| 51 | cp -r ${S}/docs/* ${D}${PTEST_PATH}/docs/ |
Andrew Geissler | a2681d9 | 2020-10-16 10:17:07 -0500 | [diff] [blame] | 52 | } |