Share static data in doc package
Fonts add unnecessary size to doc package. Instead of local copy, link to theme package static directory and reuse data already installed.
This commit is contained in:
parent
89421c0410
commit
ef5c71f941
20
bind.spec
20
bind.spec
@ -69,7 +69,7 @@ Summary: The Berkeley Internet Name Domain (BIND) DNS (Domain Name System) serv
|
|||||||
Name: bind
|
Name: bind
|
||||||
License: MPLv2.0
|
License: MPLv2.0
|
||||||
Version: 9.16.6
|
Version: 9.16.6
|
||||||
Release: 1%{?PATCHVER:.%{PATCHVER}}%{?PREVER:.%{PREVER}}%{?dist}
|
Release: 2%{?PATCHVER:.%{PATCHVER}}%{?PREVER:.%{PREVER}}%{?dist}
|
||||||
Epoch: 32
|
Epoch: 32
|
||||||
Url: https://www.isc.org/downloads/bind/
|
Url: https://www.isc.org/downloads/bind/
|
||||||
#
|
#
|
||||||
@ -428,6 +428,7 @@ This package provides a module which allows commands to be sent to rndc directly
|
|||||||
%package doc
|
%package doc
|
||||||
Summary: Documentation for BIND
|
Summary: Documentation for BIND
|
||||||
Requires: bind-license = %{epoch}:%{version}-%{release}
|
Requires: bind-license = %{epoch}:%{version}-%{release}
|
||||||
|
Requires: python3-sphinx_rtd_theme
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
%description doc
|
%description doc
|
||||||
@ -817,8 +818,18 @@ popd
|
|||||||
%if %{with DOC}
|
%if %{with DOC}
|
||||||
mkdir -p ${RPM_BUILD_ROOT}%{_pkgdocdir}
|
mkdir -p ${RPM_BUILD_ROOT}%{_pkgdocdir}
|
||||||
cp -a build/doc/arm/_build/html ${RPM_BUILD_ROOT}%{_pkgdocdir}
|
cp -a build/doc/arm/_build/html ${RPM_BUILD_ROOT}%{_pkgdocdir}
|
||||||
cp -a build/doc/man/_build/html ${RPM_BUILD_ROOT}%{_pkgdocdir}/html/man
|
rm -rf ${RPM_BUILD_ROOT}%{_pkgdocdir}/html/.{buildinfo,doctrees}
|
||||||
rm -rf ${RPM_BUILD_ROOT}%{_pkgdocdir}/html{,/man}/.{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"/*
|
||||||
|
do
|
||||||
|
BASE=$(basename -- "$DIR")
|
||||||
|
BINDTHEMEDIR="${RPM_BUILD_ROOT}%{_pkgdocdir}/html/_static/$BASE"
|
||||||
|
if [ -d "$BINDTHEMEDIR" ]; then
|
||||||
|
rm -rf "$BINDTHEMEDIR"
|
||||||
|
ln -s "$DIR" "$BINDTHEMEDIR"
|
||||||
|
fi
|
||||||
|
done
|
||||||
%endif
|
%endif
|
||||||
%if %{with DOCPDF}
|
%if %{with DOCPDF}
|
||||||
cp -a build/doc/arm/Bv9ARM.pdf ${RPM_BUILD_ROOT}%{_pkgdocdir}
|
cp -a build/doc/arm/Bv9ARM.pdf ${RPM_BUILD_ROOT}%{_pkgdocdir}
|
||||||
@ -1227,6 +1238,9 @@ fi;
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Sep 14 2020 Petr Menšík <pemensik@redhat.com> - 32:9.16.6-2
|
||||||
|
- Share static data in doc package
|
||||||
|
|
||||||
* Sat Aug 22 2020 Petr Menšík <pemensik@redhat.com> - 32:9.16.6-1
|
* Sat Aug 22 2020 Petr Menšík <pemensik@redhat.com> - 32:9.16.6-1
|
||||||
- Update to 9.16.6
|
- Update to 9.16.6
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user