]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blob - iproute2/iproute2.nm
grep: Update to version 2.18.
[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.5.1
8 release = 3
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 db4-devel
28 flex
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/_VERSION_/%{version}/" -i man/man8/ss.8
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 genl/genl ip/{ifcfg,ip,routef,routel,rtmon,rtpr} tc/tc \
56 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
86 # bridge should be installed as 'br', following upstream
87 install -v -m 755 bridge/bridge %{BUILDROOT}%{sbindir}/br
88 end
89
90 # Keep libnetlink.a.
91 keep_libraries
92 %{libdir}/libnetlink.a
93 end
94 end
95
96 packages
97 package %{name}
98 groups += Base
99
100 configfiles = %{sysconfdir}/iproute2
101 end
102
103 package %{name}-devel
104 template DEVEL
105 end
106
107 package %{name}-debuginfo
108 template DEBUGINFO
109 end
110 end