From a4d6623d1604fc4946ed1366560b20f91ab7e2d0 Mon Sep 17 00:00:00 2001 From: Eric BENARD Date: Fri, 2 Dec 2011 15:09:57 +0000 Subject: add net-snmp-5.7.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the recipe was imported from OE-classic and upgraded to latest stable. Signed-off-by: Eric BĂ©nard Signed-off-by: Koen Kooi --- meta-oe/recipes-extended/net-snmp/net-snmp.inc | 66 ++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 meta-oe/recipes-extended/net-snmp/net-snmp.inc (limited to 'meta-oe/recipes-extended/net-snmp/net-snmp.inc') diff --git a/meta-oe/recipes-extended/net-snmp/net-snmp.inc b/meta-oe/recipes-extended/net-snmp/net-snmp.inc new file mode 100644 index 0000000000..159c374bb2 --- /dev/null +++ b/meta-oe/recipes-extended/net-snmp/net-snmp.inc @@ -0,0 +1,66 @@ +DESCRIPTION = "Various tools relating to the Simple Network Management Protocol" +HOMEPAGE = "http://www.net-snmp.org/" +LICENSE = "BSD" + +DEPENDS = "openssl" +RDEPENDS_${PN}-server += "net-snmp-mibs" +RDEPENDS_${PN}-client += "net-snmp-mibs" +RDEPENDS_${PN}-dev = "net-snmp-client (= ${EXTENDPV}) net-snmp-server (= ${EXTENDPV})" +RRECOMMENDS_${PN}-dbg = "net-snmp-client (= ${EXTENDPV}) net-snmp-server (= ${EXTENDPV})" +INC_PR = "r0" + +inherit autotools update-rc.d siteinfo + +TARGET_CC_ARCH += "${LDFLAGS}" + +EXTRA_OECONF = "--enable-shared --disable-manuals --with-defaults \ +${@base_conditional('SITEINFO_ENDIANNESS', 'le', '--with-endianness=little', '--with-endianness=big', d)}" + +do_install () { + oe_runmake install +} + +do_install_append() { + install -d ${D}${sysconfdir}/snmp + install -d ${D}${sysconfdir}/init.d + install -m 755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/snmpd + install -m 644 ${WORKDIR}/snmpd.conf ${D}${sysconfdir}/snmp/ + install -m 644 ${WORKDIR}/snmptrapd.conf ${D}${sysconfdir}/snmp/ + install -d ${STAGING_BINDIR} + install -m 0755 ${D}${bindir}/net-snmp-config ${STAGING_BINDIR}/ + sed -e "s@-I/usr/include@@g" \ + -e "s@^prefix=.*@prefix=${STAGING_DIR_HOST}@g" \ + -e "s@^exec_prefix=.*@exec_prefix=${STAGING_DIR_HOST}@g" \ + -e "s@^includedir=.*@includedir=${STAGING_INCDIR}@g" \ + -e "s@^libdir=.*@libdir=${STAGING_LIBDIR}@g" \ + -i ${STAGING_BINDIR}/net-snmp-config +} + +PACKAGES = "net-snmp-dbg net-snmp-doc net-snmp-dev net-snmp-static net-snmp-libs \ + net-snmp-mibs net-snmp-server net-snmp-client" + +FILES_${PN}-static = "${libdir}/*.a" +FILES_${PN}-libs = "${libdir}/*" +FILES_${PN}-mibs = "${datadir}/snmp/mibs" +FILES_${PN}-server = "${sbindir}/* ${sysconfdir}" +FILES_${PN}-client = "${bindir}/* ${datadir}/snmp/" +FILES_${PN}-dbg += "${libdir}/.debug/ ${sbindir}/.debug/ ${bindir}/.debug/" +FILES_${PN}-dev += ${bindir}/net-snmp-config ${bindir}/mib2c ${bindir}/mib2c-update" + +CONFFILES_${PN}-server = "${sysconfdir}/snmp/snmpd.conf \ + ${sysconfdir}/snmp/snmptrapd.conf" + +INITSCRIPT_PACKAGES = "${PN}-server" +INITSCRIPT_NAME_${PN}-server = "snmpd" +INITSCRIPT_PARAMS_${PN}-server = "defaults" + +LEAD_SONAME = "libnetsnmp.so" + +pkg_postrm_net-snmp-server() { + if test "x$D" != "x"; then + OPT="-r $D " + else + OPT="" + /etc/init.d/snmpd stop + fi +} -- cgit 1.2.3-korg