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
|
|
|
#
|
2017-01-03 08:06:08 +01:00
|
|
|
# Copyright (c) 2017 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-07-12 17:21:12 +02:00
|
|
|
%define patchversion 4.12.1
|
2011-10-05 07:01:45 +02:00
|
|
|
%define variant %{nil}
|
|
|
|
|
|
|
|
%include %_sourcedir/kernel-spec-macros
|
|
|
|
|
2017-07-12 17:21:12 +02:00
|
|
|
# rst2pdf is broken with Sphinx 1.3.x, so disabled for now
|
|
|
|
%define build_pdf 0
|
2016-10-04 10:11:34 +02:00
|
|
|
|
2017-02-21 08:08:23 +01:00
|
|
|
# copy the whole tree to generate some images (sigh...)
|
|
|
|
%define local_copy 1
|
|
|
|
%if %local_copy
|
|
|
|
%define linux_src .
|
|
|
|
%else
|
|
|
|
%define linux_src /usr/src/linux%variant
|
|
|
|
%define make_arg "-C %linux_src"
|
|
|
|
%endif
|
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
Name: kernel-docs
|
2016-06-26 16:47:43 +02:00
|
|
|
Summary: Kernel Documentation (man pages)
|
2014-02-02 08:01:46 +01:00
|
|
|
License: GPL-2.0
|
|
|
|
Group: Documentation/Man
|
2017-07-12 17:21:12 +02:00
|
|
|
Version: 4.12.1
|
2013-10-03 08:02:42 +02:00
|
|
|
%if 0%{?is_kotd}
|
2017-07-12 17:21:12 +02:00
|
|
|
Release: <RELEASE>.gb24ee10
|
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
|
2017-07-12 17:21:12 +02:00
|
|
|
# remaining stuff, to be fixed after 4.12
|
|
|
|
BuildRequires: xmlto
|
|
|
|
# ReST handling
|
2017-02-21 08:08:23 +01:00
|
|
|
BuildRequires: graphviz
|
2016-10-04 10:11:34 +02:00
|
|
|
BuildRequires: python-Sphinx
|
2017-07-12 17:21:12 +02:00
|
|
|
%if %build_pdf
|
|
|
|
BuildRequires: python-rst2pdf
|
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
|
|
|
|
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
|
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
|
|
|
|
|
|
|
%package html
|
|
|
|
Summary: Kernel Documentation (HTML)
|
|
|
|
Group: Documentation/HTML
|
|
|
|
|
|
|
|
%description html
|
|
|
|
These are HTML documents built from the current kernel sources.
|
|
|
|
|
|
|
|
%source_timestamp
|
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
%prep
|
|
|
|
%setup -T -c
|
2017-02-21 08:08:23 +01:00
|
|
|
%if %local_copy
|
|
|
|
# FIXME: need to copy locally to generate some images...
|
|
|
|
cp -a /usr/src/linux%variant/* .
|
|
|
|
%endif
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
export LANG=en_US
|
2016-06-26 16:47:43 +02:00
|
|
|
mkdir -p html
|
2017-02-21 08:08:23 +01:00
|
|
|
make %{?make_arg} O=$PWD/html htmldocs
|
2017-07-12 17:21:12 +02:00
|
|
|
%if %build_pdf
|
2016-06-26 16:47:43 +02:00
|
|
|
mkdir -p pdf
|
2017-07-12 17:21:12 +02:00
|
|
|
make %{?make_arg} O=$PWD/pdf pdfdocs
|
2016-06-26 16:47:43 +02:00
|
|
|
%endif
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
%install
|
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
|
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
|
2016-10-04 10:11:34 +02:00
|
|
|
# copy PDF files generated by sphinx (once when it really works...)
|
|
|
|
for i in pdf/Documentation/output/*.pdf; do
|
|
|
|
test -s $i && cp -a $i $RPM_BUILD_ROOT%{_datadir}/doc/kernel/pdf
|
|
|
|
done
|
|
|
|
%endif
|
2011-10-05 07:01:45 +02:00
|
|
|
|
2017-02-21 08:08:23 +01:00
|
|
|
%if !%local_copy
|
|
|
|
cp -a %linux_src/{COPYING,CREDITS,MAINTAINERS,README} .
|
|
|
|
%endif
|
2016-06-26 15:53:30 +02:00
|
|
|
|
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
|
|
|
|
|
|
|
%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
|