Accepting request 864001 from devel:languages:ocaml

- Adjust injection of version into findlib META files
  A file VERSION is not handled anymore by dune since 1.11.
  Remove version: from *.opam files, inject version into dune-project

OBS-URL: https://build.opensuse.org/request/show/864001
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ocaml-rpm-macros?expand=0&rev=10
This commit is contained in:
Dominique Leuenberger 2021-01-19 15:00:49 +00:00 committed by Git OBS Bridge
commit 7296b4eee7
2 changed files with 24 additions and 1 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Jan 14 14:14:14 UTC 2021 - ohering@suse.de
- Adjust injection of version into findlib META files
A file VERSION is not handled anymore by dune since 1.11.
Remove version: from *.opam files, inject version into dune-project
-------------------------------------------------------------------
Thu Aug 20 20:20:20 UTC 2020 - ohering@suse.de

View File

@ -17,7 +17,7 @@
Name: ocaml-rpm-macros
Version: 20200820
Version: 20210114
Release: 0
Summary: RPM macros for building OCaml source packages
License: GPL-2.0-only
@ -410,6 +410,22 @@ ocaml setup.ml -configure \\\
ulimit -s $((1024 * 64)) ; \
%endif
echo '%%{version}' | tee VERSION ; \
for opam in *.opam \
do\
test -f "${opam}" || continue ; \
sed -i~ '\
/^version:/d\
' "${opam}" ; \
diff -u "$_"~ "$_" || : got version ; \
done ; \
if test -f 'dune-project' ; \
then \
sed -i~ '\
/^([[:blank:]]*version[[:blank:]]\\+/d\
/^([[:blank:]]*lang[[:blank:]]\\+dune[[:blank:]]/a (version %%{version})\
' 'dune-project'; \
diff -u "$_"~ "$_" || : got version ; \
fi ; \
dune_for_release= ; \
: dune_release_pkgs \
if test -n "${dune_release_pkgs}" ; \