Bring back kernel-doc
Like a zombie, this is back from the grave. At least bring back the macros for building.
This commit is contained in:
parent
48704bf821
commit
ef71879e7a
49
kernel.spec
49
kernel.spec
@ -97,6 +97,8 @@ Summary: The Linux kernel
|
|||||||
%define with_pae %{?_without_pae: 0} %{?!_without_pae: 1}
|
%define with_pae %{?_without_pae: 0} %{?!_without_pae: 1}
|
||||||
# kernel-debug
|
# kernel-debug
|
||||||
%define with_debug %{?_without_debug: 0} %{?!_without_debug: 1}
|
%define with_debug %{?_without_debug: 0} %{?!_without_debug: 1}
|
||||||
|
# kernel-doc
|
||||||
|
%define with_doc %{?_without_doc: 0} %{?!_without_doc: 1}
|
||||||
# kernel-headers
|
# kernel-headers
|
||||||
%define with_headers %{?_without_headers: 0} %{?!_without_headers: 1}
|
%define with_headers %{?_without_headers: 0} %{?!_without_headers: 1}
|
||||||
%define with_cross_headers %{?_without_cross_headers: 0} %{?!_without_cross_headers: 1}
|
%define with_cross_headers %{?_without_cross_headers: 0} %{?!_without_cross_headers: 1}
|
||||||
@ -248,6 +250,12 @@ Summary: The Linux kernel
|
|||||||
|
|
||||||
# Overrides for generic default options
|
# Overrides for generic default options
|
||||||
|
|
||||||
|
# only package docs noarch
|
||||||
|
%ifnarch noarch
|
||||||
|
%define with_doc 0
|
||||||
|
%define doc_build_fail true
|
||||||
|
%endif
|
||||||
|
|
||||||
# don't do debug builds on anything but i686 and x86_64
|
# don't do debug builds on anything but i686 and x86_64
|
||||||
%ifnarch i686 x86_64
|
%ifnarch i686 x86_64
|
||||||
%define with_debug 0
|
%define with_debug 0
|
||||||
@ -401,6 +409,9 @@ BuildRequires: net-tools, hostname, bc, elfutils-devel, gcc-plugin-devel
|
|||||||
# Used to mangle unversioned shebangs to be Python 3
|
# Used to mangle unversioned shebangs to be Python 3
|
||||||
BuildRequires: /usr/bin/pathfix.py
|
BuildRequires: /usr/bin/pathfix.py
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with_doc}
|
||||||
|
BuildRequires: xmlto, asciidoc, python3-sphinx
|
||||||
|
%endif
|
||||||
%if %{with_sparse}
|
%if %{with_sparse}
|
||||||
BuildRequires: sparse
|
BuildRequires: sparse
|
||||||
%endif
|
%endif
|
||||||
@ -616,6 +627,17 @@ AutoReq: no\
|
|||||||
AutoProv: yes\
|
AutoProv: yes\
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
|
%package doc
|
||||||
|
Summary: Various documentation bits found in the kernel source
|
||||||
|
Group: Documentation
|
||||||
|
%description doc
|
||||||
|
This package contains documentation files from the kernel
|
||||||
|
source. Various bits of information about the Linux kernel and the
|
||||||
|
device drivers shipped with it are documented in these files.
|
||||||
|
|
||||||
|
You'll want to install this package if you need a reference to the
|
||||||
|
options that can be passed to Linux kernel modules at load time.
|
||||||
|
|
||||||
%package headers
|
%package headers
|
||||||
Summary: Header files for the Linux kernel for use by glibc
|
Summary: Header files for the Linux kernel for use by glibc
|
||||||
Obsoletes: glibc-kernheaders < 3.0-46
|
Obsoletes: glibc-kernheaders < 3.0-46
|
||||||
@ -1541,6 +1563,15 @@ BuildKernel %make_target %kernel_image %{use_vdso} lpae
|
|||||||
BuildKernel %make_target %kernel_image %{_use_vdso}
|
BuildKernel %make_target %kernel_image %{_use_vdso}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{with_doc}
|
||||||
|
# Make the HTML pages.
|
||||||
|
make htmldocs || %{doc_build_fail}
|
||||||
|
|
||||||
|
# sometimes non-world-readable files sneak into the kernel source tree
|
||||||
|
chmod -R a=rX Documentation
|
||||||
|
find Documentation -type d | xargs chmod u+w
|
||||||
|
%endif
|
||||||
|
|
||||||
# In the modsign case, we do 3 things. 1) We check the "flavour" and hard
|
# In the modsign case, we do 3 things. 1) We check the "flavour" and hard
|
||||||
# code the value in the following invocations. This is somewhat sub-optimal
|
# code the value in the following invocations. This is somewhat sub-optimal
|
||||||
# but we're doing this inside of an RPM macro and it isn't as easy as it
|
# but we're doing this inside of an RPM macro and it isn't as easy as it
|
||||||
@ -1604,6 +1635,15 @@ BuildKernel %make_target %kernel_image %{_use_vdso}
|
|||||||
|
|
||||||
cd linux-%{KVERREL}
|
cd linux-%{KVERREL}
|
||||||
|
|
||||||
|
%if %{with_doc}
|
||||||
|
docdir=$RPM_BUILD_ROOT%{_datadir}/doc/kernel-doc-%{rpmversion}
|
||||||
|
|
||||||
|
# copy the source over
|
||||||
|
mkdir -p $docdir
|
||||||
|
tar -h -f - --exclude=man --exclude='.*' -c Documentation | tar xf - -C $docdir
|
||||||
|
|
||||||
|
%endif # with_doc
|
||||||
|
|
||||||
# We have to do the headers install before the tools install because the
|
# We have to do the headers install before the tools install because the
|
||||||
# kernel headers_install will remove any header files in /usr/include that
|
# kernel headers_install will remove any header files in /usr/include that
|
||||||
# it doesn't install itself.
|
# it doesn't install itself.
|
||||||
@ -1764,6 +1804,15 @@ fi
|
|||||||
/usr/*-linux-gnu/include/*
|
/usr/*-linux-gnu/include/*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# only some architecture builds need kernel-doc
|
||||||
|
%if %{with_doc}
|
||||||
|
%files doc
|
||||||
|
%defattr(-,root,root)
|
||||||
|
%{_datadir}/doc/kernel-doc-%{rpmversion}/Documentation/*
|
||||||
|
%dir %{_datadir}/doc/kernel-doc-%{rpmversion}/Documentation
|
||||||
|
%dir %{_datadir}/doc/kernel-doc-%{rpmversion}
|
||||||
|
%endif
|
||||||
|
|
||||||
# empty meta-package
|
# empty meta-package
|
||||||
%files
|
%files
|
||||||
%if %{with_gcov}
|
%if %{with_gcov}
|
||||||
|
Loading…
Reference in New Issue
Block a user