]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - iproute2/iproute2.nm
ppp: Re-add ifname patch
[people/ms/ipfire-3.x.git] / iproute2 / iproute2.nm
1 ###############################################################################
2 # IPFire.org - An Open Source Firewall Solution #
3 # Copyright (C) - IPFire Development Team <info@ipfire.org> #
4 ###############################################################################
5
6 name = iproute2
7 version = 3.14.0
8 release = 1
9
10 groups = Networking/Tools
11 url = http://www.linuxfoundation.org/en/Net:Iproute2
12 license = GPLv2+
13 summary = Advanced IP routing and network device configuration tools.
14
15 description
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.
19 end
20
21 source_dl = http://kernel.org/pub/linux/utils/net/iproute2/
22 sources = %{thisapp}.tar.xz
23
24 build
25 requires
26 bison
27 flex
28 libdb-devel
29 libnl-devel
30 linux-atm-devel >= 2.5.1
31 iptables-devel >= 1.4.19
32 end
33
34 prepare_cmds
35 sed -e "s/^LIBDIR=/LIBDIR?=/" -i Makefile
36 end
37
38 export RPM_OPT_FLAGS = %{CFLAGS}
39 export LIBDIR = %{libdir}
40 export IPT_LIB_DIR = %{libdir}/xtables
41
42 install
43 # The installation routine that comes with that package
44 # is totally unusable for use, so do it manually.
45
46 mkdir -pv \
47 %{BUILDROOT}%{includedir} \
48 %{BUILDROOT}%{sbindir} \
49 %{BUILDROOT}%{mandir}/man{3,8} \
50 %{BUILDROOT}%{datadir}/tc \
51 %{BUILDROOT}%{libdir}/tc \
52 %{BUILDROOT}%{sysconfdir}/iproute2
53
54 # Install binaries.
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}
58 done
59 ln -svf lnstat %{BUILDROOT}%{sbindir}/ctstat
60 ln -svf lnstat %{BUILDROOT}%{sbindir}/rtstat
61
62 # Install libs.
63 for lib in tc/q_atm.so tc/m_xt.so; do
64 install -v -m 755 ${lib} %{BUILDROOT}%{libdir}/tc
65 done
66 ln -svf m_xt.so %{BUILDROOT}%{libdir}/tc/m_ipt.so
67
68 # libnetlink
69 install -v -m 644 include/libnetlink.h %{BUILDROOT}%{includedir}
70 install -v -m 644 lib/libnetlink.a %{BUILDROOT}%{libdir}
71
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
78
79 for sh in netem/normal.dist netem/pareto.dist netem/paretonormal.dist; do
80 install -v -m 644 ${sh} %{BUILDROOT}%{datadir}/tc
81 done
82
83 # Install configuration.
84 install -v -m 644 etc/iproute2/* %{BUILDROOT}%{sysconfdir}/iproute2
85 end
86
87 # Keep libnetlink.a.
88 keep_libraries
89 %{libdir}/libnetlink.a
90 end
91 end
92
93 packages
94 package %{name}
95 groups += Base
96
97 configfiles = %{sysconfdir}/iproute2
98 end
99
100 package %{name}-devel
101 template DEVEL
102 end
103
104 package %{name}-debuginfo
105 template DEBUGINFO
106 end
107 end