Makefile 3.7 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.34
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= 5c5742bdac05a1688f266512e685b83c
  8. PKG_DESCR:= iproute2 routing control utility
  9. PKG_SECTION:= route
  10. PKG_URL:= http://www.linuxfoundation.org/en/Net:Iproute2
  11. PKG_SITES:= http://devresources.linuxfoundation.org/dev/iproute2/download/
  12. PKG_SUBPKGS:= IP TC TC_ATM IFSTAT LNSTAT ROUTEL RTMON SS
  13. PKGSD_TC:= iproute2 traffic control utility
  14. PKGSS_TC:= kmod-sched
  15. PKGSD_TC_ATM:= iproute2 traffic control ATM support library
  16. PKGSS_TC_ATM:= tc libatm
  17. PKGSB_TC_ATM:= linux-atm
  18. PKGSD_IFSTAT:= iproute2 interface statistics utility
  19. PKGSD_LNSTAT:= iproute2 network statistics utilities
  20. PKGSD_ROUTEL:= iproute2 route list and flush utilities
  21. PKGSD_RTMON:= iproute2 RTnetlink monitor
  22. PKGSD_SS:= iproute2 socket statistics utility
  23. DISTFILES:= $(PKG_NAME)-$(PKG_VERSION).tar.bz2
  24. include ${TOPDIR}/mk/package.mk
  25. $(eval $(call PKG_template,IP,ip,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  26. $(eval $(call PKG_template,TC,tc,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_TC},${PKGSD_TC},${PKG_SECTION}))
  27. $(eval $(call PKG_template,TC_ATM,tc-atm,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_TC_ATM},${PKGSD_TC_ATM},${PKG_SECTION}))
  28. $(eval $(call PKG_template,IFSTAT,ifstat,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_IFSTAT},${PKG_SECTION}))
  29. $(eval $(call PKG_template,LNSTAT,lnstat,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LNSTAT},${PKG_SECTION}))
  30. $(eval $(call PKG_template,ROUTEL,routel,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_ROUTEL},${PKG_SECTION}))
  31. $(eval $(call PKG_template,RTMON,rtmon,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_RTMON},${PKG_SECTION}))
  32. $(eval $(call PKG_template,SS,ss,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_SS},${PKG_SECTION}))
  33. TCFLAGS+= -D_GNU_SOURCE
  34. XAKE_FLAGS+= CCOPTS="${TCFLAGS}" MFLAGS="CC=${TARGET_CC}" \
  35. HOSTCFLAGS="-I${LINUX_HEADER_DIR}/include"
  36. CONFIGURE_FLAGS+= KERNEL_INCLUDE="${LINUX_DIR}/include"
  37. INSTALL_y:=
  38. INSTALL_m:=
  39. INSTALL_${ADK_PACKAGE_IP}:= install-ip
  40. INSTALL_${ADK_PACKAGE_TC}:= install-tc
  41. INSTALL_${ADK_PACKAGE_TC_ATM}:= install-tc-atm
  42. INSTALL_${ADK_PACKAGE_IFSTAT}:= install-ifstat
  43. INSTALL_${ADK_PACKAGE_LNSTAT}:= install-lnstat
  44. INSTALL_${ADK_PACKAGE_ROUTEL}:= install-routel
  45. INSTALL_${ADK_PACKAGE_RTMON}:= install-rtmon
  46. INSTALL_${ADK_PACKAGE_SS}:= install-ss
  47. post-install: ${INSTALL_y} ${INSTALL_m}
  48. install-ip:
  49. ${INSTALL_DIR} ${IDIR_IP}/{etc/iproute2,usr/sbin}
  50. ${INSTALL_DATA} ${WRKINST}/etc/iproute2/* ${IDIR_IP}/etc/iproute2/
  51. ${INSTALL_BIN} ${WRKINST}/sbin/ip ${IDIR_IP}/usr/sbin/ip
  52. install-tc:
  53. ${INSTALL_DIR} ${IDIR_TC}/{lib/tc,usr/sbin}
  54. ${INSTALL_DATA} ${WRKINST}/lib/tc/* ${IDIR_TC}/lib/tc/
  55. ${INSTALL_BIN} ${WRKINST}/sbin/tc ${IDIR_TC}/usr/sbin/
  56. install-tc-atm:
  57. ${INSTALL_DIR} ${IDIR_TC_ATM}/usr/lib/tc
  58. ${INSTALL_DATA} ${WRKINST}/usr/lib/tc/q_atm.so \
  59. ${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