File kernel-docs.spec of Package kernel-source
#
# spec file for package kernel-docs
#
# Copyright (c) 2026 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
%define srcversion 3.0
%define patchversion 3.0.101
%define variant %{nil}
%include %_sourcedir/kernel-spec-macros
%(chmod +x %_sourcedir/{guards,apply-patches,gen-hmacs,check-for-config-changes,built-in-where,symsets.pl,find-provides,split-modules,modversions,extract-modaliases,kabi.pl,arch-symbols,configtool.pl})
Name: kernel-docs
Summary: Kernel Documentation
Version: 3.0.101
%if 0%{?is_kotd}
Release: <RELEASE>.g8835576
%else
Release: 0
%endif
BuildRequires: docbook-toys docbook-utils ghostscript_any libjpeg-devel texlive transfig xmlto xorg-x11-devel
Url: http://www.kernel.org/
License: GPL-2.0-only
Group: Documentation/Man
Provides: %name = %version-%source_rel
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: http://www.kernel.org/pub/linux/kernel/v2.6/linux-%srcversion.tar.bz2
Source2: source-post.sh
Source3: kernel-source.rpmlintrc
Source8: devel-pre.sh
Source9: devel-post.sh
Source10: preun.sh
Source11: postun.sh
Source12: pre.sh
Source13: post.sh
Source14: series.conf
Source16: guards
Source17: apply-patches
Source18: gen-hmacs
Source21: config.conf
Source23: supported.conf
Source33: check-for-config-changes
Source37: README.SUSE
Source38: README.KSYMS
Source39: generic_serial-blacklist
Source40: source-timestamp
Source41: built-in-where
Source42: built-in-where.mk
Source43: symsets.pl
Source44: find-provides
Source45: split-modules
Source46: modversions
Source47: extract-modaliases
Source48: macros.kernel-source
Source49: kernel-module-subpackage
Source50: kabi.pl
Source52: kernel-source%variant.changes
Source57: kernel-cert-subpackage
Source60: config.sh
Source63: arch-symbols
Source65: kernel-spec-macros
Source66: configtool.pl
Source90: SLES-UEFI-SIGN-Certificate-2048.crt
Source100: config.tar.bz2
Source101: config.addon.tar.bz2
Source102: patches.arch.tar.bz2
Source103: patches.drivers.tar.bz2
Source104: patches.fixes.tar.bz2
Source105: patches.rpmify.tar.bz2
Source106: patches.suse.tar.bz2
Source107: patches.xen.tar.bz2
Source108: patches.addon.tar.bz2
Source109: patches.kernel.org.tar.bz2
Source110: patches.apparmor.tar.bz2
Source111: patches.rt.tar.bz2
Source112: patches.trace.tar.bz2
Source113: patches.kabi.tar.bz2
Source114: patches.drm.tar.bz2
Source115: patches.ceph.tar.bz2
Source120: kabi.tar.bz2
Source122: modprobe-xen.conf
# These files are found in the kernel-source package:
NoSource: 0
NoSource: 100
NoSource: 101
NoSource: 102
NoSource: 103
NoSource: 104
NoSource: 105
NoSource: 106
NoSource: 107
NoSource: 108
NoSource: 109
NoSource: 110
NoSource: 111
NoSource: 112
NoSource: 113
NoSource: 114
NoSource: 115
NoSource: 120
%description
These are the PDF documents and man pages (section 9) built from
thecurrent kernel sources.
%source_timestamp
%prep
cp -av /etc/texmf/web2c/texmf.cnf .
cat << EOF >> texmf.cnf
main_memory.pdfjadetex = 2500000
hash_extra.pdfjadetex = 70000
max_strings.pdfjadetex = 120000
save_size.pdfjadetex = 10000
EOF
%setup -q -c -T -a 0 -a 100 -a 101 -a 102 -a 103 -a 104 -a 105 -a 106 -a 107 -a 108 -a 109 -a 110 -a 111 -a 112 -a 113 -a 114 -a 115 -a 120
cp -a linux-%srcversion/{COPYING,CREDITS,MAINTAINERS,README,REPORTING-BUGS} .
cd linux-%srcversion
%_sourcedir/apply-patches %_sourcedir/series.conf %my_builddir %symbols
%build
cd linux-%srcversion
# use texmf.cnf from local source
export TEXMFCNF=$RPM_BUILD_DIR
export LANG=en_US
make -k -i mandocs %{?jobs:-j%jobs}
make -k -i pdfdocs %{?jobs:-j%jobs}
%install
cd linux-%srcversion
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT/%{_mandir}/man9
# filter out obscure device drivers - they clutter up the rpm and don't add any real value
find Documentation/DocBook/ -name '*.9.gz' |
egrep -v 'man/(sis[69]|rio|fsl|struct_rio|RIO|mpc85|set_rx_mode|mdio_(read|write)|mii_ioctl|mca_|z8530|nand|sppp|piix|(read|write)_zs)' |
while read i ; do
cp $i $RPM_BUILD_ROOT/%{_mandir}/man9
done
install -d $RPM_BUILD_ROOT/usr/share/doc/kernel
cp -a Documentation/DocBook/*.pdf $RPM_BUILD_ROOT/usr/share/doc/kernel || true
if [ -d Documentation/kdb ] ; then
for i in Documentation/kdb/*.m* ; do
k=`basename $i`
k=${k/man/9}
k=${k/mm/9}
cp $i $RPM_BUILD_ROOT/%{_mandir}/man9/$k
done
fi
ln -s /usr/share/man/man9/request_threaded_irq.9.gz $RPM_BUILD_ROOT/usr/share/man/man9/request_irq.9.gz
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc COPYING CREDITS MAINTAINERS README REPORTING-BUGS
%{_mandir}/man9/*
%docdir /usr/share/doc/kernel
/usr/share/doc/kernel
%changelog