Makefile 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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.6.1
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= b4e30ead5783b0bb1d280172c6095ea4
  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_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_SNMPD:= 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_SNMPD_WITH_IPV6},)
  30. SNMP_TRANSPORTS_INCLUDED+= TCPIPv6 UDPIPv6
  31. else
  32. SNMP_TRANSPORTS_EXCLUDED:= TCPIPv6 UDPIPv6
  33. endif
  34. TARGET_LDFLAGS+= -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_SNMPD_WITH_IPV6},)
  56. CONFIGURE_ARGS+= --enable-ipv6
  57. else
  58. CONFIGURE_ARGS+= --disable-ipv6
  59. endif
  60. FAKE_FLAGS+= INSTALL_PREFIX="${WRKINST}"
  61. libnetsnmp-install:
  62. ${INSTALL_DIR} ${IDIR_LIBNETSNMP}/usr/lib
  63. ${CP} ${WRKINST}/usr/lib/libnetsnmp*.so* ${IDIR_LIBNETSNMP}/usr/lib/
  64. snmpd-install:
  65. ${INSTALL_DIR} ${IDIR_SNMPD}/etc/snmp
  66. ${INSTALL_DIR} ${IDIR_SNMPD}/usr/sbin
  67. ${INSTALL_DATA} ./files/snmpd.conf ${IDIR_SNMPD}/etc/snmp/snmpd.conf
  68. ${INSTALL_BIN} ${WRKINST}/usr/sbin/snmpd ${IDIR_SNMPD}/usr/sbin/snmpd
  69. snmp-utils-install:
  70. ${INSTALL_DIR} ${IDIR_SNMP_UTILS}/usr/bin
  71. ${CP} ${WRKINST}/usr/bin/snmp{get,set,status,test,trap,walk} \
  72. ${IDIR_SNMP_UTILS}/usr/bin/
  73. include ${TOPDIR}/mk/pkg-bottom.mk