2011-10-05 07:01:45 +02:00
|
|
|
#
|
2011-10-25 07:02:09 +02:00
|
|
|
# spec file for package kernel-docs@VARIANT@
|
2011-10-05 07:01:45 +02:00
|
|
|
#
|
2016-12-13 08:07:16 +01:00
|
|
|
# Copyright (c) @YEAR@ SUSE LINUX 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2017-09-13 08:02:42 +02:00
|
|
|
%define srcversion @SRCVERSION@
|
2011-10-05 07:01:45 +02:00
|
|
|
%define patchversion @PATCHVERSION@
|
|
|
|
%define variant @VARIANT@%{nil}
|
|
|
|
|
|
|
|
%include %_sourcedir/kernel-spec-macros
|
|
|
|
|
2017-09-08 08:03:12 +02:00
|
|
|
%define build_html 1
|
2017-07-12 17:21:12 +02:00
|
|
|
%define build_pdf 0
|
2016-10-04 10:11:34 +02:00
|
|
|
|
2017-09-13 08:02:42 +02:00
|
|
|
%(chmod +x %_sourcedir/{@SCRIPTS@})
|
2017-02-21 08:08:23 +01:00
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
Name: kernel-docs@VARIANT@
|
2017-09-08 08:03:12 +02:00
|
|
|
Summary: Kernel Documentation
|
2014-02-02 08:01:46 +01:00
|
|
|
License: GPL-2.0
|
|
|
|
Group: Documentation/Man
|
2011-10-05 07:01:45 +02:00
|
|
|
Version: @RPMVERSION@
|
2013-10-03 08:02:42 +02:00
|
|
|
%if 0%{?is_kotd}
|
|
|
|
Release: <RELEASE>.g@COMMIT@
|
|
|
|
%else
|
2011-10-25 07:02:09 +02:00
|
|
|
Release: @RELEASE@
|
2013-10-03 08:02:42 +02:00
|
|
|
%endif
|
2017-09-13 08:02:42 +02:00
|
|
|
# TW (4.13 or later) no longer needs xmlto
|
2017-09-20 08:02:56 +02:00
|
|
|
%if 0%{?sle_version}
|
2017-09-13 08:02:42 +02:00
|
|
|
BuildRequires: xmlto
|
|
|
|
%endif
|
2017-09-08 08:03:12 +02:00
|
|
|
%if %build_pdf || %build_html
|
2017-07-12 17:21:12 +02:00
|
|
|
# ReST handling
|
2018-05-24 08:03:09 +02:00
|
|
|
BuildRequires: ImageMagick
|
2017-02-21 08:08:23 +01:00
|
|
|
BuildRequires: graphviz
|
2017-09-08 08:03:12 +02:00
|
|
|
BuildRequires: graphviz-gd
|
|
|
|
BuildRequires: graphviz-gnome
|
2020-05-09 10:05:13 +02:00
|
|
|
BuildRequires: python3-Sphinx < 3
|
2017-09-08 08:03:12 +02:00
|
|
|
BuildRequires: texlive-anyfontsize
|
2017-07-12 17:21:12 +02:00
|
|
|
%if %build_pdf
|
2017-09-08 08:03:12 +02:00
|
|
|
BuildRequires: python3-Sphinx-latex
|
|
|
|
BuildRequires: texlive-adjustbox
|
|
|
|
BuildRequires: texlive-dejavu
|
|
|
|
BuildRequires: texlive-dejavu-fonts
|
|
|
|
BuildRequires: texlive-glyphlist
|
|
|
|
BuildRequires: texlive-makeindex
|
|
|
|
BuildRequires: texlive-varwidth
|
|
|
|
BuildRequires: texlive-xetex
|
|
|
|
BuildRequires: texlive-zapfding
|
|
|
|
%endif
|
2016-06-26 16:47:43 +02:00
|
|
|
%endif
|
2011-10-05 07:01:45 +02:00
|
|
|
Url: http://www.kernel.org/
|
|
|
|
Provides: %name = %version-%source_rel
|
2019-02-15 10:39:41 +01:00
|
|
|
Provides: %name-srchash-@COMMIT_FULL@
|
2011-10-05 07:01:45 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2017-09-13 08:02:42 +02:00
|
|
|
@SOURCES@
|
|
|
|
# These files are found in the kernel-source package:
|
|
|
|
@NOSOURCE@
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
%description
|
2017-09-08 08:03:12 +02:00
|
|
|
A few basic documents from the current kernel sources.
|
2011-10-05 07:01:45 +02:00
|
|
|
|
2014-12-11 08:04:19 +01:00
|
|
|
%source_timestamp
|
2016-06-26 16:47:43 +02:00
|
|
|
|
2017-07-12 17:21:12 +02:00
|
|
|
%if %build_pdf
|
2016-06-26 16:47:43 +02:00
|
|
|
%package pdf
|
|
|
|
Summary: Kernel Documentation (PDF)
|
|
|
|
Group: Documentation/Other
|
|
|
|
|
|
|
|
%description pdf
|
|
|
|
These are PDF documents built from the current kernel sources.
|
|
|
|
|
|
|
|
%source_timestamp
|
2017-07-12 17:21:12 +02:00
|
|
|
%endif
|
2016-06-26 16:47:43 +02:00
|
|
|
|
2017-09-08 08:03:12 +02:00
|
|
|
%if %build_html
|
2016-06-26 16:47:43 +02:00
|
|
|
%package html
|
|
|
|
Summary: Kernel Documentation (HTML)
|
|
|
|
Group: Documentation/HTML
|
|
|
|
|
|
|
|
%description html
|
|
|
|
These are HTML documents built from the current kernel sources.
|
|
|
|
|
|
|
|
%source_timestamp
|
2017-09-08 08:03:12 +02:00
|
|
|
%endif
|
2016-06-26 16:47:43 +02:00
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
%prep
|
2017-09-13 08:02:42 +02:00
|
|
|
%setup -q -c -T -a 0 @UNPACK_PATCHES@
|
|
|
|
cp -a linux-%srcversion/{COPYING,CREDITS,MAINTAINERS,README} .
|
|
|
|
cd linux-%srcversion
|
|
|
|
%_sourcedir/apply-patches %_sourcedir/series.conf %my_builddir %symbols
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
%build
|
2017-09-13 08:02:42 +02:00
|
|
|
cd linux-%srcversion
|
2011-10-05 07:01:45 +02:00
|
|
|
export LANG=en_US
|
2017-09-08 08:03:12 +02:00
|
|
|
%if %build_html
|
2016-06-26 16:47:43 +02:00
|
|
|
mkdir -p html
|
2020-02-04 09:05:26 +01:00
|
|
|
make %{?make_arg} O=$PWD/html PYTHON=python3 htmldocs
|
2017-09-08 08:03:12 +02:00
|
|
|
%endif
|
2017-07-12 17:21:12 +02:00
|
|
|
%if %build_pdf
|
2016-06-26 16:47:43 +02:00
|
|
|
mkdir -p pdf
|
2020-02-04 09:05:26 +01:00
|
|
|
make %{?make_arg} O=$PWD/pdf PYTHON=python3 pdfdocs
|
2016-06-26 16:47:43 +02:00
|
|
|
%endif
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
%install
|
2017-09-13 08:02:42 +02:00
|
|
|
cd linux-%srcversion
|
2017-09-08 08:03:12 +02:00
|
|
|
%if %build_html
|
2017-07-12 17:21:12 +02:00
|
|
|
install -d $RPM_BUILD_ROOT%{_datadir}/doc/kernel/html/rst
|
|
|
|
cp -a html/Documentation/output/* $RPM_BUILD_ROOT%{_datadir}/doc/kernel/html/rst || true
|
2017-09-08 08:03:12 +02:00
|
|
|
%endif
|
2014-12-11 08:04:19 +01:00
|
|
|
|
2017-07-12 17:21:12 +02:00
|
|
|
%if %build_pdf
|
2016-06-26 16:47:43 +02:00
|
|
|
install -d $RPM_BUILD_ROOT%{_datadir}/doc/kernel/pdf
|
2017-09-08 08:03:12 +02:00
|
|
|
for i in pdf/Documentation/output/latex/*.pdf; do
|
|
|
|
cp -a $i $RPM_BUILD_ROOT%{_datadir}/doc/kernel/pdf
|
2016-10-04 10:11:34 +02:00
|
|
|
done
|
|
|
|
%endif
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2017-02-21 08:08:23 +01:00
|
|
|
%doc COPYING CREDITS MAINTAINERS README
|
2014-12-11 08:04:19 +01:00
|
|
|
|
2017-07-12 17:21:12 +02:00
|
|
|
%if %build_pdf
|
2016-06-26 16:47:43 +02:00
|
|
|
%files pdf
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_datadir}/doc/kernel
|
|
|
|
%docdir %{_datadir}/doc/kernel/pdf
|
|
|
|
%{_datadir}/doc/kernel/pdf
|
2017-07-12 17:21:12 +02:00
|
|
|
%endif
|
2016-06-26 16:47:43 +02:00
|
|
|
|
2017-09-08 08:03:12 +02:00
|
|
|
%if %build_html
|
2016-06-26 16:47:43 +02:00
|
|
|
%files html
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_datadir}/doc/kernel
|
|
|
|
%docdir %{_datadir}/doc/kernel/html
|
|
|
|
%{_datadir}/doc/kernel/html
|
2017-09-08 08:03:12 +02:00
|
|
|
%endif
|
2016-06-26 16:47:43 +02:00
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
%changelog
|