Makefile 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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:= 2
  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_URL:= http://www.net-snmp.org/
  13. PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=net-snmp/}
  14. PKG_NOPARALLEL:= 1
  15. PKG_SUBPKGS:= SNMPD SNMP_UTILS LIBNETSNMP
  16. PKGSD_SNMP_UTILS:= SNMP utilities
  17. PKGSS_SNMP_UTILS:= libnetsnmp libelf
  18. PKGSD_LIBNETSNMP:= SNMP library
  19. PKGSS_LIBNETSNMP:= libelf
  20. PKGSC_LIBNETSNMP:= libs
  21. PKG_FLAVOURS:= WITH_IPV6
  22. PKGFD_WITH_IPV6:= enable IPv6 support
  23. include ${TOPDIR}/mk/package.mk
  24. $(eval $(call PKG_template,SNMPD,snmpd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  25. $(eval $(call PKG_template,SNMP_UTILS,snmp-utils,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_SNMP_UTILS},${PKGSD_SNMP_UTILS},${PKG_SECTION}))
  26. $(eval $(call PKG_template,LIBNETSNMP,libnetsnmp,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_LIBNETSNMP},${PKGSD_LIBNETSNMP},${PKGSC_LIBNETSNMP}))
  27. SNMP_TRANSPORTS_INCLUDED:= UDP TCP Callback Unix
  28. SNMP_TRANSPORTS_EXCLUDED:= Alias
  29. ifneq (${ADK_PACKAGE_NET_SNMP_WITH_IPV6},)
  30. SNMP_TRANSPORTS_INCLUDED+= TCPIPv6 UDPIPv6
  31. else
  32. SNMP_TRANSPORTS_EXCLUDED:= TCPIPv6 UDPIPv6
  33. endif
  34. TLDFLAGS+= -pthread
  35. CONFIGURE_ARGS+= --with-defaults \
  36. --with-persistent-directory=/etc/snmp \
  37. --with-default-snmp-version=3 \
  38. --with-sys-contact=root@localhost \
  39. --with-sys-location=Unknown \
  40. --enable-applications \
  41. --disable-embedded-perl \
  42. --without-perl-modules \
  43. --disable-debugging \
  44. --disable-manuals \
  45. --disable-mib-loading \
  46. --disable-mibs \
  47. --disable-scripts \
  48. --with-transports="${SNMP_TRANSPORTS_INCLUDED}" \
  49. --with-out-transports="${SNMP_TRANSPORTS_EXCLUDED}" \
  50. --with-opaque-special-types \
  51. --without-openssl \
  52. --without-libwrap \
  53. --without-rpm \
  54. --without-zlib
  55. ifneq (${ADK_PACKAGE_NET_SNMP_WITH_IPV6},)
  56. CONFIGURE_ARGS+= --enable-ipv6
  57. else
  58. CONFIGURE_ARGS+= --disable-ipv6
  59. endif
  60. FAKE_FLAGS+= INSTALL_PREFIX="${WRKINST}"
  61. post-install:
  62. ${INSTALL_DIR} ${IDIR_LIBNETSNMP}/usr/lib
  63. ${CP} ${WRKINST}/usr/lib/libnetsnmp*.so* ${IDIR_LIBNETSNMP}/usr/lib/
  64. ${INSTALL_DIR} ${IDIR_SNMPD}/etc/snmp
  65. ${INSTALL_DIR} ${IDIR_SNMPD}/usr/sbin
  66. ${INSTALL_DATA} ./files/snmpd.conf ${IDIR_SNMPD}/etc/snmp/snmpd.conf
  67. ${INSTALL_BIN} ${WRKINST}/usr/sbin/snmpd ${IDIR_SNMPD}/usr/sbin/snmpd
  68. ${INSTALL_DIR} ${IDIR_SNMP_UTILS}/usr/bin
  69. ${CP} ${WRKINST}/usr/bin/snmp{get,set,status,test,trap,walk} \
  70. ${IDIR_SNMP_UTILS}/usr/bin/
  71. include ${TOPDIR}/mk/pkg-bottom.mk