Makefile 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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.29-1
  6. PKG_RELEASE:= 2
  7. PKG_MD5SUM:= c1bc258a6c345905e79935ac7a3cc582
  8. PKG_DESCR:= iproute2 routing control utility
  9. PKG_SECTION:= net
  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://developer.osdl.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_STYLE:= gnu
  38. CONFIGURE_FLAGS+= KERNEL_INCLUDE="${LINUX_DIR}/include"
  39. BUILD_STYLE:= auto
  40. INSTALL_STYLE:= auto
  41. INSTALL_y:=
  42. INSTALL_m:=
  43. INSTALL_${ADK_PACKAGE_IP}:= install-ip
  44. INSTALL_${ADK_PACKAGE_TC}:= install-tc
  45. INSTALL_${ADK_PACKAGE_TC_ATM}:= install-tc-atm
  46. INSTALL_${ADK_PACKAGE_IFSTAT}:= install-ifstat
  47. INSTALL_${ADK_PACKAGE_LNSTAT}:= install-lnstat
  48. INSTALL_${ADK_PACKAGE_ROUTEL}:= install-routel
  49. INSTALL_${ADK_PACKAGE_RTMON}:= install-rtmon
  50. INSTALL_${ADK_PACKAGE_SS}:= install-ss
  51. post-install: ${INSTALL_y} ${INSTALL_m}
  52. install-ip:
  53. ${INSTALL_DIR} ${IDIR_IP}/{etc/iproute2,usr/sbin}
  54. ${INSTALL_DATA} ${WRKINST}/etc/iproute2/* ${IDIR_IP}/etc/iproute2/
  55. ${INSTALL_BIN} ${WRKINST}/sbin/ip ${IDIR_IP}/usr/sbin/ip
  56. install-tc:
  57. ${INSTALL_DIR} ${IDIR_TC}/{lib/tc,usr/sbin}
  58. ${INSTALL_DATA} ${WRKINST}/lib/tc/* ${IDIR_TC}/lib/tc/
  59. ${INSTALL_BIN} ${WRKINST}/sbin/tc ${IDIR_TC}/usr/sbin/
  60. install-tc-atm:
  61. ${INSTALL_DIR} ${IDIR_TC_ATM}/usr/lib/tc
  62. ${INSTALL_DATA} ${WRKINST}/usr/lib/tc/q_atm.so ${IDIR_TC_ATM}/usr/lib/tc/
  63. install-ifstat:
  64. ${INSTALL_DIR} ${IDIR_IFSTAT}/usr/sbin
  65. ${INSTALL_BIN} ${WRKINST}/sbin/ifstat ${IDIR_IFSTAT}/usr/sbin
  66. install-lnstat:
  67. ${INSTALL_DIR} ${IDIR_LNSTAT}/usr/sbin
  68. ${INSTALL_BIN} ${WRKINST}/sbin/{ln,n}stat ${IDIR_LNSTAT}/usr/sbin
  69. ln -sf lnstat ${IDIR_LNSTAT}/usr/sbin/rtstat
  70. ln -sf lnstat ${IDIR_LNSTAT}/usr/sbin/ctstat
  71. ${INSTALL_BIN} ${WRKINST}/sbin/rtacct ${IDIR_LNSTAT}/usr/sbin
  72. install-routel:
  73. ${INSTALL_DIR} ${IDIR_ROUTEL}/usr/sbin
  74. ${INSTALL_BIN} ${WRKINST}/sbin/route{l,f} ${IDIR_ROUTEL}/usr/sbin
  75. install-rtmon:
  76. ${INSTALL_DIR} ${IDIR_RTMON}/usr/sbin
  77. ${INSTALL_BIN} ${WRKINST}/sbin/rtmon ${IDIR_RTMON}/usr/sbin
  78. install-ss:
  79. ${INSTALL_DIR} ${IDIR_SS}/usr/sbin
  80. ${INSTALL_BIN} ${WRKINST}/sbin/ss ${IDIR_SS}/usr/sbin
  81. include ${TOPDIR}/mk/pkg-bottom.mk