Olaf Hering 2023-07-07 15:30:30 +00:00 committed by Git OBS Bridge
parent 4da58a6582
commit 9ffd5495a1

View File

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