1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include ${ADK_TOPDIR}/rules.mk
9 PKG_HASH
:= cfcd1f890290f8c8afcc91d9444ad929b9252c16f9ab3f286c50dd3c59dc646e
10 PKG_DESCR
:= routing control utility
11 PKG_SECTION
:= net
/route
12 PKG_BUILDDEP
:= iptables libnl linux-atm
14 PKG_URL
:= http
://www.linuxfoundation.org
/en
/Net
:Iproute2
15 PKG_SITES
:= http
://www.kernel.org
/pub
/linux
/utils
/net
/iproute2
/
17 PKG_SUBPKGS
:= IP TC TC_ATM TC_IPT IFSTAT LNSTAT ROUTEL RTMON SS
18 PKGSD_TC
:= traffic control utility
20 PKGSD_TC_ATM
:= traffic control atm support library
21 PKGSS_TC_ATM
:= tc libatm
22 PKGSB_TC_ATM
:= linux-atm
23 PKGSD_TC_IPT
:= traffic control iptables support library
24 PKGSS_TC_IPT
:= tc iptables
25 PKGSB_TC_IPT
:= iptables
26 PKGSD_IFSTAT
:= interface statistics utility
27 PKGSD_LNSTAT
:= network statistics utilities
28 PKGSD_ROUTEL
:= route list and flush utilities
29 PKGSD_RTMON
:= rtnetlink monitor
30 PKGSD_SS
:= socket statistics utility
32 include ${ADK_TOPDIR}/mk
/package.mk
34 $(eval
$(call PKG_template
,IP
,ip
,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
35 $(eval
$(call PKG_template
,TC
,tc
,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_TC},${PKGSD_TC},${PKG_SECTION}))
36 $(eval
$(call PKG_template
,TC_ATM
,tc-atm
,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_TC_ATM},${PKGSD_TC_ATM},${PKG_SECTION}))
37 $(eval
$(call PKG_template
,TC_IPT
,tc-iptables
,${PKG_VERSION}-${PKG_RELEASE},${PKGSS_TC_IPT},${PKGSD_TC_IPT},${PKG_SECTION}))
38 $(eval
$(call PKG_template
,IFSTAT
,ifstat
,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_IFSTAT},${PKG_SECTION}))
39 $(eval
$(call PKG_template
,LNSTAT
,lnstat
,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_LNSTAT},${PKG_SECTION}))
40 $(eval
$(call PKG_template
,ROUTEL
,routel
,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_ROUTEL},${PKG_SECTION}))
41 $(eval
$(call PKG_template
,RTMON
,rtmon
,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_RTMON},${PKG_SECTION}))
42 $(eval
$(call PKG_template
,SS
,ss
,${PKG_VERSION}-${PKG_RELEASE},,${PKGSD_SS},${PKG_SECTION}))
44 CONFIG_STYLE
:= minimal
45 TARGET_CFLAGS
+= -D_GNU_SOURCE
46 XAKE_FLAGS
+= CCOPTS
="${TARGET_CFLAGS}" MFLAGS
="CC=\"${TARGET_CC}\""
47 CONFIGURE_ENV
+= CC
="${TARGET_CC}" IPTC
="${TARGET_CFLAGS}" IPTL
="${TARGET_LDFLAGS}"
50 ${INSTALL_DIR} ${IDIR_IP}/{etc
/iproute2
,bin
}
51 ${INSTALL_DATA} ${WRKINST}/etc
/iproute2
/* ${IDIR_IP}/etc
/iproute2
/
52 ${INSTALL_BIN} ${WRKINST}/sbin
/ip
${IDIR_IP}/bin
/ip
55 ${INSTALL_DIR} ${IDIR_TC}/{usr
/sbin
,usr
/lib
/tc
}
56 ${CP} ${WRKINST}/usr
/lib
/tc
/*.
dist ${IDIR_TC}/usr
/lib
/tc
/
57 ${INSTALL_BIN} ${WRKINST}/sbin
/tc
${IDIR_TC}/usr
/sbin
/
60 ${INSTALL_DIR} ${IDIR_TC_ATM}/usr
/lib
/tc
61 ${INSTALL_DATA} ${WRKINST}/usr
/lib
/tc
/q_atm.so \
62 ${IDIR_TC_ATM}/usr
/lib
/tc
/
65 ${INSTALL_DIR} ${IDIR_TC_IPT}/usr
/lib
/tc
66 # use ${CP} here, since m_ipt.so is a symlink to m_xt.so
67 ${CP} ${WRKINST}/usr
/lib
/tc
/m_
*.so
${IDIR_TC}/usr
/lib
/tc
/
70 ${INSTALL_DIR} ${IDIR_IFSTAT}/usr
/sbin
71 ${INSTALL_BIN} ${WRKINST}/sbin
/ifstat
${IDIR_IFSTAT}/usr
/sbin
74 ${INSTALL_DIR} ${IDIR_LNSTAT}/usr
/sbin
75 ${INSTALL_BIN} ${WRKINST}/sbin
/{ln
,n
}stat
${IDIR_LNSTAT}/usr
/sbin
76 ln
-sf lnstat
${IDIR_LNSTAT}/usr
/sbin
/rtstat
77 ln
-sf lnstat
${IDIR_LNSTAT}/usr
/sbin
/ctstat
78 ${INSTALL_BIN} ${WRKINST}/sbin
/rtacct
${IDIR_LNSTAT}/usr
/sbin
81 ${INSTALL_DIR} ${IDIR_ROUTEL}/usr
/sbin
82 ${INSTALL_BIN} ${WRKINST}/sbin
/route
{l
,f
} ${IDIR_ROUTEL}/usr
/sbin
85 ${INSTALL_DIR} ${IDIR_RTMON}/usr
/sbin
86 ${INSTALL_BIN} ${WRKINST}/sbin
/rtmon
${IDIR_RTMON}/usr
/sbin
89 ${INSTALL_DIR} ${IDIR_SS}/usr
/sbin
90 ${INSTALL_BIN} ${WRKINST}/sbin
/ss
${IDIR_SS}/usr
/sbin
92 include ${ADK_TOPDIR}/mk
/pkg-bottom.mk