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(ocaml_base_version) >= 4.08
BuildRequires: ocaml-rpm-macros >= 20230101 BuildRequires: ocaml-rpm-macros >= 20230101
%if "%build_flavor" == "doc" %if "%build_flavor" == "doc"
%if %suse_version > 1500 || 0%?sle_version > 150300
BuildRequires: hevea BuildRequires: hevea
BuildRequires: lynx BuildRequires: lynx
%endif
BuildRequires: texlive-dvips BuildRequires: texlive-dvips
BuildRequires: texlive-latex BuildRequires: texlive-latex
%else %else
BuildRequires: ocaml-dune >= 2.3 BuildRequires: ocaml-dune >= 2.3
BuildRequires: ocamlfind(findlib)
BuildRequires: ocamlfind(lablgtk3) BuildRequires: ocamlfind(lablgtk3)
BuildRequires: pkgconfig(ncursesw) BuildRequires: pkgconfig(ncursesw)
%if 0%{?suse_version} > 0 %if 0%{?suse_version} > 0
@ -87,9 +88,12 @@ dune_release_pkgs='unison,unison-gui,unison-fsmonitor'
%endif %endif
%install %install
> files
%if "%build_flavor" == "doc" %if "%build_flavor" == "doc"
mkdir -vp %buildroot%_mandir/man1 mkdir -vp %buildroot%_mandir/man1
cp -avt %buildroot%_mandir/man1 man/%pkg.1 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 %else
%ocaml_dune_install %ocaml_dune_install
%ocaml_create_file_list %ocaml_create_file_list
@ -105,10 +109,9 @@ install -m 644 -D %{SOURCE1} %buildroot/%_datadir/applications/%name.desktop
%endif %endif
%endif %endif
%files %files -f files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%if "%build_flavor" == "doc" %if "%build_flavor" == "doc"
%doc doc/%pkg-manual.html doc/%pkg-manual.pdf
%_mandir/man1/%pkg.* %_mandir/man1/%pkg.*
%else %else
%doc src/COPYING %doc src/COPYING