File ocaml-dune.spec of Package ocaml-dune

# spec file for package ocaml-dune
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           ocaml-dune
Version:        1.0+beta20
Release:        0
Summary:        A composable build system for OCaml
License:        Apache-2.0
Group:          Development/Languages/OCaml
Conflicts:      ocaml-jbuilder
Conflicts:      ocaml-jbuilder-debuginfo
Conflicts:      ocaml-jbuilder-debugsource
Source:         %{name}-%{version}.tar.xz
BuildRequires:  ocaml
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

A composable build system for OCaml

%setup -q

sed -i~ s/ocamlopt/ocamlxxx/
diff -u || : diff
make %{?_smp_mflags} PREFIX=%{_prefix}

mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_mandir}/man1
cp -av _build/default/bin/main.exe %{buildroot}%{_bindir}/dune
ln -sfvbn dune %{buildroot}%{_bindir}/jbuilder
cp -av _build/default/doc/*.1 %{buildroot}%{_mandir}/man1/