From 348a05a374add6972b2c560fe24c225ca4597739 Mon Sep 17 00:00:00 2001 From: Sergey Avseyev Date: Thu, 9 May 2019 13:05:08 +0300 Subject: [PATCH] Update build scripts to use dune --- utop.spec | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/utop.spec b/utop.spec index 63fa083..e2987f4 100644 --- a/utop.spec +++ b/utop.spec @@ -1,6 +1,6 @@ Name: utop Version: 2.2.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Improved toplevel for OCaml License: BSD @@ -11,7 +11,7 @@ BuildRequires: ocaml BuildRequires: ocaml-findlib BuildRequires: ocaml-lambda-term BuildRequires: ocaml-cppo -BuildRequires: jbuilder +BuildRequires: ocaml-dune BuildRequires: opam-installer # for utop.el @@ -41,16 +41,21 @@ developing applications that use %{name}. %autosetup %build -jbuilder build -p %{name} %{?_smp_mflags} +dune build --verbose \ + --for-release-of-packages=%{name} \ + %{?_smp_mflags} %install -export OCAMLFIND_DESTDIR=%{buildroot}%{_libdir}/ocaml -mkdir -p $OCAMLFIND_DESTDIR -jbuilder install --prefix %{buildroot}%{_prefix} +dune install --verbose \ + --for-release-of-packages=%{name} \ + --destdir=%{buildroot} \ + --libdir=%{_libdir}/ocaml + mkdir -p %{buildroot}%{_mandir}/man{1,5} -mv %{buildroot}%{_prefix}/man/*.1 %{buildroot}%{_mandir}/man1 -mv %{buildroot}%{_prefix}/man/*.5 %{buildroot}%{_mandir}/man5 -rm -rf %{buildroot}%{_prefix}/doc +mv %{buildroot}%{_prefix}/man/man1/*.1 %{buildroot}%{_mandir}/man1 +mv %{buildroot}%{_prefix}/man/man5/*.5 %{buildroot}%{_mandir}/man5 + +rm -f %{buildroot}/usr/doc/%{name}/{LICENSE,CHANGES.md,README.md} %files %license LICENSE @@ -64,11 +69,15 @@ rm -rf %{buildroot}%{_prefix}/doc %exclude %{_libdir}/ocaml/%{name}/*.mli %files devel +%license LICENSE %doc README.md CHANGES.md %{_libdir}/ocaml/%{name}/*.mli %changelog +* Thu May 09 2019 Sergey Avseyev - 2.2.0-3 +- Update build scripts + * Sun Aug 12 2018 Sergey Avseyev - 2.2.0-2 - Fix installing man pages