Makefile 3.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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:= iproute2
  5. PKG_VERSION:= 2.6.34
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 5c5742bdac05a1688f266512e685b83c
  8. PKG_DESCR:= iproute2 routing control utility
  9. PKG_SECTION:= route
  10. ifneq ($(strip ${ADK_PACKAGE_TC_ATM}),)
  11. PKG_BUILDDEP+= linux-atm
  12. endif
  13. PKG_URL:= http://www.linuxfoundation.org/en/Net:Iproute2
  14. PKG_SITES:= http://devresources.linuxfoundation.org/dev/iproute2/download/
  15. PKG_DESCR_TC:= iproute2 traffic control utility
  16. PKG_DEPENDS_TC:= kmod-sched
  17. PKG_DESCR_TC_ATM:= iproute2 traffic control ATM support library
  18. PKG_DEPENDS_TC_ATM:= tc libatm
  19. PKG_DESCR_IFSTAT:= iproute2 interface statistics utility
  20. PKG_DESCR_LNSTAT:= iproute2 network statistics utilities
  21. PKG_DESCR_ROUTEL:= iproute2 route list and flush utilities
  22. PKG_DESCR_RTMON:= iproute2 RTnetlink monitor
  23. PKG_DESCR_SS:= iproute2 socket statistics utility
  24. DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2
  25. include ${TOPDIR}/mk/package.mk
  26. $(eval $(call PKG_template,IP,ip,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  27. $(eval $(call PKG_template,TC,tc,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_TC},${PKG_DESCR_TC},${PKG_SECTION}))
  28. $(eval $(call PKG_template,TC_ATM,tc-atm,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_TC_ATM},${PKG_DESCR_TC_ATM},${PKG_SECTION}))
  29. $(eval $(call PKG_template,IFSTAT,ifstat,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_IFSTAT},${PKG_DESCR_IFSTAT},${PKG_SECTION}))
  30. $(eval $(call PKG_template,LNSTAT,lnstat,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_LNSTAT},${PKG_DESCR_LNSTAT},${PKG_SECTION}))
  31. $(eval $(call PKG_template,ROUTEL,routel,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_ROUTEL},${PKG_DESCR_ROUTEL},${PKG_SECTION}))
  32. $(eval $(call PKG_template,RTMON,rtmon,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_RTMON},${PKG_DESCR_RTMON},${PKG_SECTION}))
  33. $(eval $(call PKG_template,SS,ss,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_SS},${PKG_DESCR_SS},${PKG_SECTION}))
  34. TCFLAGS+= -D_GNU_SOURCE
  35. XAKE_FLAGS+= CCOPTS="${TCFLAGS}" MFLAGS="CC=${TARGET_CC}" \
  36. HOSTCFLAGS="-I${LINUX_HEADER_DIR}/include"
  37. CONFIGURE_FLAGS+= KERNEL_INCLUDE="${LINUX_DIR}/include"
  38. INSTALL_y:=
  39. INSTALL_m:=
  40. INSTALL_${ADK_PACKAGE_IP}:= install-ip
  41. INSTALL_${ADK_PACKAGE_TC}:= install-tc
  42. INSTALL_${ADK_PACKAGE_TC_ATM}:= install-tc-atm
  43. INSTALL_${ADK_PACKAGE_IFSTAT}:= install-ifstat
  44. INSTALL_${ADK_PACKAGE_LNSTAT}:= install-lnstat
  45. INSTALL_${ADK_PACKAGE_ROUTEL}:= install-routel
  46. INSTALL_${ADK_PACKAGE_RTMON}:= install-rtmon
  47. INSTALL_${ADK_PACKAGE_SS}:= install-ss
  48. post-install: ${INSTALL_y} ${INSTALL_m}
  49. install-ip:
  50. ${INSTALL_DIR} ${IDIR_IP}/{etc/iproute2,usr/sbin}
  51. ${INSTALL_DATA} ${WRKINST}/etc/iproute2/* ${IDIR_IP}/etc/iproute2/
  52. ${INSTALL_BIN} ${WRKINST}/sbin/ip ${IDIR_IP}/usr/sbin/ip
  53. install-tc:
  54. ${INSTALL_DIR} ${IDIR_TC}/{lib/tc,usr/sbin}
  55. ${INSTALL_DATA} ${WRKINST}/lib/tc/* ${IDIR_TC}/lib/tc/
  56. ${INSTALL_BIN} ${WRKINST}/sbin/tc ${IDIR_TC}/usr/sbin/
  57. install-tc-atm:
  58. ${INSTALL_DIR} ${IDIR_TC_ATM}/usr/lib/tc
  59. ${INSTALL_DATA} ${WRKINST}/usr/lib/tc/q_atm.so \
  60. ${IDIR_TC_ATM}/usr/lib/tc/
  61. install-ifstat:
  62. ${INSTALL_DIR} ${IDIR_IFSTAT}/usr/sbin
  63. ${INSTALL_BIN} ${WRKINST}/sbin/ifstat ${IDIR_IFSTAT}/usr/sbin
  64. install-lnstat:
  65. ${INSTALL_DIR} ${IDIR_LNSTAT}/usr/sbin
  66. ${INSTALL_BIN} ${WRKINST}/sbin/{ln,n}stat ${IDIR_LNSTAT}/usr/sbin
  67. ln -sf lnstat ${IDIR_LNSTAT}/usr/sbin/rtstat
  68. ln -sf lnstat ${IDIR_LNSTAT}/usr/sbin/ctstat
  69. ${INSTALL_BIN} ${WRKINST}/sbin/rtacct ${IDIR_LNSTAT}/usr/sbin
  70. install-routel:
  71. ${INSTALL_DIR} ${IDIR_ROUTEL}/usr/sbin
  72. ${INSTALL_BIN} ${WRKINST}/sbin/route{l,f} ${IDIR_ROUTEL}/usr/sbin
  73. install-rtmon:
  74. ${INSTALL_DIR} ${IDIR_RTMON}/usr/sbin
  75. ${INSTALL_BIN} ${WRKINST}/sbin/rtmon ${IDIR_RTMON}/usr/sbin
  76. install-ss:
  77. ${INSTALL_DIR} ${IDIR_SS}/usr/sbin
  78. ${INSTALL_BIN} ${WRKINST}/sbin/ss ${IDIR_SS}/usr/sbin
  79. include ${TOPDIR}/mk/pkg-bottom.mk