1
0

Makefile 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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:= 3.12.0
  6. PKG_RELEASE:= 3
  7. PKG_MD5SUM:= f87386aaaecafab95607fd10e8152c68
  8. PKG_DESCR:= iproute2 routing control utility
  9. PKG_SECTION:= route
  10. PKG_BUILDDEP:= iptables libnl linux-atm
  11. PKG_DEPENDS:= libnl
  12. PKG_URL:= http://www.linuxfoundation.org/en/Net:Iproute2
  13. PKG_SITES:= http://www.kernel.org/pub/linux/utils/net/iproute2/
  14. PKG_SUBPKGS:= IP TC TC_ATM TC_IPT IFSTAT LNSTAT ROUTEL RTMON SS
  15. PKGSD_TC:= iproute2 traffic control utility
  16. PKGSS_TC:= kmod-sched
  17. PKGSB_TC:= iptables
  18. PKGSD_TC_ATM:= iproute2 traffic control ATM support library
  19. PKGSS_TC_ATM:= tc libatm
  20. PKGSB_TC_ATM:= linux-atm
  21. PKGSD_TC_IPT:= iproute2 traffic control IPTables support library
  22. PKGSS_TC_IPT:= tc iptables
  23. PKGSB_TC_IPT:= iptables
  24. PKGSD_IFSTAT:= iproute2 interface statistics utility
  25. PKGSD_LNSTAT:= iproute2 network statistics utilities
  26. PKGSD_ROUTEL:= iproute2 route list and flush utilities
  27. PKGSD_RTMON:= iproute2 RTnetlink monitor
  28. PKGSD_SS:= iproute2 socket statistics utility
  29. include ${TOPDIR}/mk/package.mk
  30. $(eval $(call PKG_template,IP,ip,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  31. $(eval $(call PKG_template,TC,tc,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_TC},${PKGSD_TC},${PKG_SECTION}))
  32. $(eval $(call PKG_template,TC_ATM,tc-atm,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_TC_ATM},${PKGSD_TC_ATM},${PKG_SECTION}))
  33. $(eval $(call PKG_template,TC_IPT,tc-iptables,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_TC_IPT},${PKGSD_TC_IPT},${PKG_SECTION}))
  34. $(eval $(call PKG_template,IFSTAT,ifstat,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_IFSTAT},${PKG_SECTION}))
  35. $(eval $(call PKG_template,LNSTAT,lnstat,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LNSTAT},${PKG_SECTION}))
  36. $(eval $(call PKG_template,ROUTEL,routel,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_ROUTEL},${PKG_SECTION}))
  37. $(eval $(call PKG_template,RTMON,rtmon,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_RTMON},${PKG_SECTION}))
  38. $(eval $(call PKG_template,SS,ss,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_SS},${PKG_SECTION}))
  39. CONFIG_STYLE:= minimal
  40. TARGET_CFLAGS+= -D_GNU_SOURCE
  41. XAKE_FLAGS+= CCOPTS="${TARGET_CFLAGS}" MFLAGS="CC=\"${TARGET_CC}\""
  42. CONFIGURE_ENV+= CC="${TARGET_CC}" IPTC="${TARGET_CFLAGS}" IPTL="${TARGET_LDFLAGS}"
  43. ip-install:
  44. ${INSTALL_DIR} ${IDIR_IP}/{etc/iproute2,bin}
  45. ${INSTALL_DATA} ${WRKINST}/etc/iproute2/* ${IDIR_IP}/etc/iproute2/
  46. ${INSTALL_BIN} ${WRKINST}/sbin/ip ${IDIR_IP}/bin/ip
  47. tc-install:
  48. ${INSTALL_DIR} ${IDIR_TC}/{usr/sbin,usr/lib/tc}
  49. ${CP} ${WRKINST}/usr/lib/tc/*.dist ${IDIR_TC}/usr/lib/tc/
  50. ${INSTALL_BIN} ${WRKINST}/sbin/tc ${IDIR_TC}/usr/sbin/
  51. tc-atm-install:
  52. ${INSTALL_DIR} ${IDIR_TC_ATM}/usr/lib/tc
  53. ${INSTALL_DATA} ${WRKINST}/usr/lib/tc/q_atm.so \
  54. ${IDIR_TC_ATM}/usr/lib/tc/
  55. tc-iptables-install:
  56. ${INSTALL_DIR} ${IDIR_TC_IPT}/usr/lib/tc
  57. # use ${CP} here, since m_ipt.so is a symlink to m_xt.so
  58. ${CP} ${WRKINST}/usr/lib/tc/m_*.so ${IDIR_TC}/usr/lib/tc/
  59. ifstat-install:
  60. ${INSTALL_DIR} ${IDIR_IFSTAT}/usr/sbin
  61. ${INSTALL_BIN} ${WRKINST}/sbin/ifstat ${IDIR_IFSTAT}/usr/sbin
  62. lnstat-install:
  63. ${INSTALL_DIR} ${IDIR_LNSTAT}/usr/sbin
  64. ${INSTALL_BIN} ${WRKINST}/sbin/{ln,n}stat ${IDIR_LNSTAT}/usr/sbin
  65. ln -sf lnstat ${IDIR_LNSTAT}/usr/sbin/rtstat
  66. ln -sf lnstat ${IDIR_LNSTAT}/usr/sbin/ctstat
  67. ${INSTALL_BIN} ${WRKINST}/sbin/rtacct ${IDIR_LNSTAT}/usr/sbin
  68. routel-install:
  69. ${INSTALL_DIR} ${IDIR_ROUTEL}/usr/sbin
  70. ${INSTALL_BIN} ${WRKINST}/sbin/route{l,f} ${IDIR_ROUTEL}/usr/sbin
  71. rtmon-install:
  72. ${INSTALL_DIR} ${IDIR_RTMON}/usr/sbin
  73. ${INSTALL_BIN} ${WRKINST}/sbin/rtmon ${IDIR_RTMON}/usr/sbin
  74. ss-install:
  75. ${INSTALL_DIR} ${IDIR_SS}/usr/sbin
  76. ${INSTALL_BIN} ${WRKINST}/sbin/ss ${IDIR_SS}/usr/sbin
  77. include ${TOPDIR}/mk/pkg-bottom.mk