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
@@ -12,11 +12,4 @@ EXTRA_OECONF += " \
--with-pid-file=/var/samhain/samhain.pid \ --with-pid-file=/var/samhain/samhain.pid \
" "
INSANE_SKIP_${PN} = "already-stripped"
FILES_${PN} += "\
/run \
"
RDEPENDS_${PN} = "acl zlib attr bash" RDEPENDS_${PN} = "acl zlib attr bash"
@@ -3,13 +3,17 @@ INITSCRIPT_PARAMS = "defaults 14 86"
require samhain.inc require samhain.inc
DEPENDS = "gmp" DEPENDS = "gmp samhain-server-native"
EXTRA_OECONF += "--enable-network=${SAMHAIN_MODE} " EXTRA_OECONF += "--enable-network=${SAMHAIN_MODE} "
# supports mysql|postgresql|oracle|odbc but postgresql is the only one available # 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[postgres] = "--with-database=postgresql --enable-xml-log, "", postgresql"
PACKAGECONFIG[suidcheck] = "--enable-suidcheck","" , " PACKAGECONFIG[suidcheck] = "--enable-suidcheck","" , "
PACKAGECONFIG[logwatch] = "--enable-login-watch,"" , " PACKAGECONFIG[logwatch] = "--enable-login-watch,"" , "
@@ -38,17 +42,13 @@ do_install_append() {
init/samhain.startLSB ${D}/var/lib/samhain init/samhain.startLSB ${D}/var/lib/samhain
} }
INSANE_SKIP_${PN} = "already-stripped"
PACKAGES = "${PN} ${PN}-doc ${PN}-dbg" PACKAGES = "${PN} ${PN}-doc ${PN}-dbg"
FILES_${PN} += " \ FILES_${PN} += "${sbindir}/*"
${sbindir}/* \
/run \
"
FILES_${PN}-dbg += " \ FILES_${PN}-dbg += " \
${sbindir}/.debug/* \ ${sbindir}/.debug/* \
" "
RDEPENDS_${PN} += "gmp bash perl" RDEPENDS_${PN} += "gmp bash perl"
BBCLASSEXTEND = "native"
+30 -22
View File
@@ -46,37 +46,39 @@ do_configure_prepend_aarch64() {
# use the prefix --oldincludedir=/usr/include which is not # use the prefix --oldincludedir=/usr/include which is not
# recognized by Samhain's configure script and would invariably # recognized by Samhain's configure script and would invariably
# throw back the error "unrecognized option: --oldincludedir=/usr/include" # throw back the error "unrecognized option: --oldincludedir=/usr/include"
do_configure () { do_configure_prepend () {
cat << EOF > ./config-site.${BP} cat << EOF > ${S}/config-site.${BP}
ssp_cv_lib=no ssp_cv_lib=no
sh_cv_va_copy=yes sh_cv_va_copy=yes
EOF EOF
export CONFIG_SITE=${S}/config-site.${BP}
}
export CONFIG_SITE=./config-site.${BP} do_configure () {
./configure \ ./configure \
--build=${BUILD_SYS} \ --build=${BUILD_SYS} \
--host=${HOST_SYS} \ --host=${HOST_SYS} \
--target=${TARGET_SYS} \ --target=${TARGET_SYS} \
--prefix=${prefix} \ --prefix=${prefix} \
--exec_prefix=${exec_prefix} \ --exec_prefix=${exec_prefix} \
--bindir=${bindir} \ --bindir=${bindir} \
--sbindir=${sbindir} \ --sbindir=${sbindir} \
--libexecdir=${libexecdir} \ --libexecdir=${libexecdir} \
--datadir=${datadir} \ --datadir=${datadir} \
--sysconfdir=${sysconfdir} \ --sysconfdir=${sysconfdir} \
--sharedstatedir=${sharedstatedir} \ --sharedstatedir=${sharedstatedir} \
--localstatedir=${localstatedir} \ --localstatedir=${localstatedir} \
--libdir=${libdir} \ --libdir=${libdir} \
--includedir=${includedir} \ --includedir=${includedir} \
--infodir=${infodir} \ --infodir=${infodir} \
--mandir=${mandir} \ --mandir=${mandir} \
${EXTRA_OECONF} ${EXTRA_OECONF}
} }
# Install the init script, it's default file, and the extraneous # Install the init script, it's default file, and the extraneous
# documentation. # documentation.
do_install_append () { do_install_append () {
cd ${S} cd ${S}
oe_runmake install DESTDIR='${D}' INSTALL=install-boot oe_runmake install DESTDIR='${D}' INSTALL=install-boot
install -d ${D}${sysconfdir}/init.d install -d ${D}${sysconfdir}/init.d
install -m 755 ${WORKDIR}/${INITSCRIPT_NAME}.init \ install -m 755 ${WORKDIR}/${INITSCRIPT_NAME}.init \
@@ -89,5 +91,11 @@ do_install_append () {
install -d ${D}${docdir}/${PN} install -d ${D}${docdir}/${PN}
cp -r docs/* ${D}${docdir}/${PN} cp -r docs/* ${D}${docdir}/${PN}
cp -r scripts ${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"