Makefile 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include ${TOPDIR}/rules.mk
  4. PKG_NAME:= net-snmp
  5. PKG_VERSION:= 5.5
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 5b2551e7bd024fbbee84dca22a5f13a1
  8. PKG_DESCR:= SNMP Agent
  9. PKG_SECTION:= net/misc
  10. PKG_DEPENDS:= libnetsnmp libelf
  11. PKG_BUILDDEP+= libelf
  12. PKG_NOPARALLEL:= 1
  13. PKG_URL:= http://www.net-snmp.org/
  14. PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=net-snmp/}
  15. PKG_DESCR_UTILS:= SNMP utilities
  16. PKG_DEPENDS_UTILS:= libnetsnmp libelf
  17. PKG_DESCR_LIBS:= SNMP library
  18. PKG_DEPENDS_LIBS:= libelf
  19. PKG_SECTION_LIBS:= libs
  20. PKG_FLAVOURS:= WITH_IPV6
  21. PKGFD_WITH_IPV6:= enable IPv6 support
  22. include ${TOPDIR}/mk/package.mk
  23. $(eval $(call PKG_template,SNMPD,snmpd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  24. $(eval $(call PKG_template,SNMP_UTILS,snmp-utils,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_UTILS},${PKG_DESCR_UTILS},${PKG_SECTION}))
  25. $(eval $(call PKG_template,LIBNETSNMP,libnetsnmp,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_LIBS},${PKG_DESCR_LIBS},${PKG_SECTION_LIBS}))
  26. SNMP_TRANSPORTS_INCLUDED:= UDP TCP Callback Unix
  27. SNMP_TRANSPORTS_EXCLUDED:= Alias
  28. ifneq (${ADK_PACKAGE_NET_SNMP_WITH_IPV6},)
  29. SNMP_TRANSPORTS_INCLUDED+= TCPIPv6 UDPIPv6
  30. else
  31. SNMP_TRANSPORTS_EXCLUDED:= TCPIPv6 UDPIPv6
  32. endif
  33. TLDFLAGS+= -pthread
  34. CONFIGURE_ARGS+= --with-logfile=/var/log/snmpd.log \
  35. --with-persistent-directory=/usr/lib/snmp/ \
  36. --with-default-snmp-version=3 \
  37. --with-sys-contact=root@localhost \
  38. --with-sys-location=Unknown \
  39. --enable-applications \
  40. --disable-embedded-perl \
  41. --without-perl-modules \
  42. --disable-debugging \
  43. --disable-manuals \
  44. --disable-mib-loading \
  45. --disable-mibs \
  46. --disable-scripts \
  47. --with-transports="${SNMP_TRANSPORTS_INCLUDED}" \
  48. --with-out-transports="${SNMP_TRANSPORTS_EXCLUDED}" \
  49. --with-opaque-special-types \
  50. --without-openssl \
  51. --without-libwrap \
  52. --without-rpm \
  53. --without-zlib
  54. ifneq (${ADK_PACKAGE_NET_SNMP_WITH_IPV6},)
  55. CONFIGURE_ARGS+= --enable-ipv6
  56. else
  57. CONFIGURE_ARGS+= --disable-ipv6
  58. endif
  59. FAKE_FLAGS+= INSTALL_PREFIX="${WRKINST}"
  60. post-install:
  61. ${INSTALL_DIR} ${IDIR_LIBNETSNMP}/usr/lib
  62. ${CP} ${WRKINST}/usr/lib/libnetsnmp*.so* ${IDIR_LIBNETSNMP}/usr/lib/
  63. ${INSTALL_DIR} ${IDIR_SNMPD}/etc/snmp
  64. ${INSTALL_DIR} ${IDIR_SNMPD}/usr/sbin
  65. ${INSTALL_DATA} ./files/snmpd.conf ${IDIR_SNMPD}/etc/snmp/snmpd.conf
  66. ${INSTALL_BIN} ${WRKINST}/usr/sbin/snmpd ${IDIR_SNMPD}/usr/sbin/snmpd
  67. ${INSTALL_DIR} ${IDIR_SNMP_UTILS}/usr/bin
  68. ${CP} ${WRKINST}/usr/bin/snmp{get,set,status,test,trap,walk} \
  69. ${IDIR_SNMP_UTILS}/usr/bin/
  70. include ${TOPDIR}/mk/pkg-bottom.mk