summaryrefslogtreecommitdiffstats
path: root/meta-security-compliance/recipes-openscap/openscap/openscap_1.2.14.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-security-compliance/recipes-openscap/openscap/openscap_1.2.14.bb')
-rw-r--r--meta-security-compliance/recipes-openscap/openscap/openscap_1.2.14.bb82
1 files changed, 82 insertions, 0 deletions
diff --git a/meta-security-compliance/recipes-openscap/openscap/openscap_1.2.14.bb b/meta-security-compliance/recipes-openscap/openscap/openscap_1.2.14.bb
new file mode 100644
index 0000000..0d26959
--- /dev/null
+++ b/meta-security-compliance/recipes-openscap/openscap/openscap_1.2.14.bb
@@ -0,0 +1,82 @@
1# 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"
7LICENSE = "LGPL-2.1"
8
9DEPENDS = "autoconf-archive pkgconfig gconf procps curl libxml2 rpm \
10 libxslt libcap swig swig-native"
11
12DEPENDS_class-native = "autoconf-archive-native pkgconfig-native swig-native curl-native libxml2-native libxslt-native dpkg-native libgcrypt-native nss-native"
13
14SRCREV = "7a924c0eea10d05f512660192c8c4aef447801a6"
15SRC_URI = "git://github.com/akuster/openscap.git;branch=oe \
16 file://crypto_pkgconfig.patch \
17 file://run-ptest \
18"
19
20inherit autotools-brokensep pkgconfig python3native perlnative ptest
21
22S = "${WORKDIR}/git"
23
24PACKAGECONFIG ?= "nss3 pcre rpm"
25PACKAGECONFIG[pcre] = ",--enable-regex-posix, libpcre"
26PACKAGECONFIG[gcrypt] = "--with-crypto=gcrypt,, libgcrypt "
27PACKAGECONFIG[nss3] = "--with-crypto=nss3,, nss"
28PACKAGECONFIG[python] = "--enable-python, --disable-python, python, python"
29PACKAGECONFIG[python3] = "--enable-python3, --disable-python3, python3, python3"
30PACKAGECONFIG[perl] = "--enable-perl, --disable-perl, perl, perl"
31PACKAGECONFIG[rpm] = " --enable-util-scap-as-rpm, --disable-util-scap-as-rpm, rpm, rpm"
32
33EXTRA_OECONF += "--enable-probes-independent --enable-probes-linux \
34 --enable-probes-solaris --enable-probes-unix --disable-util-oscap-docker\
35 --enable-util-oscap-ssh --enable-util-oscap --enable-ssp --enable-sce \
36"
37
38EXTRA_OECONF_class-native += "--disable-probes-independent --enable-probes-linux \
39 --disable-probes-solaris --disable-probes-unix \
40 --enable-util-oscap \
41"
42
43do_configure_prepend () {
44 sed -i 's:-I/usr/include:-I${STAGING_INCDIR}:' ${S}/swig/perl/Makefile.am
45 sed -i 's:-I/usr/include:-I${STAGING_INCDIR}:' ${S}/swig/python3/Makefile.am
46 sed -i 's:-I/usr/include:-I${STAGING_INCDIR}:' ${S}/swig/python2/Makefile.am
47}
48
49
50include openscap.inc
51
52do_configure_append_class-native () {
53 sed -i 's:OSCAP_DEFAULT_CPE_PATH.*$:OSCAP_DEFAULT_CPE_PATH "${STAGING_OSCAP_BUILDDIR}${datadir_native}/openscap/cpe":' ${S}/config.h
54 sed -i 's:OSCAP_DEFAULT_SCHEMA_PATH.*$:OSCAP_DEFAULT_SCHEMA_PATH "${STAGING_OSCAP_BUILDDIR}${datadir_native}/openscap/schemas":' ${S}/config.h
55 sed -i 's:OSCAP_DEFAULT_XSLT_PATH.*$:OSCAP_DEFAULT_XSLT_PATH "${STAGING_OSCAP_BUILDDIR}${datadir_native}/openscap/xsl":' ${S}/config.h
56}
57
58do_clean[cleandirs] += " ${STAGING_OSCAP_BUILDDIR}"
59
60do_install_append_class-native () {
61 oscapdir=${STAGING_OSCAP_BUILDDIR}/${datadir_native}
62 install -d $oscapdir
63 cp -a ${D}/${STAGING_DATADIR_NATIVE}/openscap $oscapdir
64}
65
66TESTDIR = "tests"
67
68do_compile_ptest() {
69 echo 'buildtest-TESTS: $(check)' >> ${TESTDIR}/Makefile
70 oe_runmake -C ${TESTDIR} buildtest-TESTS
71}
72
73do_install_ptest() {
74 # install the tests
75 cp -rf ${B}/${TESTDIR} ${D}${PTEST_PATH}
76}
77
78FILES_${PN} += "${PYTHON_SITEPACKAGES_DIR}"
79
80RDEPENDS_${PN} += "libxml2 python libgcc"
81
82BBCLASSEXTEND = "native"