2011-10-05 07:01:45 +02:00
|
|
|
#
|
2011-10-25 07:02:09 +02:00
|
|
|
# spec file for package kernel-docs
|
2011-10-05 07:01:45 +02:00
|
|
|
#
|
2015-01-07 08:02:51 +01:00
|
|
|
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2011-10-05 07:01:45 +02:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2015-06-09 08:05:30 +02:00
|
|
|
%define patchversion 4.0.5
|
2011-10-05 07:01:45 +02:00
|
|
|
%define variant %{nil}
|
|
|
|
|
|
|
|
%include %_sourcedir/kernel-spec-macros
|
|
|
|
|
2014-10-30 08:05:29 +01:00
|
|
|
%define use_fop 1
|
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
Name: kernel-docs
|
2014-12-11 08:04:19 +01:00
|
|
|
Summary: Kernel Documentation (man pages)
|
2014-02-02 08:01:46 +01:00
|
|
|
License: GPL-2.0
|
|
|
|
Group: Documentation/Man
|
2015-06-09 08:05:30 +02:00
|
|
|
Version: 4.0.5
|
2013-10-03 08:02:42 +02:00
|
|
|
%if 0%{?is_kotd}
|
2015-06-23 08:05:00 +02:00
|
|
|
Release: <RELEASE>.g80f6bcd
|
2013-10-03 08:02:42 +02:00
|
|
|
%else
|
2014-11-01 08:04:35 +01:00
|
|
|
Release: 0
|
2013-10-03 08:02:42 +02:00
|
|
|
%endif
|
2010-12-14 07:01:34 +01:00
|
|
|
BuildRequires: kernel-source%variant
|
2014-02-02 08:01:46 +01:00
|
|
|
BuildRequires: xmlto
|
2014-10-30 08:05:29 +01:00
|
|
|
%if %use_fop
|
|
|
|
BuildRequires: fop
|
|
|
|
%else
|
|
|
|
BuildRequires: docbook-toys
|
|
|
|
BuildRequires: docbook-utils
|
|
|
|
BuildRequires: texlive-courier
|
|
|
|
BuildRequires: texlive-dvips
|
|
|
|
BuildRequires: texlive-ec
|
|
|
|
BuildRequires: texlive-helvetic
|
|
|
|
BuildRequires: texlive-jadetex
|
|
|
|
BuildRequires: texlive-times
|
|
|
|
%endif
|
2011-10-05 07:01:45 +02:00
|
|
|
Url: http://www.kernel.org/
|
|
|
|
Provides: %name = %version-%source_rel
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2011-10-25 07:02:09 +02:00
|
|
|
Source: kernel-spec-macros
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
%description
|
2014-12-11 08:04:19 +01:00
|
|
|
These are the man pages (section 9) built from the current kernel sources.
|
2011-10-05 07:01:45 +02:00
|
|
|
|
2014-12-11 08:04:19 +01:00
|
|
|
%source_timestamp
|
|
|
|
|
|
|
|
%package pdf
|
|
|
|
Summary: Kernel Documentation (PDF)
|
|
|
|
License: GPL-2.0
|
|
|
|
Group: Documentation/Other
|
|
|
|
|
|
|
|
%description pdf
|
|
|
|
These are PDF documents built from the current kernel sources.
|
|
|
|
|
|
|
|
%source_timestamp
|
|
|
|
|
|
|
|
%package html
|
|
|
|
Summary: Kernel Documentation (HTML)
|
|
|
|
License: GPL-2.0
|
|
|
|
Group: Documentation/HTML
|
|
|
|
|
|
|
|
%description html
|
|
|
|
These are HTML documents built from the current kernel sources.
|
2011-10-05 07:01:45 +02:00
|
|
|
|
2011-10-25 07:02:09 +02:00
|
|
|
%source_timestamp
|
2014-12-11 08:04:19 +01:00
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
%prep
|
2014-10-30 08:05:29 +01:00
|
|
|
%if !%use_fop
|
2011-10-05 07:01:45 +02:00
|
|
|
cp -av /etc/texmf/web2c/texmf.cnf .
|
|
|
|
cat << EOF >> texmf.cnf
|
2014-10-30 08:05:29 +01:00
|
|
|
main_memory.pdfjadetex = 5000000
|
|
|
|
hash_extra.pdfjadetex = 140000
|
|
|
|
max_strings.pdfjadetex = 240000
|
|
|
|
save_size.pdfjadetex = 20000
|
2011-10-05 07:01:45 +02:00
|
|
|
EOF
|
2014-10-30 08:05:29 +01:00
|
|
|
%endif
|
2011-10-05 07:01:45 +02:00
|
|
|
%setup -T -c
|
|
|
|
|
|
|
|
%build
|
2014-10-30 08:05:29 +01:00
|
|
|
%if !%use_fop
|
2011-10-05 07:01:45 +02:00
|
|
|
# use texmf.cnf from local source
|
|
|
|
export TEXMFCNF=$RPM_BUILD_DIR
|
2014-10-30 08:05:29 +01:00
|
|
|
%endif
|
2011-10-05 07:01:45 +02:00
|
|
|
export LANG=en_US
|
2014-12-11 08:04:19 +01:00
|
|
|
mkdir -p man
|
2015-02-12 08:04:40 +01:00
|
|
|
make -C /usr/src/linux%variant O=$PWD/man mandocs %{?jobs:-j%jobs}
|
2014-12-11 08:04:19 +01:00
|
|
|
mkdir -p html
|
2015-02-12 08:04:40 +01:00
|
|
|
make -C /usr/src/linux%variant O=$PWD/html htmldocs %{?jobs:-j%jobs}
|
2014-12-11 08:04:19 +01:00
|
|
|
mkdir -p pdf
|
2014-10-30 08:05:29 +01:00
|
|
|
make \
|
|
|
|
%if %use_fop
|
|
|
|
XMLTOFLAGS="-m /usr/src/linux%{variant}/Documentation/DocBook/stylesheet.xsl --skip-validation --with-fop" \
|
|
|
|
%endif
|
2015-02-12 08:04:40 +01:00
|
|
|
-C /usr/src/linux%variant O=$PWD/pdf pdfdocs %{?jobs:-j%jobs}
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
install -d $RPM_BUILD_ROOT/%{_mandir}/man9
|
|
|
|
# filter out obscure device drivers - they clutter up the rpm and don't add any real value
|
2014-12-11 08:04:19 +01:00
|
|
|
find man/Documentation/DocBook/ -name '*.9.gz' |
|
|
|
|
grep -E -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)' |
|
2011-10-05 07:01:45 +02:00
|
|
|
while read i ; do
|
|
|
|
cp $i $RPM_BUILD_ROOT/%{_mandir}/man9
|
|
|
|
done
|
2014-12-11 08:04:19 +01:00
|
|
|
if [ -d man/Documentation/kdb ] ; then
|
|
|
|
for i in man/Documentation/kdb/*.m* ; do
|
2011-10-05 07:01:45 +02:00
|
|
|
k=`basename $i`
|
|
|
|
k=${k/man/9}
|
|
|
|
k=${k/mm/9}
|
|
|
|
cp $i $RPM_BUILD_ROOT/%{_mandir}/man9/$k
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2014-12-11 08:04:19 +01:00
|
|
|
ln -s %{_mandir}/man9/request_threaded_irq.9.gz $RPM_BUILD_ROOT%{_mandir}/man9/request_irq.9.gz
|
2011-10-05 07:01:45 +02:00
|
|
|
|
2014-12-11 08:04:19 +01:00
|
|
|
install -d $RPM_BUILD_ROOT%{_datadir}/doc/kernel/pdf
|
|
|
|
cp -a pdf/Documentation/DocBook/*.pdf $RPM_BUILD_ROOT%{_datadir}/doc/kernel/pdf || true
|
2011-10-05 07:01:45 +02:00
|
|
|
|
2014-12-11 08:04:19 +01:00
|
|
|
install -d $RPM_BUILD_ROOT%{_datadir}/doc/kernel/html
|
|
|
|
cp -a html/Documentation/DocBook/* $RPM_BUILD_ROOT%{_datadir}/doc/kernel/html || true
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_datadir}/doc/kernel/html/*.xml
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_datadir}/doc/kernel/html/*.{gif,png}
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_datadir}/doc/kernel/html/*/*.proc
|
|
|
|
|
|
|
|
cp -a /usr/src/linux%variant/{COPYING,CREDITS,MAINTAINERS,README,REPORTING-BUGS} .
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc COPYING CREDITS MAINTAINERS README REPORTING-BUGS
|
|
|
|
%{_mandir}/man9/*
|
2014-12-11 08:04:19 +01:00
|
|
|
|
|
|
|
%files pdf
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_datadir}/doc/kernel
|
|
|
|
%docdir %{_datadir}/doc/kernel/pdf
|
|
|
|
%{_datadir}/doc/kernel/pdf
|
|
|
|
|
|
|
|
%files html
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_datadir}/doc/kernel
|
|
|
|
%docdir %{_datadir}/doc/kernel/html
|
|
|
|
%{_datadir}/doc/kernel/html
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
%changelog
|