summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2019-07-25 16:34:19 +0800
committerArmin Kuster <akuster808@gmail.com>2019-08-04 12:17:25 -0700
commit0a73a14fbb0418b4b563ab987aea424dd1eff815 (patch)
tree7c139380529cc3768c985ecb919dbdfdbff9093d
parentb9b575823d95ce22833f389e7ff5b37d68f003a1 (diff)
downloadmeta-security-0a73a14fbb0418b4b563ab987aea424dd1eff815.tar.gz
scap-security-guide: update recipe
* Set B="${S}/build" to fix the build failure for out of source directory * Remove do_complile and do_install. Use the default functions from cmake.bbclass. * Install the artifacts to /usr/share rather than /usr/local/share Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta-security-compliance/recipes-openscap/scap-security-guide/scap-security-guide.inc28
-rw-r--r--meta-security-compliance/recipes-openscap/scap-security-guide/scap-security-guide_git.bb6
2 files changed, 7 insertions, 27 deletions
diff --git a/meta-security-compliance/recipes-openscap/scap-security-guide/scap-security-guide.inc b/meta-security-compliance/recipes-openscap/scap-security-guide/scap-security-guide.inc
index ed70c18..d123561 100644
--- a/meta-security-compliance/recipes-openscap/scap-security-guide/scap-security-guide.inc
+++ b/meta-security-compliance/recipes-openscap/scap-security-guide/scap-security-guide.inc
@@ -7,6 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=97662e4486d9a1d09f358851d9f41a1a"
7LICENSE = "LGPL-2.1" 7LICENSE = "LGPL-2.1"
8 8
9DEPENDS = "openscap-native python3 python3-pyyaml-native python3-jinja2-native libxml2-native" 9DEPENDS = "openscap-native python3 python3-pyyaml-native python3-jinja2-native libxml2-native"
10RDEPNEDS_${PN} = "openscap"
10 11
11S = "${WORKDIR}/git" 12S = "${WORKDIR}/git"
12 13
@@ -20,28 +21,11 @@ OECMAKE_GENERATOR = "Unix Makefiles"
20 21
21EXTRA_OECMAKE += "-DENABLE_PYTHON_COVERAGE=OFF" 22EXTRA_OECMAKE += "-DENABLE_PYTHON_COVERAGE=OFF"
22 23
23do_configure_prepend () { 24B = "${S}/build"
24 sed -i -e 's:NAMES\ sed:NAMES\ ${HOSTTOOLS_DIR}/sed:g' ${S}/CMakeLists.txt
25 sed -i 's:/usr/share/openscap/:${STAGING_OSCAP_BUILDDIR}${datadir_native}/openscap/:g' ${S}/cmake/SSGCommon.cmake
26}
27
28do_compile () {
29 cd ${S}/build
30 cmake ../
31 # oddly rhel7 needs to build first
32 make rhel7
33}
34 25
35do_install () { 26do_configure_prepend () {
36 cd ${S}/build 27 sed -i -e 's:NAMES\ sed:NAMES\ ${HOSTTOOLS_DIR}/sed:g' ${S}/CMakeLists.txt
37 make DESTDIR=${D} install 28 sed -i -e 's:NAMES\ grep:NAMES\ ${HOSTTOOLS_DIR}/grep:g' ${S}/CMakeLists.txt
38} 29}
39 30
40localdatadir = "${prefix}/local/share" 31FILES_${PN} += "${datadir}/xml"
41localmandir = "${localdatadir}/man"
42localdocdir = "${localdatadir}/doc"
43localxmldir = "${localdatadir}/xml"
44
45FILES_${PN} += "${localdatadir} ${localxmldir}"
46FILES_${PN}-doc += "${localmandir} ${localdocdir}"
47RDEPNEDS_${PN} = "openscap"
diff --git a/meta-security-compliance/recipes-openscap/scap-security-guide/scap-security-guide_git.bb b/meta-security-compliance/recipes-openscap/scap-security-guide/scap-security-guide_git.bb
index cb21fed..d9238c0 100644
--- a/meta-security-compliance/recipes-openscap/scap-security-guide/scap-security-guide_git.bb
+++ b/meta-security-compliance/recipes-openscap/scap-security-guide/scap-security-guide_git.bb
@@ -2,12 +2,8 @@ SUMARRY = "SCAP content for various platforms, OE changes"
2 2
3SRCREV = "5fdfdcb2e95afbd86ace555beca5d20cbf1043ed" 3SRCREV = "5fdfdcb2e95afbd86ace555beca5d20cbf1043ed"
4SRC_URI = "git://github.com/akuster/scap-security-guide.git;branch=oe-0.1.44;" 4SRC_URI = "git://github.com/akuster/scap-security-guide.git;branch=oe-0.1.44;"
5PV = "v0.1.44+git${SRCPV}" 5PV = "0.1.44+git${SRCPV}"
6 6
7require scap-security-guide.inc 7require scap-security-guide.inc
8 8
9do_compile_append () {
10 make openembedded
11}
12
13EXTRA_OECMAKE += "-DSSG_PRODUCT_OPENEMBEDDED=ON" 9EXTRA_OECMAKE += "-DSSG_PRODUCT_OPENEMBEDDED=ON"