From af38e4ca3d597fced776903af2e1271e9256e090e6393ce4fabd71c21f33cd8b Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Mon, 4 Apr 2022 15:20:58 +0000 Subject: [PATCH] - 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 --- _multibuild | 2 +- _service | 2 +- ocaml-dune-2.9.3.tar.xz | 3 -- ocaml-dune-3.0.3.tar.xz | 3 ++ ocaml-dune.changes | 8 ++++ ocaml-dune.spec | 97 ++++++++++++++++++++++++++++------------- 6 files changed, 79 insertions(+), 36 deletions(-) delete mode 100644 ocaml-dune-2.9.3.tar.xz create mode 100644 ocaml-dune-3.0.3.tar.xz diff --git a/_multibuild b/_multibuild index 895a675..db67352 100644 --- a/_multibuild +++ b/_multibuild @@ -1,3 +1,3 @@ -configurator +bootstrap diff --git a/_service b/_service index 431e6bb..3164d57 100644 --- a/_service +++ b/_service @@ -1,7 +1,7 @@ ocaml-dune - dea03875affccc0620e902d28fed8d6b4351e112 + 68c36597dfb99187ccbadf578988deaf690c4e25 git disable https://github.com/ocaml/dune.git diff --git a/ocaml-dune-2.9.3.tar.xz b/ocaml-dune-2.9.3.tar.xz deleted file mode 100644 index 0f8338e..0000000 --- a/ocaml-dune-2.9.3.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c0723b687ede918556949252804819d56f37b6dfd42a56df0e22275a1b387c58 -size 1022044 diff --git a/ocaml-dune-3.0.3.tar.xz b/ocaml-dune-3.0.3.tar.xz new file mode 100644 index 0000000..da6d3a9 --- /dev/null +++ b/ocaml-dune-3.0.3.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:30ea08cee53acd589ff75e8e072142364138d378a609e1d51bdde55221fd2e87 +size 1271024 diff --git a/ocaml-dune.changes b/ocaml-dune.changes index e14527e..e3b3270 100644 --- a/ocaml-dune.changes +++ b/ocaml-dune.changes @@ -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 diff --git a/ocaml-dune.spec b/ocaml-dune.spec index 2fcfb9a..cbb9d81 100644 --- a/ocaml-dune.spec +++ b/ocaml-dune.spec @@ -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,-)