Use python macro instead of rpm query

Rpm might prevent access to rpm database during the build. It is not
required anyway. Use %python3_sitelib macro to get path for shared data.
This commit is contained in:
Petr Menšík 2020-11-26 16:19:35 +01:00
parent d553bc086f
commit 91193796e7

View File

@ -764,8 +764,7 @@ mkdir -p ${RPM_BUILD_ROOT}%{_pkgdocdir}
cp -a build/doc/arm/_build/html ${RPM_BUILD_ROOT}%{_pkgdocdir}
rm -rf ${RPM_BUILD_ROOT}%{_pkgdocdir}/html/.{buildinfo,doctrees}
# Share static data from original sphinx package
THEMEDIR=$(rpm -ql python3-sphinx_rtd_theme | grep 'sphinx_rtd_theme/static$')
for DIR in "$THEMEDIR"/*
for DIR in %{python3_sitelib}/sphinx_rtd_theme/static/*
do
BASE=$(basename -- "$DIR")
BINDTHEMEDIR="${RPM_BUILD_ROOT}%{_pkgdocdir}/html/_static/$BASE"