Revert "Drop -doc subpackage"

This reverts commit 3b1e47cc2d.

Apparently this is still important enough to be built in some cases.
Rethink later.
This commit is contained in:
Josh Boyer 2014-01-07 12:53:13 -05:00
parent 3b1e47cc2d
commit b9ba7a75af
2 changed files with 68 additions and 5 deletions

View File

@ -102,6 +102,7 @@ debug:
@perl -pi -e 's/# CONFIG_USB_UAS is not set/CONFIG_USB_UAS=m/' config-generic
@perl -pi -e 's/^%define debugbuildsenabled 1/%define debugbuildsenabled 0/' kernel.spec
@perl -pi -e 's/^%define rawhide_skip_docs 0/%define rawhide_skip_docs 1/' kernel.spec
@rpmdev-bumpspec -c "Reenable debugging options." kernel.spec
nodebuginfo:
@ -110,6 +111,7 @@ nodebug: release
@perl -pi -e 's/^%define debugbuildsenabled 1/%define debugbuildsenabled 0/' kernel.spec
release: config-release
@perl -pi -e 's/^%define debugbuildsenabled 0/%define debugbuildsenabled 1/' kernel.spec
@perl -pi -e 's/^%define rawhide_skip_docs 1/%define rawhide_skip_docs 0/' kernel.spec
@rpmdev-bumpspec -c "Disable debugging options." kernel.spec
include Makefile.release

View File

@ -62,7 +62,7 @@ Summary: The Linux kernel
# For non-released -rc kernels, this will be appended after the rcX and
# gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
#
%global baserelease 2
%global baserelease 1
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@ -118,6 +118,8 @@ Summary: The Linux kernel
%define with_pae %{?_without_pae: 0} %{?!_without_pae: 1}
# kernel-debug
%define with_debug %{?_without_debug: 0} %{?!_without_debug: 1}
# kernel-doc
%define with_doc %{?_without_doc: 0} %{?!_without_doc: 1}
# kernel-headers
%define with_headers %{?_without_headers: 0} %{?!_without_headers: 1}
# kernel-modules-extra
@ -161,6 +163,20 @@ Summary: The Linux kernel
# Want to build a vanilla kernel build without any non-upstream patches?
%define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0}
# Build the kernel-doc package, but don't fail the build if it botches.
# Here "true" means "continue" and "false" means "fail the build".
%if 0%{?released_kernel}
%define doc_build_fail false
%else
%define doc_build_fail true
%endif
%define rawhide_skip_docs 1
%if 0%{?rawhide_skip_docs}
%define with_doc 0
%define doc_build_fail true
%endif
# pkg_release is what we'll fill in for the rpm Release: field
%if 0%{?released_kernel}
@ -286,6 +302,11 @@ Summary: The Linux kernel
%define with_debug 0
%endif
# only package docs noarch
%ifnarch noarch
%define with_doc 0
%endif
# don't build noarch kernels or headers (duh)
%ifarch noarch
%define with_up 0
@ -467,6 +488,9 @@ BuildRequires: kmod, patch, bash, sh-utils, tar
BuildRequires: bzip2, xz, findutils, gzip, m4, perl, perl-Carp, make, diffutils, gawk
BuildRequires: gcc, binutils, redhat-rpm-config, hmaccalc
BuildRequires: net-tools, hostname, bc
%if %{with_doc}
BuildRequires: xmlto, asciidoc
%endif
%if %{with_sparse}
BuildRequires: sparse
%endif
@ -712,6 +736,19 @@ Linux operating system. The kernel handles the basic functions
of the operating system: memory allocation, process allocation, device
input and output, etc.
%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
Summary: Header files for the Linux kernel for use by glibc
Group: Development/System
@ -1762,6 +1799,15 @@ pushd tools/thermal/tmon/
popd
%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
# 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
@ -1830,6 +1876,15 @@ popd
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
# kernel headers_install will remove any header files in /usr/include that
# it doesn't install itself.
@ -2032,6 +2087,15 @@ fi
%{_libdir}/kernel-wrapper
%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
%if %{with_perf}
%files -n perf
%defattr(-,root,root)
@ -2161,10 +2225,7 @@ fi
# ||----w |
# || ||
%changelog
* Tue Jan 07 2014 Josh Boyer <jwboyer@fedoraproject.org>
- Drop -doc subpackage
* Tue Jan 07 2014 Josh Boyer <jwboyer@fedoraproject.com> - 3.13.0-0.rc7.git1.1
* Tue Jan 07 2014 Josh Boyer <jwboyer@redhat.com> - 3.13.0-0.rc7.git1.1
- Linux v3.13-rc7-55-gef350bb
- Reenable debugging options.