diff options
Diffstat (limited to 'recipes-extended/nagios/nagios-nsca_2.9.1.bb')
-rw-r--r-- | recipes-extended/nagios/nagios-nsca_2.9.1.bb | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/recipes-extended/nagios/nagios-nsca_2.9.1.bb b/recipes-extended/nagios/nagios-nsca_2.9.1.bb new file mode 100644 index 00000000..f53a47a0 --- /dev/null +++ b/recipes-extended/nagios/nagios-nsca_2.9.1.bb | |||
@@ -0,0 +1,85 @@ | |||
1 | require nagios-common.inc | ||
2 | |||
3 | DESCRIPTION = "Nagios Service Check Acceptor" | ||
4 | HOMEPAGE = "http://exchange.nagios.org" | ||
5 | SECTION = "console/network" | ||
6 | PRIORITY = "optional" | ||
7 | LICENSE = "GPLv2" | ||
8 | |||
9 | LIC_FILES_CHKSUM = "file://src/nsca.c;beginline=1;endline=16;md5=c1bd17485c5c1dd42f664fe8b3528674" | ||
10 | |||
11 | SRCNAME = "nsca" | ||
12 | |||
13 | SRC_URI = "http://prdownloads.sourceforge.net/sourceforge/nagios/${SRCNAME}-${PV}.tar.gz \ | ||
14 | file://init-script.in \ | ||
15 | file://nagios-nsca.service \ | ||
16 | file://0001-Fix-missing-argument-in-open-calls.patch \ | ||
17 | " | ||
18 | |||
19 | SRC_URI[md5sum] = "3fe2576a8cc5b252110a93f4c8d978c6" | ||
20 | SRC_URI[sha256sum] = "fb12349e50838c37954fe896ba6a026c09eaeff2f9408508ad7ede53e9ea9580" | ||
21 | |||
22 | S = "${WORKDIR}/${SRCNAME}-${PV}" | ||
23 | |||
24 | inherit update-rc.d autotools-brokensep systemd dos2unix | ||
25 | |||
26 | DEPENDS = "libmcrypt" | ||
27 | |||
28 | EXTRA_OECONF += "--with-nsca-user=${NAGIOS_USER} \ | ||
29 | --with-nsca-group=${NAGIOS_GROUP} \ | ||
30 | --with-libmcrypt-prefix=${STAGING_DIR_HOST} \ | ||
31 | ac_cv_path_LIBMCRYPT_CONFIG=${STAGING_BINDIR_CROSS}/libmcrypt-config \ | ||
32 | ac_cv_lib_wrap_main=no \ | ||
33 | ac_cv_path_PERL=${bindir}/perl \ | ||
34 | " | ||
35 | |||
36 | do_configure() { | ||
37 | cp ${WORKDIR}/init-script.in ${S}/init-script.in | ||
38 | oe_runconf || die "make failed" | ||
39 | } | ||
40 | |||
41 | do_install() { | ||
42 | CONF_DIR=${D}${NAGIOS_CONF_DIR} | ||
43 | |||
44 | install -d ${CONF_DIR} | ||
45 | install -d ${D}${sysconfdir}/init.d | ||
46 | install -d ${D}${bindir} | ||
47 | |||
48 | install -m 755 ${S}/sample-config/nsca.cfg ${CONF_DIR} | ||
49 | install -m 755 ${S}/sample-config/send_nsca.cfg ${CONF_DIR} | ||
50 | install -m 755 ${S}/init-script ${D}${sysconfdir}/init.d/nsca | ||
51 | |||
52 | install -m 755 ${S}/src/nsca ${D}${bindir} | ||
53 | install -m 755 ${S}/src/send_nsca ${D}${bindir} | ||
54 | |||
55 | if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then | ||
56 | install -d ${D}${systemd_unitdir}/system | ||
57 | install -m 644 ${WORKDIR}/nagios-nsca.service ${D}${systemd_unitdir}/system/ | ||
58 | fi | ||
59 | } | ||
60 | |||
61 | PACKAGES = "${PN}-dbg ${PN}-daemon ${PN}-client" | ||
62 | |||
63 | FILES_${PN}-daemon = "${sysconfdir}/init.d \ | ||
64 | ${NAGIOS_CONF_DIR}/nsca.cfg \ | ||
65 | ${bindir}/nsca \ | ||
66 | " | ||
67 | |||
68 | FILES_${PN}-client = "${NAGIOS_CONF_DIR}/send_nsca.cfg \ | ||
69 | ${bindir}/send_nsca \ | ||
70 | " | ||
71 | |||
72 | RDEPENDS_${PN}-daemon += "libmcrypt \ | ||
73 | nagios-base \ | ||
74 | " | ||
75 | RDEPENDS_${PN}-client += "libmcrypt \ | ||
76 | nagios-base \ | ||
77 | " | ||
78 | |||
79 | SYSTEMD_PACKAGES = "${PN}-daemon" | ||
80 | SYSTEMD_SERVICE_${PN}-daemon = "nagios-nsca.service" | ||
81 | SYSTEMD_AUTO_ENABLE_${PN}-daemon = "enable" | ||
82 | |||
83 | INITSCRIPT_PACKAGES = "${PN}-daemon" | ||
84 | INITSCRIPT_NAME_${PN}-daemon = "nsca" | ||
85 | INITSCRIPT_PARAMS_${PN}-daemon = "defaults" | ||