PATCH_LIST=" net-snmp-5.7.3-aarch64.diff net-snmp-5.7.3-riscv64.diff " SRC_FETCH_PATH="http://sourceforge.net/projects/net-snmp/files/net-snmp/${PKGVER%-aloha*}/net-snmp-${PKGVER%-aloha*}.tar.gz" SRC_FETCH_METHOD="http" MAKEDEPENDS=( "openssl-*:::*.h *.so *.so.*" "zlib-*:::*.h *.so *.so.*" ) function do_config { if [ "$FLXHOST" != "$FLXTARG" ]; then ENDIANNESS="--with-endianness=${FLX_ENDIAN:-little}" fi CC=$CC LD=$LD RANLIB=$RANLIB AR=$AR \ CFLAGS="$GCC_OPT_SMALL $GCC_ARCH_SMALL $GCC_CPU_SMALL" \ ./configure --build=${FLXHOST} --host=${FLXTARG} \ ${ENDIANNESS} --prefix=/usr --libdir=/usr/lib \ --libexecdir=/usr/lib \ --with-defaults --enable-ucd-snmp-compatibility \ --with-openssl=$FLXROOTDIR/usr --with-default-snmp-version=1 \ --with-out-transports="IPX AAL5PVC" \ --enable-shared --sysconfdir=/etc \ --with-persistent-directory=/var/state/net-snmp \ --with-zlib --with-zlib=$FLXROOTDIR/usr \ --without-libwrap \ --without-nl \ --without-bzip2 \ --without-mysql \ --disable-debugging \ --disable-embedded-perl \ --without-perl-modules # This is a work arround to avoid libtool to link some libraries # with system ones (libtool did a erroneous reling during the install) sed -i -e 's/hardcode_automatic=no/hardcode_automatic=yes/' libtool } function do_compile_only { # NOTE: # - perlmodules doesn't always build since it accidently includes the # crosstool's sysroot to build local binaries ("gen") # - "standardall" needs the sedscript utility but does not have any # implicit rule to build it so it faces a race condition by default # if we only run "make all" since nothing guarantees that sedscript # is built before standardall is finished. # - "standardall" is a random iteration over subdirs... # $FLXMAKE perlmodules || exit $? $FLXMAKE sedscript || exit $? $FLXPMAKE standardall || exit $? $FLXPMAKE all || exit $? } function do_prepack { $FLXPMAKE install INSTALL_PREFIX=$ROOTDIR mkdir -p $ROOTDIR/sbin/init.d cp $PKGDIR/add-ons/snmpd-init $ROOTDIR/sbin/init.d/snmpd chown 0:4 $ROOTDIR/sbin/init.d/snmpd chmod 555 $ROOTDIR/sbin/init.d/snmpd set_default_perm $ROOTDIR }