Makefile 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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. PKG_URL:= http://www.linuxfoundation.org/en/Net:Iproute2
  11. PKG_SITES:= http://developer.osdl.org/dev/iproute2/download/
  12. PKG_DESCR_TC:= iproute2 traffic control utility
  13. PKG_DEPENDS_TC:= kmod-sched
  14. PKG_DESCR_TC_ATM:= iproute2 traffic control ATM support library
  15. PKG_DEPENDS_TC_ATM:= tc
  16. PKG_DESCR_IFSTAT:= iproute2 interface statistics utility
  17. PKG_DESCR_LNSTAT:= iproute2 network statistics utilities
  18. PKG_DESCR_ROUTEL:= iproute2 route list and flush utilities
  19. PKG_DESCR_RTMON:= iproute2 RTnetlink monitor
  20. PKG_DESCR_SS:= iproute2 socket statistics utility
  21. DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2
  22. include ${TOPDIR}/mk/package.mk
  23. $(eval $(call PKG_template,IP,ip,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  24. $(eval $(call PKG_template,TC,tc,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_TC},${PKG_DESCR_TC},${PKG_SECTION}))
  25. $(eval $(call PKG_template,TC_ATM,tc-atm,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_TC_ATM},${PKG_DESCR_TC_ATM},${PKG_SECTION}))
  26. $(eval $(call PKG_template,IFSTAT,ifstat,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_IFSTAT},${PKG_DESCR_IFSTAT},${PKG_SECTION}))
  27. $(eval $(call PKG_template,LNSTAT,lnstat,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_LNSTAT},${PKG_DESCR_LNSTAT},${PKG_SECTION}))
  28. $(eval $(call PKG_template,ROUTEL,routel,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_ROUTEL},${PKG_DESCR_ROUTEL},${PKG_SECTION}))
  29. $(eval $(call PKG_template,RTMON,rtmon,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_RTMON},${PKG_DESCR_RTMON},${PKG_SECTION}))
  30. $(eval $(call PKG_template,SS,ss,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_SS},${PKG_DESCR_SS},${PKG_SECTION}))
  31. TCFLAGS+= -D_GNU_SOURCE
  32. XAKE_FLAGS+= CCOPTS="${TCFLAGS}" MFLAGS="CC=${TARGET_CC}" \
  33. HOSTCFLAGS="-I${LINUX_HEADER_DIR}/include"
  34. CONFIGURE_STYLE:= gnu
  35. CONFIGURE_FLAGS+= KERNEL_INCLUDE="${LINUX_DIR}/include"
  36. BUILD_STYLE:= auto
  37. INSTALL_STYLE:= auto
  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 ${IDIR_TC_ATM}/usr/lib/tc/
  60. install-ifstat:
  61. ${INSTALL_DIR} ${IDIR_IFSTAT}/usr/sbin
  62. ${INSTALL_BIN} ${WRKINST}/sbin/ifstat ${IDIR_IFSTAT}/usr/sbin
  63. install-lnstat:
  64. ${INSTALL_DIR} ${IDIR_LNSTAT}/usr/sbin
  65. ${INSTALL_BIN} ${WRKINST}/sbin/{ln,n}stat ${IDIR_LNSTAT}/usr/sbin
  66. ln -sf lnstat ${IDIR_LNSTAT}/usr/sbin/rtstat
  67. ln -sf lnstat ${IDIR_LNSTAT}/usr/sbin/ctstat
  68. ${INSTALL_BIN} ${WRKINST}/sbin/rtacct ${IDIR_LNSTAT}/usr/sbin
  69. install-routel:
  70. ${INSTALL_DIR} ${IDIR_ROUTEL}/usr/sbin
  71. ${INSTALL_BIN} ${WRKINST}/sbin/route{l,f} ${IDIR_ROUTEL}/usr/sbin
  72. install-rtmon:
  73. ${INSTALL_DIR} ${IDIR_RTMON}/usr/sbin
  74. ${INSTALL_BIN} ${WRKINST}/sbin/rtmon ${IDIR_RTMON}/usr/sbin
  75. install-ss:
  76. ${INSTALL_DIR} ${IDIR_SS}/usr/sbin
  77. ${INSTALL_BIN} ${WRKINST}/sbin/ss ${IDIR_SS}/usr/sbin
  78. include ${TOPDIR}/mk/pkg-bottom.mk