1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
10 groups = Networking/Tools
11 url = http://www.linuxfoundation.org/en/Net:Iproute2
13 summary = Advanced IP routing and network device configuration tools.
16 The iproute package contains networking utilities (ip and rtmon, for
17 example) which are designed to use the advanced networking
18 capabilities of the Linux 2.4.x and 2.6.x kernel.
21 source_dl = http://kernel.org/pub/linux/utils/net/iproute2/
22 sources = %{thisapp}.tar.xz
30 linux-atm-devel >= 2.5.1
31 iptables-devel >= 1.4.19
35 sed -e "s/^LIBDIR=/LIBDIR?=/" -i Makefile
38 export RPM_OPT_FLAGS = %{CFLAGS}
39 export LIBDIR = %{libdir}
40 export IPT_LIB_DIR = %{libdir}/xtables
43 # The installation routine that comes with that package
44 # is totally unusable for use, so do it manually.
47 %{BUILDROOT}%{includedir} \
48 %{BUILDROOT}%{sbindir} \
49 %{BUILDROOT}%{mandir}/man{3,8} \
50 %{BUILDROOT}%{datadir}/tc \
51 %{BUILDROOT}%{libdir}/tc \
52 %{BUILDROOT}%{sysconfdir}/iproute2
55 for bin in bridge/bridge genl/genl ip/{ifcfg,ip,routef,routel,rtmon,rtpr} \
56 tc/tc misc/{arpd,ifstat,lnstat,nstat,rtacct,ss}; do
57 install -v -m 755 ${bin} %{BUILDROOT}%{sbindir}
59 ln -svf lnstat %{BUILDROOT}%{sbindir}/ctstat
60 ln -svf lnstat %{BUILDROOT}%{sbindir}/rtstat
63 for lib in tc/q_atm.so tc/m_xt.so; do
64 install -v -m 755 ${lib} %{BUILDROOT}%{libdir}/tc
66 ln -svf m_xt.so %{BUILDROOT}%{libdir}/tc/m_ipt.so
69 install -v -m 644 include/libnetlink.h %{BUILDROOT}%{includedir}
70 install -v -m 644 lib/libnetlink.a %{BUILDROOT}%{libdir}
72 # Install documentation.
73 install -v -m 644 man/man3/*.3 %{BUILDROOT}%{mandir}/man3
74 install -v -m 644 man/man8/*.8 %{BUILDROOT}%{mandir}/man8
75 ln -svf lnstat.8 %{BUILDROOT}%{mandir}/man8/ctstat.8
76 ln -svf lnstat.8 %{BUILDROOT}%{mandir}/man8/rtstat.8
77 ln -svf routel.8 %{BUILDROOT}%{mandir}/man8/routef.8
79 for sh in netem/normal.dist netem/pareto.dist netem/paretonormal.dist; do
80 install -v -m 644 ${sh} %{BUILDROOT}%{datadir}/tc
83 # Install configuration.
84 install -v -m 644 etc/iproute2/* %{BUILDROOT}%{sysconfdir}/iproute2
89 %{libdir}/libnetlink.a
97 configfiles = %{sysconfdir}/iproute2
100 package %{name}-devel
104 package %{name}-debuginfo