############################################################################### # IPFire.org - An Open Source Firewall Solution # # Copyright (C) - IPFire Development Team # ############################################################################### name = iproute2 version = 3.14.0 release = 1 groups = Networking/Tools url = http://www.linuxfoundation.org/en/Net:Iproute2 license = GPLv2+ summary = Advanced IP routing and network device configuration tools. description The iproute package contains networking utilities (ip and rtmon, for example) which are designed to use the advanced networking capabilities of the Linux 2.4.x and 2.6.x kernel. end source_dl = http://kernel.org/pub/linux/utils/net/iproute2/ sources = %{thisapp}.tar.xz build requires bison flex libdb-devel libnl-devel linux-atm-devel >= 2.5.1 iptables-devel >= 1.4.19 end prepare_cmds sed -e "s/^LIBDIR=/LIBDIR?=/" -i Makefile end export RPM_OPT_FLAGS = %{CFLAGS} export LIBDIR = %{libdir} export IPT_LIB_DIR = %{libdir}/xtables install # The installation routine that comes with that package # is totally unusable for use, so do it manually. mkdir -pv \ %{BUILDROOT}%{includedir} \ %{BUILDROOT}%{sbindir} \ %{BUILDROOT}%{mandir}/man{3,8} \ %{BUILDROOT}%{datadir}/tc \ %{BUILDROOT}%{libdir}/tc \ %{BUILDROOT}%{sysconfdir}/iproute2 # Install binaries. for bin in bridge/bridge genl/genl ip/{ifcfg,ip,routef,routel,rtmon,rtpr} \ tc/tc misc/{arpd,ifstat,lnstat,nstat,rtacct,ss}; do install -v -m 755 ${bin} %{BUILDROOT}%{sbindir} done ln -svf lnstat %{BUILDROOT}%{sbindir}/ctstat ln -svf lnstat %{BUILDROOT}%{sbindir}/rtstat # Install libs. for lib in tc/q_atm.so tc/m_xt.so; do install -v -m 755 ${lib} %{BUILDROOT}%{libdir}/tc done ln -svf m_xt.so %{BUILDROOT}%{libdir}/tc/m_ipt.so # libnetlink install -v -m 644 include/libnetlink.h %{BUILDROOT}%{includedir} install -v -m 644 lib/libnetlink.a %{BUILDROOT}%{libdir} # Install documentation. install -v -m 644 man/man3/*.3 %{BUILDROOT}%{mandir}/man3 install -v -m 644 man/man8/*.8 %{BUILDROOT}%{mandir}/man8 ln -svf lnstat.8 %{BUILDROOT}%{mandir}/man8/ctstat.8 ln -svf lnstat.8 %{BUILDROOT}%{mandir}/man8/rtstat.8 ln -svf routel.8 %{BUILDROOT}%{mandir}/man8/routef.8 for sh in netem/normal.dist netem/pareto.dist netem/paretonormal.dist; do install -v -m 644 ${sh} %{BUILDROOT}%{datadir}/tc done # Install configuration. install -v -m 644 etc/iproute2/* %{BUILDROOT}%{sysconfdir}/iproute2 end # Keep libnetlink.a. keep_libraries %{libdir}/libnetlink.a end end packages package %{name} groups += Base configfiles = %{sysconfdir}/iproute2 end package %{name}-devel template DEVEL end package %{name}-debuginfo template DEBUGINFO end end