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.
This commit is contained in:
David Rheinsberg 2020-03-09 12:45:02 +01:00 committed by Lars Karlitski
parent 3e1aa25cf1
commit 7271d0b8f7

View file

@ -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}