blob: e8752270d3c6b56650d4c046b68a59d5fdb8b5d2 [file] [log] [blame]
Brad Bishop26bdd442019-08-16 17:08:17 -04001# Copyright (C) 2017 Armin Kuster <akuster808@gmail.com>
2# Released under the MIT license (see COPYING.MIT for the terms)
3
4SUMARRY = "NIST Certified SCAP 1.2 toolkit"
5HOME_URL = "https://www.open-scap.org/tools/openscap-base/"
6LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24"
Patrick Williams03907ee2022-05-01 06:28:52 -05007LICENSE = "LGPL-2.1-only"
Brad Bishop26bdd442019-08-16 17:08:17 -04008
Andrew Geisslerea144b02023-01-27 16:03:57 -06009DEPENDS = "dbus acl bzip2 pkgconfig gconf procps curl libxml2 libxslt libcap swig libpcre"
10DEPENDS:class-native = "pkgconfig-native swig-native curl-native libxml2-native libxslt-native libcap-native libpcre-native"
Brad Bishop26bdd442019-08-16 17:08:17 -040011
12S = "${WORKDIR}/git"
13
Andrew Geissler8b139282021-03-05 15:22:30 -060014inherit cmake pkgconfig python3native python3targetconfig perlnative
Brad Bishop26bdd442019-08-16 17:08:17 -040015
16PACKAGECONFIG ?= "python3 rpm perl gcrypt ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
17PACKAGECONFIG[python3] = "-DENABLE_PYTHON3=ON, ,python3, python3"
18PACKAGECONFIG[perl] = "-DENABLE_PERL=ON, ,perl, perl"
19PACKAGECONFIG[rpm] = "-DENABLE_OSCAP_UTIL_AS_RPM=ON, ,rpm, rpm"
20PACKAGECONFIG[gcrypt] = "-DWITH_CRYPTO=gcrypt, ,libgcrypt"
21PACKAGECONFIG[nss3] = "-DWITH_CRYPTO=nss3, ,nss"
22PACKAGECONFIG[selinux] = ", ,libselinux"
23
24EXTRA_OECMAKE += "-DENABLE_PROBES_LINUX=ON -DENABLE_PROBES_UNIX=ON \
25 -DENABLE_PROBES_SOLARIS=OFF -DENABLE_PROBES_INDEPENDENT=ON \
26 -DENABLE_OSCAP_UTIL=ON -DENABLE_OSCAP_UTIL_SSH=ON \
27 -DENABLE_OSCAP_UTIL_DOCKER=OFF -DENABLE_OSCAP_UTIL_CHROOT=OFF \
28 -DENABLE_OSCAP_UTIL_PODMAN=OFF -DENABLE_OSCAP_UTIL_VM=OFF \
29 -DENABLE_PROBES_WINDOWS=OFF -DENABLE_VALGRIND=OFF \
30 -DENABLE_SCE=ON -DENABLE_MITRE=OFF -DENABLE_TESTS=OFF \
31 -DCMAKE_SKIP_INSTALL_RPATH=ON -DCMAKE_SKIP_RPATH=ON \
32 "
33
Richard Marian Thomaiyar14fddef2018-07-13 23:55:56 +053034STAGING_OSCAP_DIR = "${TMPDIR}/work-shared/${MACHINE}/oscap-source"
35STAGING_OSCAP_BUILDDIR = "${TMPDIR}/work-shared/openscap/oscap-build-artifacts"
Brad Bishop26bdd442019-08-16 17:08:17 -040036
Patrick Williams213cb262021-08-07 19:21:33 -050037do_configure:append:class-native () {
Brad Bishop26bdd442019-08-16 17:08:17 -040038 sed -i 's:OSCAP_DEFAULT_CPE_PATH.*$:OSCAP_DEFAULT_CPE_PATH "${STAGING_OSCAP_BUILDDIR}${datadir_native}/openscap/cpe":' ${B}/config.h
39 sed -i 's:OSCAP_DEFAULT_SCHEMA_PATH.*$:OSCAP_DEFAULT_SCHEMA_PATH "${STAGING_OSCAP_BUILDDIR}${datadir_native}/openscap/schemas":' ${B}/config.h
40 sed -i 's:OSCAP_DEFAULT_XSLT_PATH.*$:OSCAP_DEFAULT_XSLT_PATH "${STAGING_OSCAP_BUILDDIR}${datadir_native}/openscap/xsl":' ${B}/config.h
41}
42
Patrick Williams213cb262021-08-07 19:21:33 -050043do_install:class-native[cleandirs] += " ${STAGING_OSCAP_BUILDDIR}"
44do_install:append:class-native () {
Brad Bishop26bdd442019-08-16 17:08:17 -040045 oscapdir=${STAGING_OSCAP_BUILDDIR}/${datadir_native}
46 install -d $oscapdir
47 cp -a ${D}/${STAGING_DATADIR_NATIVE}/openscap $oscapdir
48}
49
Brad Bishop1fdf4aa2019-09-09 14:56:41 -040050
Patrick Williams213cb262021-08-07 19:21:33 -050051FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}"
Brad Bishop26bdd442019-08-16 17:08:17 -040052
Patrick Williams213cb262021-08-07 19:21:33 -050053RDEPENDS:${PN} += "libxml2 python3-core libgcc bash"
Brad Bishop26bdd442019-08-16 17:08:17 -040054
55BBCLASSEXTEND = "native"