dpdk.spec: Move the sdk libraries into the system library directory
Ensure that the DPDK libraries, including the combined library, are found at the system library path. Signed-off-by: Aaron Conole <aconole@redhat.com> Acked-by: Neil Horman <nhorman@redhat.com> Acked-by: Panu Matilainen <pmatilai@redhat.com>
This commit is contained in:
parent
4a192f9082
commit
b6c6c73d13
37
dpdk.spec
37
dpdk.spec
@ -115,26 +115,38 @@ make V=1 O=%{target} %{?_smp_mflags} doc-api-html doc-guides-html %{?with_pdfdoc
|
|||||||
# DPDK's "make install" seems a bit broken -- do things manually...
|
# DPDK's "make install" seems a bit broken -- do things manually...
|
||||||
|
|
||||||
mkdir -p %{buildroot}%{_bindir}
|
mkdir -p %{buildroot}%{_bindir}
|
||||||
cp -a %{target}/app/testpmd %{buildroot}%{_bindir}/testpmd-%{version}
|
cp -a %{target}/app/testpmd %{buildroot}%{_bindir}/testpmd
|
||||||
mkdir -p %{buildroot}%{_includedir}/%{name}-%{version}
|
mkdir -p %{buildroot}%{_includedir}/%{name}-%{version}
|
||||||
cp -Lr %{target}/include/* %{buildroot}%{_includedir}/%{name}-%{version}
|
cp -Lr %{target}/include/* %{buildroot}%{_includedir}/%{name}-%{version}
|
||||||
mkdir -p %{buildroot}%{_libdir}/%{name}-%{version}
|
mkdir -p %{buildroot}%{_libdir}
|
||||||
cp -a %{target}/lib/* %{buildroot}%{_libdir}/%{name}-%{version}
|
cp -a %{target}/lib/* %{buildroot}%{_libdir}
|
||||||
mkdir -p %{buildroot}%{docdir}
|
mkdir -p %{buildroot}%{docdir}
|
||||||
cp -a %{target}/doc/* %{buildroot}%{docdir}
|
cp -a %{target}/doc/* %{buildroot}%{docdir}
|
||||||
|
|
||||||
|
%if %{with shared}
|
||||||
|
libext=so
|
||||||
|
%else
|
||||||
|
libext=a
|
||||||
|
%endif
|
||||||
|
|
||||||
# DPDK apps expect a particular (and somewhat peculiar) directory layout
|
# DPDK apps expect a particular (and somewhat peculiar) directory layout
|
||||||
# for building, arrange for that
|
# for building, arrange for that
|
||||||
mkdir -p %{buildroot}%{sdkdir}/%{target}
|
mkdir -p %{buildroot}%{sdkdir}/%{target}
|
||||||
|
mkdir -p %{buildroot}%{sdkdir}/lib
|
||||||
cp -a %{target}/.config %{buildroot}%{sdkdir}/%{target}
|
cp -a %{target}/.config %{buildroot}%{sdkdir}/%{target}
|
||||||
ln -s ../lib %{buildroot}%{sdkdir}/%{target}/lib
|
ln -s ../lib %{buildroot}%{sdkdir}/%{target}/lib
|
||||||
ln -s ../../include/%{name}-%{version} %{buildroot}%{sdkdir}/include
|
ln -s ../../include/%{name}-%{version} %{buildroot}%{sdkdir}/include
|
||||||
ln -s ../../../%{_lib}/%{name}-%{version} %{buildroot}%{sdkdir}/%{target}/lib
|
|
||||||
ln -s ../../../include/%{name}-%{version} %{buildroot}%{sdkdir}/%{target}/include
|
ln -s ../../../include/%{name}-%{version} %{buildroot}%{sdkdir}/%{target}/include
|
||||||
cp -a mk/ %{buildroot}%{sdkdir}
|
cp -a mk/ %{buildroot}%{sdkdir}
|
||||||
mkdir -p %{buildroot}%{sdkdir}/scripts
|
mkdir -p %{buildroot}%{sdkdir}/scripts
|
||||||
cp -a scripts/*.sh %{buildroot}%{sdkdir}/scripts
|
cp -a scripts/*.sh %{buildroot}%{sdkdir}/scripts
|
||||||
|
|
||||||
|
# Create library symlinks for the "sdk"
|
||||||
|
for f in %{buildroot}/%{_libdir}/*.${libext}; do
|
||||||
|
l=`basename ${f}`
|
||||||
|
ln -s ../../${l} %{buildroot}%{sdkdir}/lib/${l}
|
||||||
|
done
|
||||||
|
|
||||||
%if %{with tools}
|
%if %{with tools}
|
||||||
cp -p tools/*.py %{buildroot}%{_bindir}
|
cp -p tools/*.py %{buildroot}%{_bindir}
|
||||||
%endif
|
%endif
|
||||||
@ -173,26 +185,19 @@ find %{buildroot}%{_includedir}/%{name}-%{version} -type f | xargs chmod 0644
|
|||||||
# build resolves into links to the actual used libraries which is just fine
|
# build resolves into links to the actual used libraries which is just fine
|
||||||
# for us, so this combined library is a build-time only construct now.
|
# for us, so this combined library is a build-time only construct now.
|
||||||
|
|
||||||
%if %{with shared}
|
|
||||||
libext=so
|
|
||||||
%else
|
|
||||||
libext=a
|
|
||||||
%endif
|
|
||||||
|
|
||||||
comblib=libintel_dpdk.${libext}
|
comblib=libintel_dpdk.${libext}
|
||||||
|
|
||||||
echo "GROUP (" > ${comblib}
|
echo "GROUP (" > ${comblib}
|
||||||
find %{buildroot}/%{_libdir}/%{name}-%{version}/ -name "*.${libext}" |\
|
find %{buildroot}/%{_libdir}/ -name "*.${libext}" |\
|
||||||
sed -e "s:^%{buildroot}/: :g" >> ${comblib}
|
sed -e "s:^%{buildroot}/: :g" >> ${comblib}
|
||||||
echo ")" >> ${comblib}
|
echo ")" >> ${comblib}
|
||||||
install -m 644 ${comblib} %{buildroot}/%{_libdir}/%{name}-%{version}/${comblib}
|
install -m 755 ${comblib} %{buildroot}/%{_libdir}/${comblib}
|
||||||
|
|
||||||
%files
|
%files
|
||||||
# BSD
|
# BSD
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
%dir %{_libdir}/%{name}-%{version}
|
|
||||||
%if %{with shared}
|
%if %{with shared}
|
||||||
%{_libdir}/%{name}-%{version}/*.so.*
|
%{_libdir}/*.so.*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
@ -205,9 +210,9 @@ install -m 644 ${comblib} %{buildroot}/%{_libdir}/%{name}-%{version}/${comblib}
|
|||||||
%{sdkdir}
|
%{sdkdir}
|
||||||
%{_sysconfdir}/profile.d/dpdk-sdk-*.*
|
%{_sysconfdir}/profile.d/dpdk-sdk-*.*
|
||||||
%if ! %{with shared}
|
%if ! %{with shared}
|
||||||
%{_libdir}/%{name}-%{version}/*.a
|
%{_libdir}/*.a
|
||||||
%else
|
%else
|
||||||
%{_libdir}/%{name}-%{version}/*.so
|
%{_libdir}/*.so
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if %{with tools}
|
%if %{with tools}
|
||||||
|
Loading…
Reference in New Issue
Block a user