Makefile 2.8 KB

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