samhain: recipe cleanup

add a few distro feature checks.

Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
Armin Kuster
2016-10-16 12:08:53 -07:00
parent 75bc31d94f
commit 0a795d49ac
3 changed files with 38 additions and 37 deletions

View File

@@ -12,11 +12,4 @@ EXTRA_OECONF += " \
--with-pid-file=/var/samhain/samhain.pid \
"
INSANE_SKIP_${PN} = "already-stripped"
FILES_${PN} += "\
/run \
"
RDEPENDS_${PN} = "acl zlib attr bash"

View File

@@ -3,13 +3,17 @@ INITSCRIPT_PARAMS = "defaults 14 86"
require samhain.inc
DEPENDS = "gmp"
DEPENDS = "gmp samhain-server-native"
EXTRA_OECONF += "--enable-network=${SAMHAIN_MODE} "
# supports mysql|postgresql|oracle|odbc but postgresql is the only one available
PACKAGECONFG ??= "postgresql"
PACKAGECONFIG ??= "postgresql"
PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)}"
PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux', '', d)}"
PACKAGECONFIG += "${@bb.utils.contains('DISTRO_FEATURES', 'acl', 'acl', '', d)}"
PACKAGECONFIG[postgres] = "--with-database=postgresql --enable-xml-log, "", postgresql"
PACKAGECONFIG[suidcheck] = "--enable-suidcheck","" , "
PACKAGECONFIG[logwatch] = "--enable-login-watch,"" , "
@@ -38,17 +42,13 @@ do_install_append() {
init/samhain.startLSB ${D}/var/lib/samhain
}
INSANE_SKIP_${PN} = "already-stripped"
PACKAGES = "${PN} ${PN}-doc ${PN}-dbg"
FILES_${PN} += " \
${sbindir}/* \
/run \
"
FILES_${PN} += "${sbindir}/*"
FILES_${PN}-dbg += " \
${sbindir}/.debug/* \
"
RDEPENDS_${PN} += "gmp bash perl"
BBCLASSEXTEND = "native"

View File

@@ -46,37 +46,39 @@ do_configure_prepend_aarch64() {
# use the prefix --oldincludedir=/usr/include which is not
# recognized by Samhain's configure script and would invariably
# throw back the error "unrecognized option: --oldincludedir=/usr/include"
do_configure () {
cat << EOF > ./config-site.${BP}
do_configure_prepend () {
cat << EOF > ${S}/config-site.${BP}
ssp_cv_lib=no
sh_cv_va_copy=yes
EOF
export CONFIG_SITE=${S}/config-site.${BP}
}
export CONFIG_SITE=./config-site.${BP}
do_configure () {
./configure \
--build=${BUILD_SYS} \
--host=${HOST_SYS} \
--target=${TARGET_SYS} \
--prefix=${prefix} \
--exec_prefix=${exec_prefix} \
--bindir=${bindir} \
--sbindir=${sbindir} \
--libexecdir=${libexecdir} \
--datadir=${datadir} \
--sysconfdir=${sysconfdir} \
--sharedstatedir=${sharedstatedir} \
--localstatedir=${localstatedir} \
--libdir=${libdir} \
--includedir=${includedir} \
--infodir=${infodir} \
--mandir=${mandir} \
${EXTRA_OECONF}
--build=${BUILD_SYS} \
--host=${HOST_SYS} \
--target=${TARGET_SYS} \
--prefix=${prefix} \
--exec_prefix=${exec_prefix} \
--bindir=${bindir} \
--sbindir=${sbindir} \
--libexecdir=${libexecdir} \
--datadir=${datadir} \
--sysconfdir=${sysconfdir} \
--sharedstatedir=${sharedstatedir} \
--localstatedir=${localstatedir} \
--libdir=${libdir} \
--includedir=${includedir} \
--infodir=${infodir} \
--mandir=${mandir} \
${EXTRA_OECONF}
}
# Install the init script, it's default file, and the extraneous
# documentation.
do_install_append () {
cd ${S}
cd ${S}
oe_runmake install DESTDIR='${D}' INSTALL=install-boot
install -d ${D}${sysconfdir}/init.d
install -m 755 ${WORKDIR}/${INITSCRIPT_NAME}.init \
@@ -89,5 +91,11 @@ do_install_append () {
install -d ${D}${docdir}/${PN}
cp -r docs/* ${D}${docdir}/${PN}
cp -r scripts ${D}${docdir}/${PN}
install -d -m 755 ${D}/var/samhain
install -d -m 755 ${D}/var/samhain
}
FILES_${PN} += "\
/run \
"
INSANE_SKIP_${PN} = "already-stripped"