diff options
-rw-r--r-- | packages/net-snmp/net-snmp.inc | 97 | ||||
-rw-r--r-- | packages/net-snmp/net-snmp_5.1.2.bb | 51 | ||||
-rw-r--r-- | packages/net-snmp/net-snmp_5.4.1.bb | 47 | ||||
-rw-r--r-- | packages/net-snmp/net-snmp_svn.bb | 93 |
4 files changed, 121 insertions, 167 deletions
diff --git a/packages/net-snmp/net-snmp.inc b/packages/net-snmp/net-snmp.inc new file mode 100644 index 0000000000..bbe809696e --- /dev/null +++ b/packages/net-snmp/net-snmp.inc @@ -0,0 +1,97 @@ +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})" + +inherit autotools update-rc.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" + +pkg_postinst_net-snmp-server() { +if test "x$D" != "x"; then + D="-r $D" +else + D="-s" +fi +update-rc.d $D snmpd defaults +} + +pkg_postrm_net-snmp-server() { +if test "x$D" != "x"; then + D="-r $D" +else + /etc/init.d/snmpd stop +fi +update-rc.d $D snmpd remove +} + diff --git a/packages/net-snmp/net-snmp_5.1.2.bb b/packages/net-snmp/net-snmp_5.1.2.bb index 330e13e0ef..527c9e33b1 100644 --- a/packages/net-snmp/net-snmp_5.1.2.bb +++ b/packages/net-snmp/net-snmp_5.1.2.bb @@ -1,8 +1,5 @@ -DESCRIPTION = "Various tools relating to the Simple Network Management Protocol" -HOMEPAGE = "http://www.net-snmp.org/" -LICENSE = "BSD" -DEPENDS = "openssl" -PR = "r3" +require net-snmp.inc +PR = "r4" SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \ file://uclibc-fix.patch;patch=1 \ @@ -16,46 +13,6 @@ PARALLEL_MAKE = "" EXTRA_OECONF = "--enable-shared --disable-manuals --with-defaults" EXTRA_OEMAKE = "INSTALL_PREFIX=${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/ -} - -PACKAGES = "net-snmp-dbg net-snmp-doc net-snmp-dev net-snmp-libs net-snmp-mibs net-snmp-server net-snmp-client" -FILES_net-snmp-libs = "${libdir}/*" -FILES_net-snmp-mibs = "${datadir}/snmp/mibs" -FILES_net-snmp-server = "${sbindir}/* ${sysconfdir}" -FILES_net-snmp-client = "${bindir}/* ${datadir}/snmp/" -FILES_net-snmp-dbg += "${libdir}/.debug/ ${sbindir}/.debug/ ${bindir}/.debug/" -RDEPENDS_net-snmp-server += "net-snmp-mibs" -RDEPENDS_net-snmp-client += "net-snmp-mibs" - -pkg_postinst_net-snmp-server() { -if test "x$D" != "x"; then - D="-r $D" -else - D="-s" -fi -update-rc.d $D snmpd defaults -} - -pkg_postrm_net-snmp-server() { -if test "x$D" != "x"; then - D="-r $D" -else - /etc/init.d/snmpd stop -fi -update-rc.d $D snmpd remove -} - CONFFILES_${PN}_nylon = "${sysconfdir}/snmp/snmpd.conf ${sysconfdir}/snmp/snmptrapd.conf" +CCACHE = "" + diff --git a/packages/net-snmp/net-snmp_5.4.1.bb b/packages/net-snmp/net-snmp_5.4.1.bb index d900019a0a..f76005b435 100644 --- a/packages/net-snmp/net-snmp_5.4.1.bb +++ b/packages/net-snmp/net-snmp_5.4.1.bb @@ -1,13 +1,5 @@ -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 = "r1" +require net-snmp.inc +PR = "r2" SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \ file://configure-tail.patch;patch=1 \ @@ -15,43 +7,14 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/net-snmp/net-snmp-${PV}.tar.gz \ 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}" -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 +do_configure_prepend() { libtoolize --force - 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/ } -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/" - -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 = "" +CCACHE = "" + diff --git a/packages/net-snmp/net-snmp_svn.bb b/packages/net-snmp/net-snmp_svn.bb index 659b8504c1..2f82865aaa 100644 --- a/packages/net-snmp/net-snmp_svn.bb +++ b/packages/net-snmp/net-snmp_svn.bb @@ -1,13 +1,7 @@ -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})" +require net-snmp.inc +DEPENDS += "libtool libtool-native libtool-cross" -PR = "r2" +PR = "r3" S = "${WORKDIR}/net-snmp" SRC_URI = "svn://net-snmp.svn.sourceforge.net/svnroot/net-snmp/trunk;rev=17367;module=net-snmp;proto=https \ @@ -15,76 +9,19 @@ SRC_URI = "svn://net-snmp.svn.sourceforge.net/svnroot/net-snmp/trunk;rev=17367;m 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 + --disable-embedded-perl --with-perl-modules=no GREP=/bin/grep SED=/bin/sed" +EXTRA_OEMAKE = "INSTALL_PREFIX=${D}" - install -m 755 net-snmp-config ${STAGING_DIR_HOST}${layout_bindir} - rm -Rf ${STAGE_TEMP} +PARALLEL_MAKE = "" +CCACHE = "" + +do_configure_prepend() { + gnu-configize -f + # We better change sources and re-autoconf here, but + # required autoconf is too new for us. + sed -e '/echo.*\".*\\\\.*\"/s/echo/echo -e/g' \ + -e 's/tail -1/tail -n 1/g' \ + -i configure } -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 = "" |