Remove docs
[platform/upstream/iproute2.git] / packaging / iproute2.spec
1 Name:           iproute2
2 Version:        3.4.0
3 Release:        0
4 License:        GPL-2.0
5 Summary:        Linux network configuration utilities
6 Url:            http://www.linuxfoundation.org/collaborate/workgroups/networking/iproute2
7 Group:          Productivity/Networking/Routing
8 # Using GPL-2.0 instead of GPL-2.0+ because of tc_skbedit.h and tc/q_multiq.c
9
10 #DL-URL:        http://kernel.org/pub/linux/utils/net/iproute2/
11 #Git-Clone:     git://git.kernel.org/pub/scm/linux/kernel/git/shemminger/iproute2
12 Source:         %{name}-%{version}.tar.xz
13 BuildRequires:  bison
14 BuildRequires:  db4-devel
15 BuildRequires:  flex
16 BuildRequires:  libnl-devel
17 BuildRequires:  pkgconfig >= 0.21
18 BuildRequires:  xz
19 BuildRequires:  pkgconfig(libpng12)
20 BuildRequires:  pkgconfig(libtiff-4)
21 BuildRequires:  pkgconfig(xtables)
22 Provides:       iproute = %{version}
23
24 %description
25 This package provides the tools ip, tc, and rtmon needed to use the new
26 and advanced routing options of the Linux kernel. The SUSE Linux
27 distribution has used this package for network setup since SuSE Linux
28 8.0.
29
30 %package -n libnetlink-devel
31 License:        GPL-2.0+
32 Summary:        A Higher Level Interface to the Netlink Service
33 Group:          Development/Libraries/C and C++
34 Provides:       libnetlink = %{version}
35
36 %description -n libnetlink-devel
37 libnetlink provides a higher level interface to rtnetlink(7).
38
39 %prep
40 %setup -q
41 find . -name *.orig -delete
42
43 %build
44 # build with -fPIC. For details see
45 # https://bugzilla.novell.com/show_bug.cgi?id=388021
46 ./configure
47 xtlibdir="$(pkg-config xtables --variable=xtlibdir)";
48 make %{?_smp_mflags} LIBDIR=%{_libdir} CCOPTS="-D_GNU_SOURCE %{optflags} -Wstrict-prototypes -fPIC -DXT_LIB_DIR=\\\"$xtlibdir\\\""
49
50 %install
51 install -d %{buildroot}/{etc/,sbin/,usr/{sbin,share/man/man{3,8}}}
52 install -d %{buildroot}/{/usr/include,%{_libdir},/usr/share}
53 make install DESTDIR=%{buildroot} LIBDIR=%{_libdir} \
54         MODDESTDIR="%{buildroot}/%{_libdir}/tc"
55 # We have m_xt
56 rm -f "%{buildroot}/%{_libdir}/tc/m_ipt.so"
57 install lib/libnetlink.a %{buildroot}/%{_libdir}
58 chmod -x %{buildroot}/%{_libdir}/libnetlink.a
59 install include/libnetlink.h %{buildroot}%{_includedir}
60 chmod -x %{buildroot}%{_includedir}/libnetlink.h
61 rm %{buildroot}%{_sbindir}/ifcfg
62 %remove_docs
63
64
65 %files
66 %defattr(-,root,root)
67 %license COPYING
68 %{_sbindir}/*
69 %dir %{_sysconfdir}/iproute2
70 %config(noreplace) %{_sysconfdir}/iproute2/*
71 %{_libdir}/tc
72 %dir %{_datadir}/tc
73 %attr(644,root,root)%{_datadir}/tc/*
74
75
76 %files -n libnetlink-devel
77 %defattr(-,root,root)
78 %{_includedir}/*
79 %{_libdir}/lib*
80
81 %docs_package