Makefile 2.8 KB

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