Makefile 2.8 KB

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