Add conditional to work around missing txt2man in el8.

f38
Richard Shaw 5 years ago
parent 8a3fd8b01b
commit 39f20ef038

@ -30,7 +30,10 @@ BuildRequires: perl(Getopt::Long)
BuildRequires: perl(Storable)
BuildRequires: perl(strict)
BuildRequires: sed
# https://bugzilla.redhat.com/show_bug.cgi?id=1741795
%if ! 0%{?rhel} > 7
BuildRequires: txt2man
%endif
Requires: elfutils
Requires: vtable-dumper >= 1.1
@ -58,18 +61,22 @@ mkdir -p %{buildroot}%{_prefix}
chmod 0755 %{buildroot}%{_bindir}/%{name}
%if ! 0%{?rhel} > 7
# Create manpage
mkdir -p %{buildroot}%{_mandir}/man1
%{__perl} abi-dumper.pl --help | sed "s|:$||g" | \
txt2man -t ABI-DUMPER -s 1 -v "User Commands" -r "ABI Dumper %{version}" > \
%{buildroot}%{_mandir}/man1/%{name}.1
%endif
%files
%license LICENSE
%doc README
%{_bindir}/%{name}
%if ! 0%{?rhel} > 7
%{_mandir}/man1/%{name}.1*
%endif
%changelog

Loading…
Cancel
Save