%undefine _missing_build_ids_terminate_build
%undefine __os_install_post
%undefine _auto_set_build_flags
%define _install_dir	/opt/vpp/external/%(uname -m)
%define _make_args	-C build/external INSTALL_DIR=%{buildroot}%{_install_dir}
%if 0%{?openEuler}
%global __strip /usr/bin/eu-strip
%global __brp_strip_static_archive %{_rpmconfigdir}/brp-strip-static-archive /usr/bin/strip
%endif

Name:		vpp-ext-deps
Version:	25.06
Release:	0.110.rc0.20250319git429abe7b0%{?dist}
Summary:	VPP development package with external dependencies
License:	BSD
Source: %{name}-%{version}-rc0~110_g429abe7b0.tar.xz
Source1: https://fast.dpdk.org/rel/dpdk-24.11.1.tar.xz
Source2: https://github.com/intel/intel-ipsec-mb/archive/v2.0.tar.gz
Source3: https://github.com/vpp-quic/quicly/releases/download/v0.1.5-vpp/quicly_0.1.5-vpp.tar.gz
Source4: https://github.com/xdp-project/xdp-tools/releases/download/v1.2.9/xdp-tools-1.2.9.tar.gz
Source5: https://github.com/linux-rdma/rdma-core/releases/download/v55.0/rdma-core-55.0.tar.gz
Source6: https://github.com/MarvellEmbeddedProcessors/marvell-octeon-roc/archive/refs/tags/v0.6.tar.gz
Source7: https://files.pythonhosted.org/packages/5d/0e/0c72dadd01af2da712eb987e2b7662e2e2c2c34fcdfe3cc6d765bddb2db3/meson-0.57.2.tar.gz
Source8: https://files.pythonhosted.org/packages/b8/49/b3b29c52b09075fb77f69309763a563b4054d5808a3f3b95df3a62ef3d3f/setuptools-68.1.0-py3-none-any.whl
Source9: https://files.pythonhosted.org/packages/28/f5/6955d7b3a5d71ce6bac104f9cf98c1b0513ad656cdaca8ea7d579196f771/wheel-0.41.1-py3-none-any.whl
Source10: https://files.pythonhosted.org/packages/04/7c/867630e6e6293793f838b31034aa1875e1c3bd8c1ec34a0929a2506f350c/pyelftools-0.29-py2.py3-none-any.whl
BuildRequires: openssl openssl-devel
BuildRequires: python3-devel libpcap-devel
BuildRequires: libmnl-devel libnl3-devel
BuildRequires: libffi-devel apr-devel numactl-devel
BuildRequires: elfutils-libelf-devel
BuildRequires: libtool byacc bison flex nasm
BuildRequires: clang cmake ninja-build

%description
VPP development package with external dependencies

%prep
%setup -q -n %{name}-%{version}
mkdir build/external/downloads
cp %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} %{SOURCE8} %{SOURCE9} %{SOURCE10} build/external/downloads

%install
make %{_make_args} config
make %{_make_args} install
export QA_SKIP_BUILD_ROOT=1

%files
%{_install_dir}