From 9ffd5495a1fb43e974198b126ec09ddc10b456e89c139dc5f25724d4d11b9e11 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Fri, 7 Jul 2023 15:30:30 +0000 Subject: [PATCH] docs OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/unison?expand=0&rev=37 --- unison.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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