From 7271d0b8f776ddbf9fcaf6c4db4edb6b424de68d Mon Sep 17 00:00:00 2001 From: David Rheinsberg Date: Mon, 9 Mar 2020 12:45:02 +0100 Subject: [PATCH] spec: use `make man` and copy all man-pages Use `make man` rather than hard-coding man-page creation in the spec-file. Furthermore, install all man-pages, not just the base one. The commands are adjusted to account for possibly more man-pages being added. Tree-wide the only place to adjust for new man-pages being added is the `%files` list in the spec-file. --- osbuild.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/osbuild.spec b/osbuild.spec index 6036f014..bb0b5467 100644 --- a/osbuild.spec +++ b/osbuild.spec @@ -17,6 +17,7 @@ Source0: %{forgesource} BuildArch: noarch Summary: A build system for OS images +BuildRequires: make BuildRequires: python3-devel BuildRequires: python3-docutils @@ -51,7 +52,7 @@ A build system for OS images %build %py3_build -rst2man docs/%{name}.1.rst %{name}.1 +make man %install %py3_install @@ -74,7 +75,9 @@ mkdir -p %{buildroot}%{pkgdir}/assemblers/osbuild # documentation mkdir -p %{buildroot}%{_mandir}/man1 -install -m 644 osbuild.1 %{buildroot}%{_mandir}/man1/ +mkdir -p %{buildroot}%{_mandir}/man5 +install -p -m 0644 -t %{buildroot}%{_mandir}/man1/ docs/*.1 +install -p -m 0644 -t %{buildroot}%{_mandir}/man5/ docs/*.5 %check exit 0 @@ -85,6 +88,7 @@ exit 0 %license LICENSE %{_bindir}/osbuild %{_mandir}/man1/%{name}.1* +%{_mandir}/man5/%{name}-manifest.5* %{pkgdir} %files -n python3-%{pypi_name}