1 %define _vpp_install_dir ../install-vpp-native
2 %define _vpp_build_dir ../build-tool-native
3 %define _unitdir /lib/systemd/system
5 %define _builddir %{_topdir}
6 %define _version %(../scripts/version rpm-version)
7 %define _release %(../scripts/version rpm-release)
10 Summary: Vector Packet Processing
14 Requires: vpp-lib = %{_version}-%{_release}, net-tools, pciutils
17 This package provides VPP executables: vpp, vpp_api_test, vpp_json_test
18 vpp - the vector packet engine
19 vpp_api_test - vector packet engine API test tool
20 vpp_json_test - vector packet engine JSON test tool
23 Summary: VPP libraries
24 Group: System Environment/Libraries
27 This package contains the VPP shared libraries, including:
28 vppinfra - foundation library supporting vectors, hashes, bitmaps, pools, and string formatting.
29 dpdk - Intel DPDK library
31 vlib - vector processing library
32 vlib-api - binary API library
33 vnet - network stack library
36 Summary: VPP header files, static libraries
37 Group: Development/Libraries
41 This package contains the header files and static libraries for
42 vppinfra. Install this package if you want to write or compile a
43 program that needs vpp.
44 Do we need to list those header files or just leave it blank ?
45 dynamic vectors (vec.c), dynamic bitmaps (bitmap.h), allocation heap of
46 objects (heap.c), allocation pool(pool.h), dynamic hash tables (hash.c), memory
47 allocator (mheap.c), extendable printf-like interface built on top of vectors
48 (format.c), formats for data structures (std-formats.c), and support for clock
49 time-based function calls (timer.c).
50 TODO: reference and describe only the .h files
56 mkdir -p -m755 %{buildroot}%{_bindir}
57 mkdir -p -m755 %{buildroot}%{_unitdir}
58 install -p -m 755 %{_vpp_install_dir}/*/bin/* %{buildroot}%{_bindir}
59 install -p -m 755 %{_vpp_build_dir}/vppapigen/vppapigen %{buildroot}%{_bindir}
63 mkdir -p -m755 %{buildroot}/etc/vpp
64 mkdir -p -m755 %{buildroot}/etc/sysctl.d
65 install -p -m 644 vpp.service %{buildroot}%{_unitdir}
66 install -p -m 644 ../../vpp/conf/startup.conf %{buildroot}/etc/vpp
67 install -p -m 644 ../../vpp/conf/80-vpp.conf %{buildroot}/etc/sysctl.d
71 mkdir -p -m755 %{buildroot}%{_libdir}
72 for file in $(find %{_vpp_install_dir}/*/lib* -type f -name '*.so.*.*.*' -print )
74 install -p -m 755 $file %{buildroot}%{_libdir}
76 for file in $(cd %{buildroot}%{_libdir} && find . -type f -print | sed -e 's/^\.\///')
79 ( cd %{buildroot}%{_libdir} &&
80 ln -fs $file $(echo $file | sed -e 's/\(\.so\.[0-9]\+\).*/\1/') )
85 for dir in $(find %{_vpp_install_dir}/*/include/ -maxdepth 0 -type d -print | grep -v dpdk)
87 for subdir in $(cd ${dir} && find . -type d -print)
89 mkdir -p -m755 %{buildroot}/usr/include/${subdir}
91 for file in $(cd ${dir} && find . -type f -print)
93 install -p -m 644 $dir/$file %{buildroot}%{_includedir}/$file
97 mkdir -p -m755 %{buildroot}/usr/share/doc/vpp/examples/sample-plugin/sample
98 for file in $(cd %{_vpp_install_dir}/../../sample-plugin && find -type f -print)
100 install -p -m 644 %{_vpp_install_dir}/../../sample-plugin/$file \
101 %{buildroot}/usr/share/doc/vpp/examples/sample-plugin/$file
106 %systemd_post vpp.service
109 %systemd_postun_with_restart vpp.service
113 %{_unitdir}/vpp.service
117 %config /etc/sysctl.d/80-vpp.conf
118 %config /etc/vpp/startup.conf
128 /usr/share/doc/vpp/examples/sample-plugin