Skip to content

Commit 9e915cd

Browse files
committed
Install OpenSSH headers/lib for hiba usage
The installed files will be populated to hiba's sysroot automatically and used for builds.
1 parent 7b8af96 commit 9e915cd

2 files changed

Lines changed: 26 additions & 16 deletions

File tree

meta-oe/recipes-connectivity/hiba/hiba_git.bb

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,22 @@ PV = "1.0+git${SRCPV}"
1717
inherit autotools
1818

1919
DEPENDS = "openssl openssh zlib"
20-
RDEPENDS:${PN} = "bash"
2120

22-
def get_oeconf(d):
23-
import glob
24-
workdir = d.getVar("WORKDIR")
25-
openssh_paths = glob.glob("{}/../../openssh/*/openssh-*".format(workdir))
26-
27-
if len(openssh_paths) != 1:
28-
# Cannot fail here since this will cause failure on other recipes
29-
# if openssh is not installed
30-
return ""
31-
32-
return "--prefix=/usr/ --with-opensshdir={}".format(openssh_paths[0])
33-
34-
EXTRA_OECONF = "${@get_oeconf(d)}"
21+
EXTRA_OECONF = " \
22+
--with-opensshdir=${PKG_CONFIG_SYSROOT_DIR}/usr/include/ssh \
23+
--prefix=/usr/ \
24+
"
3525

3626
# Make sure that MACHINE_FEATURES includes hiba before continuing
3727
do_configure:prepend(){
38-
if ${@bb.utils.contains("MACHINE_FEATURES", "hiba", "false", "true", d)} ; then
39-
echo "MACHINE_FEATURES does not support hiba"
28+
if ${@bb.utils.contains("DISTRO_FEATURES", "hiba", "false", "true", d)} ; then
29+
echo "DISTRO_FEATURES does not support hiba. Skip the configuration"
4030
exit 1
4131
fi
4232
}
33+
34+
PACKAGES =+ "${PN}-tools"
35+
36+
FILES:${PN}-tools = "${sbindir}/hiba-ca.sh ${sbindir}/hiba-grl ${sbindir}/hiba-gen"
37+
38+
RDEPENDS:${PN}-tools = "${PN} bash"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
do_install:append () {
2+
if ${@bb.utils.contains("DISTRO_FEATURES", "hiba", "false", "true", d)} ; then
3+
echo "DISTRO_FEATURES does not support hiba. Skip the installations"
4+
exit 0
5+
fi
6+
7+
install -d ${D}/usr/include/ssh
8+
install -d ${D}/usr/include/ssh/openbsd-compat
9+
install -d ${D}/usr/lib/
10+
install -m0644 ${S}/*.h ${D}/usr/include/ssh
11+
install -m0644 ${S}/libssh* ${D}/usr/lib/
12+
install -m0644 ${S}/openbsd-compat/*.h ${D}/usr/include/ssh/openbsd-compat
13+
install -m0644 ${S}/openbsd-compat/libopenbsd-compat* ${D}/usr/lib/
14+
}

0 commit comments

Comments
 (0)