- Update to version 3.0.3

see included CHANGES.md for details
- Remove subpackage configurator
- Add subpackage bootstrap

OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-dune?expand=0&rev=77
This commit is contained in:
Olaf Hering 2022-04-04 15:20:58 +00:00 committed by Git OBS Bridge
parent 9e7855a505
commit af38e4ca3d
6 changed files with 79 additions and 36 deletions

View File

@ -1,3 +1,3 @@
<multibuild>
<package>configurator</package>
<package>bootstrap</package>
</multibuild>

View File

@ -1,7 +1,7 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="filename">ocaml-dune</param>
<param name="revision">dea03875affccc0620e902d28fed8d6b4351e112</param>
<param name="revision">68c36597dfb99187ccbadf578988deaf690c4e25</param>
<param name="scm">git</param>
<param name="submodules">disable</param>
<param name="url">https://github.com/ocaml/dune.git</param>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c0723b687ede918556949252804819d56f37b6dfd42a56df0e22275a1b387c58
size 1022044

3
ocaml-dune-3.0.3.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:30ea08cee53acd589ff75e8e072142364138d378a609e1d51bdde55221fd2e87
size 1271024

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Apr 4 04:04:04 UTC 2022 - ohering@suse.de
- Update to version 3.0.3
see included CHANGES.md for details
- Remove subpackage configurator
- Add subpackage bootstrap
-------------------------------------------------------------------
Sun Mar 13 13:13:13 UTC 2022 - ohering@suse.de

View File

@ -1,7 +1,7 @@
#
# spec file for package ocaml-dune
#
# Copyright (c) 2021 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -23,8 +23,9 @@
%endif
%define pkg ocaml-dune
%global _buildshell /bin/bash
Name: %pkg%nsuffix
Version: 2.9.3
Version: 3.0.3
Release: 0
%{?ocaml_preserve_bytecode}
Summary: A composable build system for OCaml
@ -34,31 +35,29 @@ BuildRoot: %_tmppath/%name-%version-build
URL: https://opam.ocaml.org/packages/dune
Source0: %pkg-%version.tar.xz
Requires: ocamlfind(compiler-libs)
BuildRequires: ocaml-rpm-macros >= 20210911
BuildRequires: ocaml-rpm-macros >= 20220222
BuildRequires: ocaml(ocaml_base_version) >= 4.08
%if "%build_flavor" == ""
BuildRequires: ocamlfind(compiler-libs)
BuildRequires: ocaml-dune-bootstrap = %version
BuildRequires: ocamlfind(csexp)
BuildRequires: ocamlfind(pp)
BuildRequires: ocamlfind(result)
Provides: ocaml-dune-configurator == %version-%release
Obsoletes: ocaml-dune-configurator < %version-%release
%description
A composable build system for OCaml
%endif
%if "%build_flavor" == "configurator"
BuildRequires: ocaml-dune = %version
BuildRequires: ocamlfind(csexp)
BuildRequires: ocamlfind(result)
%if "%build_flavor" == "bootstrap"
%description
dune-configurator is a small library that helps writing OCaml scripts that
test features available on the system, in order to generate config.h
files for instance.
Among other things, dune-configurator allows one to:
- test if a C program compiles
- query pkg-config
- import #define from OCaml header files
- generate config.h file
This package provides a minimal dune binary in %ocaml_dune_bootstrap_directory
to build a few number of packages to bootstrap the full dune package.
%endif
%package devel
Summary: Development files for %name
Group: Development/Languages/OCaml
Provides: ocaml-dune-configurator-devel == %version-%release
Obsoletes: ocaml-dune-configurator-devel < %version-%release
Requires: %name = %version
%description devel
@ -69,31 +68,67 @@ developing applications that use %name.
%setup -q -n %pkg-%version
%build
%if "%build_flavor" == ""
mv -vb src/dune_rules/setup.defaults.ml src/dune_rules/setup.ml
ocaml configure.ml '--libdir=%ocaml_standard_library' '--mandir=%_mandir'
ocaml bootstrap.ml
rm -rfv '%_tmppath/%name-%release'
mkdir -vm 0700 '%_tmppath/%name-%release'
mkdir -vm 0700 '%_tmppath/%name-%release/bin'
test -x "$PWD/dune.exe"
ln -vs "$_" '%_tmppath/%name-%release/bin/dune'
export "PATH=%_tmppath/%name-%release/bin:$PATH"
dune_release_pkgs='dune,dune-action-plugin,dune-build-info,dune-glob,dune-private-libs'
ocaml configure.ml \
'--etcdir=%_sysconfdir' \
'--libdir=%ocaml_standard_library' \
'--mandir=%_mandir' \
%nil
#
%if "%build_flavor" == "bootstrap"
jobs="-j `/usr/bin/getconf _NPROCESSORS_ONLN`"
ocaml bootstrap.ml --verbose ${jobs}
./dune.exe build \
dune.install \
--release \
--profile dune-bootstrap \
--verbose \
${jobs} \
%nil
# leaving early
exit 0
%endif
#
%if "%build_flavor" == "configurator"
dune_release_pkgs='dune-configurator'
%endif
%if "%build_flavor" == ""
pkgs=(
dune
dune-action-plugin
dune-build-info
dune-configurator
dune-glob
dune-private-libs
dune-rpc
dune-site
dyn
fiber
ordering
stdune
xdg
)
dune_release_pkgs="${pkgs[*]}"
dune_release_pkgs="${dune_release_pkgs// /,}"
#
export PATH="%ocaml_dune_bootstrap_directory:$PATH"
%ocaml_dune_setup
%ocaml_dune_build
%endif
%install
export "PATH=%_tmppath/%name-%release/bin:$PATH"
%if "%build_flavor" == "bootstrap"
mkdir -vp %buildroot%ocaml_dune_bootstrap_directory
cp -avL dune.exe %buildroot%ocaml_dune_bootstrap_directory/dune
tee %name.files <<'_EOF_'
%ocaml_dune_bootstrap_directory
%%license LICENSE.md
_EOF_
echo '%dir %ocaml_dune_bootstrap_directory' > %name.files.devel
%endif
#
%if "%build_flavor" == ""
export PATH="%ocaml_dune_bootstrap_directory:$PATH"
%ocaml_dune_install
%ocaml_create_file_list
rm -rfv '%_tmppath/%name-%release'
%endif
%files -f %name.files
%defattr(-,root,root,-)