diff options
author | Sergey Lapin <slapin@ossfans.org> | 2009-01-29 10:56:26 +0300 |
---|---|---|
committer | Sergey Lapin <slapin@ossfans.org> | 2009-02-16 10:04:43 +0300 |
commit | d7422627df8600494905518f9eebc898a1eb32a7 (patch) | |
tree | ad667ae4fa1c6e0d2d6531b9310b3b4c7a540ed1 /packages/net-snmp | |
parent | 41be4c514cb082c56e1a45c2e1eb02a1d236b757 (diff) |
net-snmp: added _svn version, has proper staging to work with tshark
Diffstat (limited to 'packages/net-snmp')
-rw-r--r-- | packages/net-snmp/net-snmp_svn.bb | 90 |
1 files changed, 90 insertions, 0 deletions
diff --git a/packages/net-snmp/net-snmp_svn.bb b/packages/net-snmp/net-snmp_svn.bb new file mode 100644 index 0000000000..659b8504c1 --- /dev/null +++ b/packages/net-snmp/net-snmp_svn.bb @@ -0,0 +1,90 @@ +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})" + +PR = "r2" +S = "${WORKDIR}/net-snmp" + +SRC_URI = "svn://net-snmp.svn.sourceforge.net/svnroot/net-snmp/trunk;rev=17367;module=net-snmp;proto=https \ + file://init \ + file://snmpd.conf \ + file://snmptrapd.conf" + +inherit autotools update-rc.d + +EXTRA_OECONF = "--enable-shared --disable-manuals --with-defaults \ + --disable-embedded-perl --with-perl-modules=no" +EXTRA_OEMAKE = "INSTALL_PREFIX=${D} DESTDIR=${D}" + +do_configure() { + # Additional flag based on target endiness (see siteinfo.bbclass) + ENDIANESS="${@base_conditional('SITEINFO_ENDIANESS', 'le', '--with-endianness=little', '--with-endianness=big', d)}" + oenote Determined endianess as: $ENDIANESS + oe_runconf $ENDIANESS +} +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/ +} + +do_stage() { + rm -rf ${STAGE_TEMP} + mkdir -p ${STAGE_TEMP} + oe_runmake INSTALL_PREFIX="${STAGE_TEMP}" install + autotools_stage_dir ${STAGE_TEMP}/${includedir} ${STAGING_INCDIR} + if [ -d ${STAGE_TEMP}/${libdir} ] + then + olddir=`pwd` + cd ${STAGE_TEMP}/${libdir} + las=$(find . -name \*.la -type f) + cd $olddir + echo "Found la files: $las" + for i in $las + do + sed -e 's/^installed=yes$/installed=no/' \ + -e '/^dependency_libs=/s,${WORKDIR}[[:alnum:]/\._+-]*/\([[:alnum:]\._+-]*\),${STAGING_LIBDIR}/\1,g' \ + -e "/^dependency_libs=/s,\([[:space:]']\)${libdir},\1${STAGING_LIBDIR},g" \ + -i ${STAGE_TEMP}/${libdir}/$i + done + autotools_stage_dir ${STAGE_TEMP}/${libdir} ${STAGING_LIBDIR} + fi + install -d ${STAGING_DIR_HOST}${layout_bindir} + sed -e "s@-I/usr/include@@g" \ + -e "s@^prefix=.*@prefix=${STAING_DIR_HOST}@g" \ + -e "s@^exec_prefix=.*@exec_prefix=${STAING_DIR_HOST}@g" \ + -e "s@^includedir=.*@includedir=${STAGING_INCDIR}@g" \ + -e "s@^libdir=.*@libdir=${STAGING_LIBDIR}@g" \ + -i net-snmp-config + + install -m 755 net-snmp-config ${STAGING_DIR_HOST}${layout_bindir} + rm -Rf ${STAGE_TEMP} +} + +PACKAGES = "net-snmp-dbg net-snmp-doc net-snmp-dev net-snmp-libs \ + net-snmp-mibs net-snmp-server net-snmp-client" + +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" + +PARALLEL_MAKE = "" |