]>
Commit | Line | Data |
---|---|---|
a9d112c3 | 1 | ############################################################################### |
802ea3af MT |
2 | # IPFire.org - An Open Source Firewall Solution # |
3 | # Copyright (C) - IPFire Development Team <info@ipfire.org> # | |
a9d112c3 MT |
4 | ############################################################################### |
5 | ||
802ea3af | 6 | name = iproute2 |
4c08cf3e | 7 | version = 3.5.1 |
f3a8f771 | 8 | release = 3 |
a9d112c3 | 9 | |
4bfc4e7c | 10 | groups = Networking/Tools |
802ea3af MT |
11 | url = http://www.linuxfoundation.org/en/Net:Iproute2 |
12 | license = GPLv2+ | |
13 | summary = Advanced IP routing and network device configuration tools. | |
a9d112c3 | 14 | |
802ea3af | 15 | description |
a9d112c3 MT |
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. | |
802ea3af MT |
19 | end |
20 | ||
c33262e9 | 21 | source_dl = http://kernel.org/pub/linux/utils/net/iproute2/ |
d5598cce | 22 | sources = %{thisapp}.tar.xz |
802ea3af MT |
23 | |
24 | build | |
25 | requires | |
26 | bison | |
27 | db4-devel | |
28 | flex | |
d5598cce MT |
29 | libnl-devel |
30 | linux-atm-devel >= 2.5.1 | |
f3a8f771 | 31 | iptables-devel >= 1.4.19 |
802ea3af MT |
32 | end |
33 | ||
34 | prepare_cmds | |
4c08cf3e | 35 | sed -e "s/_VERSION_/%{version}/" -i man/man8/ss.8 |
802ea3af MT |
36 | end |
37 | ||
d5598cce MT |
38 | export RPM_OPT_FLAGS = %{CFLAGS} |
39 | export LIBDIR = %{libdir} | |
40 | export IPT_LIB_DIR = %{libdir}/xtables | |
41 | ||
802ea3af | 42 | install |
d5598cce MT |
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. | |
c33262e9 | 55 | for bin in genl/genl ip/{ifcfg,ip,routef,routel,rtmon,rtpr} tc/tc \ |
d5598cce MT |
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 | |
4c08cf3e MT |
85 | |
86 | # bridge should be installed as 'br', following upstream | |
87 | install -v -m 755 bridge/bridge %{BUILDROOT}%{sbindir}/br | |
d5598cce MT |
88 | end |
89 | ||
90 | # Keep libnetlink.a. | |
91 | keep_libraries | |
92 | %{libdir}/libnetlink.a | |
802ea3af MT |
93 | end |
94 | end | |
95 | ||
96 | packages | |
97 | package %{name} | |
4bfc4e7c | 98 | groups += Base |
d5598cce MT |
99 | |
100 | configfiles = %{sysconfdir}/iproute2 | |
101 | end | |
102 | ||
103 | package %{name}-devel | |
104 | template DEVEL | |
802ea3af | 105 | end |
1f9bc2f0 MT |
106 | |
107 | package %{name}-debuginfo | |
108 | template DEBUGINFO | |
109 | end | |
802ea3af | 110 | end |