rpmbuild: Add wrapper function for copying .so files

Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I0c8b5549080c1617a5eb0c1cc6145af6f1b0845d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14801
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com>
This commit is contained in:
Michal Berger 2022-09-30 11:25:45 +02:00 committed by Tomasz Zawadzki
parent cd9266403a
commit 23019242d7

View File

@ -67,6 +67,12 @@ cfs() {
shift; for f; do [[ -e $f ]] && cp -a "$f" "$dst"; done
}
cl() {
[[ -e $2 ]] || return 0
cfs "$1" $(find "$2" -name '*.so*' -type f -o -type l | grep -v .symbols)
}
%if %{deps}
./scripts/pkgdep.sh --docs --pmem --rdma --uring
%endif
@ -80,13 +86,13 @@ make DESTDIR=%{buildroot} install %{make}
%if %{dpdk}
cfs %{buildroot}/usr/local/lib/dpdk %{dpdk_build_path}/lib/*
# Special case for SPDK_RUN_EXTERNAL_DPDK setup
cfs %{buildroot}/usr/local/lib/dpdk $(find %{dpdk_path}/intel-ipsec-mb/ -name '*.so*')
cfs %{buildroot}/usr/local/lib/dpdk $(find %{dpdk_path}/isa-l/ -name '*.so*')
cl %{buildroot}/usr/local/lib/dpdk %{dpdk_path}/intel-ipsec-mb/
cl %{buildroot}/usr/local/lib/dpdk %{dpdk_path}/isa-l/
%endif
# Include libvfio-user libs in case --with-vfio-user is in use together with --with-shared
%if %{vfio_user} && %{shared}
cfs %{buildroot}/usr/local/lib/libvfio-user $(find build/libvfio-user/ -name '*.so*' | grep -v .symbols)
cl %{buildroot}/usr/local/lib/libvfio-user build/libvfio-user/
%endif
# Try to include extra binaries that were potentially built
cfs %{buildroot}/usr/local/bin build/fio