New upstream version 18.11
[deb_dpdk.git] / pkg / dpdk.spec
1 # SPDX-License-Identifier: BSD-3-Clause
2 # Copyright 2014 6WIND S.A.
3
4 Name: dpdk
5 Version: 18.11
6 Release: 1
7 Packager: packaging@6wind.com
8 URL: http://dpdk.org
9 Source: http://dpdk.org/browse/dpdk/snapshot/dpdk-%{version}.tar.gz
10
11 Summary: Data Plane Development Kit core
12 Group: System Environment/Libraries
13 License: BSD and LGPLv2 and GPLv2
14
15 ExclusiveArch: i686 x86_64 aarch64
16 %ifarch aarch64
17 %global machine armv8a
18 %global target arm64-%{machine}-linuxapp-gcc
19 %global config arm64-%{machine}-linuxapp-gcc
20 %else
21 %global machine default
22 %global target %{_arch}-%{machine}-linuxapp-gcc
23 %global config %{_arch}-native-linuxapp-gcc
24 %endif
25
26 BuildRequires: kernel-devel, kernel-headers, libpcap-devel
27 BuildRequires: doxygen, python-sphinx, inkscape
28 BuildRequires: texlive-collection-latexextra
29
30 %description
31 DPDK core includes kernel modules, core libraries and tools.
32 testpmd application allows to test fast packet processing environments
33 on x86 platforms. For instance, it can be used to check that environment
34 can support fast path applications such as 6WINDGate, pktgen, rumptcpip, etc.
35 More libraries are available as extensions in other packages.
36
37 %package devel
38 Summary: Data Plane Development Kit for development
39 Requires: %{name}%{?_isa} = %{version}-%{release}
40 %description devel
41 DPDK devel is a set of makefiles, headers and examples
42 for fast packet processing on x86 platforms.
43
44 %package doc
45 Summary: Data Plane Development Kit API documentation
46 BuildArch: noarch
47 %description doc
48 DPDK doc is divided in two parts: API details in doxygen HTML format
49 and guides in sphinx HTML/PDF formats.
50
51 %prep
52 %setup -q
53
54 %build
55 make O=%{target} T=%{config} config
56 sed -ri 's,(RTE_MACHINE=).*,\1%{machine},' %{target}/.config
57 sed -ri 's,(RTE_APP_TEST=).*,\1n,'         %{target}/.config
58 sed -ri 's,(RTE_BUILD_SHARED_LIB=).*,\1y,' %{target}/.config
59 sed -ri 's,(RTE_NEXT_ABI=).*,\1n,'         %{target}/.config
60 sed -ri 's,(LIBRTE_VHOST=).*,\1y,'         %{target}/.config
61 sed -ri 's,(LIBRTE_PMD_PCAP=).*,\1y,'      %{target}/.config
62 make O=%{target} %{?_smp_mflags}
63 make O=%{target} doc
64
65 %install
66 rm -rf %{buildroot}
67 make install O=%{target} DESTDIR=%{buildroot} \
68         prefix=%{_prefix} bindir=%{_bindir} sbindir=%{_sbindir} \
69         includedir=%{_includedir}/dpdk libdir=%{_libdir} \
70         datadir=%{_datadir}/dpdk docdir=%{_docdir}/dpdk
71
72 %files
73 %dir %{_datadir}/dpdk
74 %{_datadir}/dpdk/usertools
75 /lib/modules/%(uname -r)/extra/*
76 %{_sbindir}/*
77 %{_bindir}/*
78 %{_libdir}/*
79
80 %files devel
81 %{_includedir}/dpdk
82 %{_datadir}/dpdk/mk
83 %{_datadir}/dpdk/buildtools
84 %{_datadir}/dpdk/%{target}
85 %{_datadir}/dpdk/examples
86
87 %files doc
88 %doc %{_docdir}/dpdk
89
90 %post
91 /sbin/ldconfig
92 /sbin/depmod
93
94 %postun
95 /sbin/ldconfig
96 /sbin/depmod