add --without doc option
because EL8 does not have necessary build dependencies yet, sphinx3-breathe and nodejs-less, for instance. so add "--without doc" option to disable the doc build. Signed-off-by: Kefu Chai <tchaikov@gmail.com>
This commit is contained in:
parent
482a077115
commit
87706d77ed
10
fmt.spec
10
fmt.spec
@ -1,3 +1,4 @@
|
|||||||
|
%bcond_without doc
|
||||||
Name: fmt
|
Name: fmt
|
||||||
Version: 6.2.0
|
Version: 6.2.0
|
||||||
Release: 2%{?dist}
|
Release: 2%{?dist}
|
||||||
@ -23,7 +24,7 @@ BuildRequires: cmake3
|
|||||||
%else
|
%else
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
%endif
|
%endif
|
||||||
# For building documentation
|
%if %{with doc}
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: nodejs-less
|
BuildRequires: nodejs-less
|
||||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||||
@ -33,6 +34,7 @@ BuildRequires: python%{python3_version_nodots}-breathe
|
|||||||
BuildRequires: python3-sphinx
|
BuildRequires: python3-sphinx
|
||||||
BuildRequires: python3-breathe
|
BuildRequires: python3-breathe
|
||||||
%endif
|
%endif
|
||||||
|
%endif
|
||||||
|
|
||||||
# This package replaces the old name of cppformat
|
# This package replaces the old name of cppformat
|
||||||
Provides: cppformat = %{version}-%{release}
|
Provides: cppformat = %{version}-%{release}
|
||||||
@ -53,6 +55,7 @@ Obsoletes: cppformat-devel < %{version}-%{release}
|
|||||||
%description devel
|
%description devel
|
||||||
This package contains the header file for using %{name}.
|
This package contains the header file for using %{name}.
|
||||||
|
|
||||||
|
%if %{with doc}
|
||||||
%package doc
|
%package doc
|
||||||
Summary: Documentation files for %{name}
|
Summary: Documentation files for %{name}
|
||||||
License: Python
|
License: Python
|
||||||
@ -64,6 +67,7 @@ Obsoletes: cppformat-doc < %{version}-%{release}
|
|||||||
|
|
||||||
%description doc
|
%description doc
|
||||||
This package contains documentation for developer documentation for %{name}.
|
This package contains documentation for developer documentation for %{name}.
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1
|
%autosetup -p1
|
||||||
@ -81,11 +85,13 @@ pushd build
|
|||||||
-DFMT_CMAKE_DIR=%{_datadir}/cmake/%{name} \
|
-DFMT_CMAKE_DIR=%{_datadir}/cmake/%{name} \
|
||||||
-DFMT_LIB_DIR=%{_libdir}
|
-DFMT_LIB_DIR=%{_libdir}
|
||||||
|
|
||||||
|
%if %{with doc}
|
||||||
# Remove --clean-css since that plugin isn't available
|
# Remove --clean-css since that plugin isn't available
|
||||||
sed -i "s/'--clean-css',//" ../doc/build.py
|
sed -i "s/'--clean-css',//" ../doc/build.py
|
||||||
%make_build all doc
|
%make_build all doc
|
||||||
# Remove temporary build products
|
# Remove temporary build products
|
||||||
rm -rf ../build/doc/html/{.buildinfo,.doctrees,objects.inv}
|
rm -rf ../build/doc/html/{.buildinfo,.doctrees,objects.inv}
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%make_install -C build
|
%make_install -C build
|
||||||
@ -106,9 +112,11 @@ popd
|
|||||||
%{_datadir}/cmake/%{name}
|
%{_datadir}/cmake/%{name}
|
||||||
%{_libdir}/pkgconfig/%{name}.pc
|
%{_libdir}/pkgconfig/%{name}.pc
|
||||||
|
|
||||||
|
%if %{with doc}
|
||||||
%files doc
|
%files doc
|
||||||
%doc %{_datadir}/doc/%{name}
|
%doc %{_datadir}/doc/%{name}
|
||||||
%license doc/python-license.txt
|
%license doc/python-license.txt
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Thu Apr 30 2020 Kefu Chai <tchaikov@gmail.com> - 6.2.0-2
|
* Thu Apr 30 2020 Kefu Chai <tchaikov@gmail.com> - 6.2.0-2
|
||||||
|
Loading…
Reference in New Issue
Block a user