Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 1 | # Copyright (C) 2017 Armin Kuster <akuster808@gmail.com> |
| 2 | # Released under the MIT license (see COPYING.MIT for the terms) |
| 3 | |
| 4 | SUMARRY = "NIST Certified SCAP 1.2 toolkit" |
| 5 | HOME_URL = "https://www.open-scap.org/tools/openscap-base/" |
| 6 | LIC_FILES_CHKSUM = "file://COPYING;md5=fbc093901857fcd118f065f900982c24" |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 7 | LICENSE = "LGPL-2.1-only" |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 8 | |
Andrew Geissler | ea144b0 | 2023-01-27 16:03:57 -0600 | [diff] [blame] | 9 | DEPENDS = "dbus acl bzip2 pkgconfig gconf procps curl libxml2 libxslt libcap swig libpcre" |
| 10 | DEPENDS:class-native = "pkgconfig-native swig-native curl-native libxml2-native libxslt-native libcap-native libpcre-native" |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 11 | |
| 12 | S = "${WORKDIR}/git" |
| 13 | |
Andrew Geissler | 8b13928 | 2021-03-05 15:22:30 -0600 | [diff] [blame] | 14 | inherit cmake pkgconfig python3native python3targetconfig perlnative |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 15 | |
| 16 | PACKAGECONFIG ?= "python3 rpm perl gcrypt ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}" |
| 17 | PACKAGECONFIG[python3] = "-DENABLE_PYTHON3=ON, ,python3, python3" |
| 18 | PACKAGECONFIG[perl] = "-DENABLE_PERL=ON, ,perl, perl" |
| 19 | PACKAGECONFIG[rpm] = "-DENABLE_OSCAP_UTIL_AS_RPM=ON, ,rpm, rpm" |
| 20 | PACKAGECONFIG[gcrypt] = "-DWITH_CRYPTO=gcrypt, ,libgcrypt" |
| 21 | PACKAGECONFIG[nss3] = "-DWITH_CRYPTO=nss3, ,nss" |
| 22 | PACKAGECONFIG[selinux] = ", ,libselinux" |
| 23 | |
| 24 | EXTRA_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 Thomaiyar | 14fddef | 2018-07-13 23:55:56 +0530 | [diff] [blame] | 34 | STAGING_OSCAP_DIR = "${TMPDIR}/work-shared/${MACHINE}/oscap-source" |
| 35 | STAGING_OSCAP_BUILDDIR = "${TMPDIR}/work-shared/openscap/oscap-build-artifacts" |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 36 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 37 | do_configure:append:class-native () { |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 38 | 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 Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 43 | do_install:class-native[cleandirs] += " ${STAGING_OSCAP_BUILDDIR}" |
| 44 | do_install:append:class-native () { |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 45 | oscapdir=${STAGING_OSCAP_BUILDDIR}/${datadir_native} |
| 46 | install -d $oscapdir |
| 47 | cp -a ${D}/${STAGING_DATADIR_NATIVE}/openscap $oscapdir |
| 48 | } |
| 49 | |
Brad Bishop | 1fdf4aa | 2019-09-09 14:56:41 -0400 | [diff] [blame] | 50 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 51 | FILES:${PN} += "${PYTHON_SITEPACKAGES_DIR}" |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 52 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 53 | RDEPENDS:${PN} += "libxml2 python3-core libgcc bash" |
Brad Bishop | 26bdd44 | 2019-08-16 17:08:17 -0400 | [diff] [blame] | 54 | |
| 55 | BBCLASSEXTEND = "native" |