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
34 sed -e "s/^LIBDIR=/LIBDIR?=/" -i Makefile
37 export RPM_OPT_FLAGS = %{CFLAGS}
38 export LIBDIR = %{libdir}
39 export IPT_LIB_DIR = %{libdir}/xtables
42 # The installation routine that comes with that package
43 # is totally unusable for use, so do it manually.
46 %{BUILDROOT}%{includedir} \
47 %{BUILDROOT}%{sbindir} \
48 %{BUILDROOT}%{mandir}/man{3,8} \
49 %{BUILDROOT}%{datadir}/tc \
50 %{BUILDROOT}%{libdir}/tc \
51 %{BUILDROOT}%{sysconfdir}/iproute2
54 for bin in bridge/bridge genl/genl ip/{ifcfg,ip,routef,routel,rtmon,rtpr} \
55 tc/tc misc/{arpd,ifstat,lnstat,nstat,rtacct,ss}; do
56 install -v -m 755 ${bin} %{BUILDROOT}%{sbindir}
58 ln -svf lnstat %{BUILDROOT}%{sbindir}/ctstat
59 ln -svf lnstat %{BUILDROOT}%{sbindir}/rtstat
62 install -v -m 755 tc/q_atm.so %{BUILDROOT}%{libdir}/tc
65 install -v -m 644 include/libnetlink.h %{BUILDROOT}%{includedir}
66 install -v -m 644 lib/libnetlink.a %{BUILDROOT}%{libdir}
68 # Install documentation.
69 install -v -m 644 man/man3/*.3 %{BUILDROOT}%{mandir}/man3
70 install -v -m 644 man/man8/*.8 %{BUILDROOT}%{mandir}/man8
71 ln -svf lnstat.8 %{BUILDROOT}%{mandir}/man8/ctstat.8
72 ln -svf lnstat.8 %{BUILDROOT}%{mandir}/man8/rtstat.8
73 ln -svf routel.8 %{BUILDROOT}%{mandir}/man8/routef.8
75 for sh in netem/normal.dist netem/pareto.dist netem/paretonormal.dist; do
76 install -v -m 644 ${sh} %{BUILDROOT}%{datadir}/tc
79 # Install configuration.
80 install -v -m 644 etc/iproute2/* %{BUILDROOT}%{sysconfdir}/iproute2
85 %{libdir}/libnetlink.a
93 configfiles = %{sysconfdir}/iproute2
100 package %{name}-debuginfo