https://bugzilla.redhat.com/show_bug.cgi?id=2160996
--- Comment #15 from Arthur Bols arthur@bols.dev --- (In reply to Arthur Bols from comment #14)
I think this will create the most useful manpages:
mkdir -p %{buildroot}%{_mandir}/man1 help2man -N --version-string=%{version} -o%{buildroot}%{_mandir}/man1/%{name}_decoder-%{version}.1 %{buildroot}/%{_bindir}/%{name}_decoder help2man -N --version-string=%{version} -o %{buildroot}%{_mandir}/man1/%{name}_encoder-%{version}.1 %{buildroot}/%{_bindir}/%{name}_encoder
cd %{buildroot}%{_mandir}/man1 ln -s %{name}_decoder-%{version}.1 %{name}_decoder.1 ln -s %{name}_encoder-%{version}.1 %{name}_encoder.1 %{_mandir}/man1/%{name}_decoder.1* %{_mandir}/man1/%{name}_encoder.1* %{_mandir}/man1/%{name}_decoder-%{version}.1* %{_mandir}/man1/%{name}_encoder-%{version}.1*So what I did:
- Run help2man against draco_decoder to not include the version number in
the command name (I couldn't find a better way to do this).
- Add --version-string=%{version} Otherwise the --help output is included twice
- Create a symlink from draco_decoder to draco_decoder-%{version} This makes sure `man draco_decoder` and `man draco_decoder-1.5.5` work.
That doesn't work, I missed some things. This should be correct:
mkdir -p %{buildroot}%{_mandir}/man1 LD_LIBRARY_PATH=%{buildroot}%{_libdir} help2man -N --version-string=%{version} -o %{buildroot}%{_mandir}/man1/%{name}_decoder-%{version}.1 %{buildroot}%{_bindir}/%{name}_decoder LD_LIBRARY_PATH=%{buildroot}%{_libdir} help2man -N --version-string=%{version} -o %{buildroot}%{_mandir}/man1/%{name}_encoder-%{version}.1 %{buildroot}%{_bindir}/%{name}_encoder
%{_mandir}/man1/%{name}_decoder-%{version}.1* %{_mandir}/man1/%{name}_encoder-%{version}.1*
- The symlink for the manpage isn't needed - We need to add `LD_LIBRARY_PATH` to find libdraco.so.7