From ea76b6aac602e26ec89bb4ed128950cec2ba70b7 Mon Sep 17 00:00:00 2001 From: Jeremy Cline Date: Apr 04 2018 15:28:27 +0000 Subject: Build the perf and kvm_stat docs in the specfile Previously, the manpages were generated from a script in the kernel dist-git repo and uploaded as a source for kernel-tools. This simplifies things by building the man pages in the -tools specfile itself. Signed-off-by: Jeremy Cline --- diff --git a/kernel-tools.spec b/kernel-tools.spec index e5b2907..a4ff1cf 100644 --- a/kernel-tools.spec +++ b/kernel-tools.spec @@ -71,6 +71,7 @@ BuildRequires: gcc, binutils, redhat-rpm-config, hmaccalc BuildRequires: net-tools, hostname, bc, elfutils-devel BuildRequires: zlib-devel binutils-devel newt-devel python2-devel python2-docutils perl(ExtUtils::Embed) bison flex xz-devel BuildRequires: audit-libs-devel glibc-devel glibc-static +BuildRequires: asciidoc xmlto %ifnarch s390x %{arm} BuildRequires: numactl-devel %endif @@ -81,7 +82,6 @@ BuildRequires: rpm-build, elfutils BuildRequires: systemd Source0: https://www.kernel.org/pub/linux/kernel/v4.x/linux-%{kversion}.tar.xz -Source10: perf-man-%{kversion}.tar.gz # Sources for kernel-tools Source2000: cpupower.service @@ -244,6 +244,14 @@ pushd tools/bpf/bpftool make popd +# Build the docs +pushd tools/kvm/kvm_stat/ +make %{?_smp_mflags} man +popd +pushd tools/perf/Documentation/ +make %{?_smp_mflags} man +popd + ### ### install ### @@ -263,10 +271,9 @@ rm -rf %{buildroot}%{_docdir}/perf-tip %{perf_make} DESTDIR=%{buildroot} install-python_ext # perf man pages (note: implicit rpm magic compresses them later) -mkdir -p %{buildroot}/%{_mandir}/man1 -pushd %{buildroot}/%{_mandir}/man1 -tar -xf %{SOURCE10} -popd +install -d %{buildroot}/%{_mandir}/man1 +install -pm0644 tools/kvm/kvm_stat/kvm_stat.1 %{buildroot}/%{_mandir}/man1/ +install -pm0644 tools/perf/Documentation/*.1 %{buildroot}/%{_mandir}/man1/ make -C tools/power/cpupower DESTDIR=%{buildroot} libdir=%{_libdir} mandir=%{_mandir} CPUFREQ_BENCH=false install rm -f %{buildroot}%{_libdir}/*.{a,la} diff --git a/sources b/sources index 897028f..8715868 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ SHA512 (linux-4.16.tar.xz) = ab47849314b177d0eec9dbf261f33972b0d89fb92fb0650130ffa7abc2f36c0fab2d06317dc1683c51a472a9a631573a9b1e7258d6281a2ee189897827f14662 -SHA512 (perf-man-4.16.tar.gz) = 1a132e62840e9f5e7f9f4b937adfe773fa78585ad161f554d7cd45770447ffbfd1f6a5c7087002bbef800bcfbbd202793a0bf4f1137cb7dc5642875682239037