diff --git a/unison.spec b/unison.spec index f3f0c27..f743ab7 100644 --- a/unison.spec +++ b/unison.spec @@ -37,13 +37,14 @@ Source1: %pkg.desktop BuildRequires: ocaml(ocaml_base_version) >= 4.08 BuildRequires: ocaml-rpm-macros >= 20230101 %if "%build_flavor" == "doc" +%if %suse_version > 1500 || 0%?sle_version > 150300 BuildRequires: hevea BuildRequires: lynx +%endif BuildRequires: texlive-dvips BuildRequires: texlive-latex %else BuildRequires: ocaml-dune >= 2.3 -BuildRequires: ocamlfind(findlib) BuildRequires: ocamlfind(lablgtk3) BuildRequires: pkgconfig(ncursesw) %if 0%{?suse_version} > 0 @@ -87,9 +88,12 @@ dune_release_pkgs='unison,unison-gui,unison-fsmonitor' %endif %install +> files %if "%build_flavor" == "doc" mkdir -vp %buildroot%_mandir/man1 cp -avt %buildroot%_mandir/man1 man/%pkg.1 +test -f doc/%pkg-manual.html && echo "%%doc $_" >> files +test -f doc/%pkg-manual.pdf && echo "%%doc $_" >> files %else %ocaml_dune_install %ocaml_create_file_list @@ -105,10 +109,9 @@ install -m 644 -D %{SOURCE1} %buildroot/%_datadir/applications/%name.desktop %endif %endif -%files +%files -f files %defattr(-,root,root,-) %if "%build_flavor" == "doc" -%doc doc/%pkg-manual.html doc/%pkg-manual.pdf %_mandir/man1/%pkg.* %else %doc src/COPYING