aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-ids/tripwire/tripwire_2.4.3.7.bb
blob: 4f50bff7370635165a8e994d0f2c5e3c56b02f56 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
SUMMARY = "Tripwire: A system integrity assessment tool (IDS)"
DESCRIPTION = "Open Source Tripwire® software is a security and data \
integrity tool useful for monitoring and alerting on specific file change(s) on a range of systems"
HOMEPAGE="http://sourceforge.net/projects/tripwire"
SECTION = "security Monitor/Admin"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=1c069be8dbbe48e89b580ab4ed86c127"

SRCREV = "6e64a9e5b70a909ec439bc5a099e3fcf38c614b0"

SRC_URI = "\
	git://github.com/Tripwire/tripwire-open-source.git \
	file://tripwire.cron \
	file://tripwire.sh \
	file://tripwire.txt \
	file://twcfg.txt \
	file://twinstall.sh \
	file://twpol-yocto.txt \
	file://run-ptest \
       "

S = "${WORKDIR}/git"

inherit autotools-brokensep update-rc.d ptest

INITSCRIPT_NAME = "tripwire"
INITSCRIPT_PARAMS = "start 40 S ."
TRIPWIRE_HOST = "${HOST_SYS}"
TRIPWIRE_TARGET = "${TARGET_SYS}"

CXXFLAGS += "-fno-strict-aliasing"
EXTRA_OECONF = "--disable-openssl  --enable-static --sysconfdir=/etc/tripwire"

do_install () {
    install -d ${D}${libdir} ${D}${datadir} ${D}${base_libdir}
    install -d ${D}${sysconfdir} ${D}${mandir} ${D}${sbindir}
    install -d ${D}${sysconfdir}/${PN}
    install -d ${D}${localstatedir}/lib/${PN} ${D}${localstatedir}/lib/${BPN}/report
    install -d ${D}${mandir}/man4 ${D}${mandir}/man5 ${D}${mandir}/man8
    install -d ${D}${docdir}/${BPN} ${D}${docdir}/${BPN}/templates
    install -d ${D}${sysconfdir}/init.d

    install -m 0755 ${S}/bin/* ${D}${sbindir}
    install -m 0644 ${S}/lib/* ${D}${base_libdir}
    install -m 0644 ${S}/lib/* ${D}${localstatedir}/lib/${PN}
    install -m 0755 ${WORKDIR}/tripwire.cron ${D}${sysconfdir}
    install -m 0755 ${WORKDIR}/tripwire.sh ${D}${sysconfdir}/init.d/tripwire
    install -m 0755 ${WORKDIR}/twinstall.sh ${D}${sysconfdir}/${PN}
    install -m 0644 ${WORKDIR}/twpol-yocto.txt ${D}${sysconfdir}/${PN}/twpol.txt
    install -m 0644 ${WORKDIR}/twcfg.txt ${D}${sysconfdir}/${PN}

    install -m 0644 ${S}/man/man4/* ${D}${mandir}/man4
    install -m 0644 ${S}/man/man5/* ${D}${mandir}/man5
    install -m 0644 ${S}/man/man8/* ${D}${mandir}/man8
    rm ${D}${mandir}/man*/Makefile*
    install -m 0644 ${S}/policy/templates/* ${D}${docdir}/${BPN}/templates
    install -m 0644 ${S}/policy/*txt ${D}${docdir}/${BPN}
    install -m 0644 ${S}/COPYING ${D}${docdir}/${BPN}
    install -m 0644 ${S}/TRADEMARK ${D}${docdir}/${BPN}
    install -m 0644 ${WORKDIR}/tripwire.txt ${D}${docdir}/${BPN}
}

do_install_ptest_append () {
	install -d ${D}${PTEST_PATH}/tests
	cp -a ${S}/src/test-harness/* ${D}${PTEST_PATH}
	sed -i -e 's@../../../../bin@${sbindir}@'  ${D}${PTEST_PATH}/twtools.pm
}

FILES_${PN} += "${libdir} ${docdir}/${PN}/*"
FILES_${PN}-dbg += "${sysconfdir}/${PN}/.debug"
FILES_${PN}-staticdev += "${localstatedir}/lib/${PN}/lib*.a"
FILES_${PN}-ptest += "${PTEST_PATH}/tests "

RDEPENDS_${PN} += " perl nano msmtp cronie"
RDEPENDS_${PN}-ptest = " perl lib-perl perl-modules "