From ea7d528fd16a077f8d8ad47cdf19a9a312c6dd2826460b827cc48981484ce00d Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Mon, 4 Apr 2022 15:17:03 +0000 Subject: [PATCH 1/2] remove braces from rpmspec macros OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-csexp?expand=0&rev=10 --- ocaml-csexp.spec | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/ocaml-csexp.spec b/ocaml-csexp.spec index 6aa51b7..26d3bee 100644 --- a/ocaml-csexp.spec +++ b/ocaml-csexp.spec @@ -17,18 +17,18 @@ %bcond_with ocaml_csexp_testsuite -%define build_flavor @BUILD_FLAVOR@%{nil} -%if "%{build_flavor}" == "testsuite" +%define build_flavor @BUILD_FLAVOR@%nil +%if "%build_flavor" == "testsuite" %if %{without ocaml_csexp_testsuite} ExclusiveArch: do-not-build %endif %define nsuffix -testsuite %else -%define nsuffix %{nil} +%define nsuffix %nil %endif %define pkg ocaml-csexp -Name: %{pkg}%{nsuffix} +Name: %pkg%nsuffix Version: 1.5.1 Release: 0 %{?ocaml_preserve_bytecode} @@ -37,12 +37,12 @@ License: MIT Group: Development/Languages/OCaml BuildRoot: %_tmppath/%name-%version-build URL: https://opam.ocaml.org/packages/csexp -Source0: %{pkg}-%{version}.tar.xz +Source0: %pkg-%version.tar.xz BuildRequires: ocaml BuildRequires: ocaml-dune BuildRequires: ocaml-rpm-macros >= 20210409 -%if "%{build_flavor}" == "testsuite" +%if "%build_flavor" == "testsuite" BuildRequires: ocamlfind(csexp) BuildRequires: ocamlfind(ppx_expect) %endif @@ -55,40 +55,40 @@ This library only provides a few helpers for simple applications. If you need mo To avoid a dependency on a particular S-expression library, the only module of this library is parameterised by the type of S-expressions. %package devel -Summary: Development files for %{name} +Summary: Development files for %name Group: Development/Languages/OCaml -Requires: %{name} = %{version} +Requires: %name = %version %description devel -The %{name}-devel package contains libraries and signature files for -developing applications that use %{name}. +The %name-devel package contains libraries and signature files for +developing applications that use %name. %prep -%setup -q -n %{pkg}-%{version} +%setup -q -n %pkg-%version %build dune_release_pkgs='csexp' %ocaml_dune_setup -%if "%{build_flavor}" == "" +%if "%build_flavor" == "" %ocaml_dune_build %endif %install -%if "%{build_flavor}" == "" +%if "%build_flavor" == "" %ocaml_dune_install %ocaml_create_file_list %endif -%if "%{build_flavor}" == "testsuite" +%if "%build_flavor" == "testsuite" %check %ocaml_dune_test %endif -%if "%{build_flavor}" == "" -%files -f %{name}.files +%if "%build_flavor" == "" +%files -f %name.files %defattr(-,root,root,-) -%files devel -f %{name}.files.devel +%files devel -f %name.files.devel %defattr(-,root,root,-) %endif From 6656414d8b7e9e9ff53e751cb752acbd3a0b7d19381c053e3cd3d5933a6616d8 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Mon, 4 Apr 2022 15:18:08 +0000 Subject: [PATCH 2/2] - Build with ocaml-dune-bootstrap OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-csexp?expand=0&rev=11 --- ocaml-csexp-1.5.1.tar.xz | 4 ++-- ocaml-csexp.changes | 5 +++++ ocaml-csexp.spec | 12 ++++++++++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/ocaml-csexp-1.5.1.tar.xz b/ocaml-csexp-1.5.1.tar.xz index aef532f..257a04d 100644 --- a/ocaml-csexp-1.5.1.tar.xz +++ b/ocaml-csexp-1.5.1.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c1a6ee8e0cc8d093b01fdee0734e366b6372cadd906dab58360be67a59622ade -size 10172 +oid sha256:d79a4af9a0e70dd5b6630453d6615267e6e0ebde3eba471ac0385630b1e90f82 +size 10204 diff --git a/ocaml-csexp.changes b/ocaml-csexp.changes index e2dd0ec..984ad5c 100644 --- a/ocaml-csexp.changes +++ b/ocaml-csexp.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Apr 4 04:04:04 UTC 2022 - ohering@suse.de + +- Build with ocaml-dune-bootstrap + ------------------------------------------------------------------- Fri Apr 9 09:09:09 UTC 2021 - ohering@suse.de diff --git a/ocaml-csexp.spec b/ocaml-csexp.spec index 26d3bee..8cf546f 100644 --- a/ocaml-csexp.spec +++ b/ocaml-csexp.spec @@ -1,7 +1,7 @@ # # spec file for package ocaml-csexp # -# 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 @@ -39,8 +39,12 @@ BuildRoot: %_tmppath/%name-%version-build URL: https://opam.ocaml.org/packages/csexp Source0: %pkg-%version.tar.xz BuildRequires: ocaml +%if "%build_flavor" == "" +BuildRequires: ocaml-dune-bootstrap +%else BuildRequires: ocaml-dune -BuildRequires: ocaml-rpm-macros >= 20210409 +%endif +BuildRequires: ocaml-rpm-macros >= 20220222 %if "%build_flavor" == "testsuite" BuildRequires: ocamlfind(csexp) @@ -67,6 +71,9 @@ developing applications that use %name. %setup -q -n %pkg-%version %build +%if "%build_flavor" == "" +export PATH="%ocaml_dune_bootstrap_directory:$PATH" +%endif dune_release_pkgs='csexp' %ocaml_dune_setup %if "%build_flavor" == "" @@ -75,6 +82,7 @@ dune_release_pkgs='csexp' %install %if "%build_flavor" == "" +export PATH="%ocaml_dune_bootstrap_directory:$PATH" %ocaml_dune_install %ocaml_create_file_list %endif