1
0

- The filename for rpm *.attr files and the tag used within these

files must match. Otherwise rpm will not execute the helper scripts.
  Stick with tag 'ocaml', rename zocaml.attr to ocaml.attr. (bsc#1154874)
- Escape plain % chars

OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-rpm-macros?expand=0&rev=42
This commit is contained in:
Olaf Hering 2020-05-14 09:02:05 +00:00 committed by Git OBS Bridge
parent 67a46c7a1d
commit 5b8baeb9af
2 changed files with 20 additions and 11 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu May 14 14:14:14 UTC 2020 - ohering@suse.de
- The filename for rpm *.attr files and the tag used within these
files must match. Otherwise rpm will not execute the helper scripts.
Stick with tag 'ocaml', rename zocaml.attr to ocaml.attr. (bsc#1154874)
- Escape plain % chars
-------------------------------------------------------------------
Sun Apr 12 12:12:12 UTC 2020 - ohering@suse.de

View File

@ -1,7 +1,7 @@
#
# spec file for package ocaml-rpm-macros
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -16,7 +16,7 @@
#
Name: ocaml-rpm-macros
Version: 20200412
Version: 20200514
Release: 0
Summary: RPM macros for building OCaml source packages
License: GPL-2.0-only
@ -63,14 +63,15 @@ in ocaml spec files.
%install
# map ocamlobjinfo output to rpm Provides/Requires
# this tag name MUST match what ocaml.spec uses internally
tag="ocaml"
mkdir -vp %{buildroot}%{_rpmconfigdir}/fileattrs
tee %{buildroot}%{_rpmconfigdir}/fileattrs/z${tag}.attr <<_EOF_
%__${tag}_provides %%{_rpmconfigdir}/${tag}.sh --provides
%__${tag}_requires %%{_rpmconfigdir}/${tag}.sh --requires
%__${tag}_magic ^(ELF|Objective caml|OCaml) .*$
%__${tag}_path .(cma|cmi|cmo|cmx|cmxa|cmxs)$
%__${tag}_flags magic_and_path
tee %{buildroot}%{_rpmconfigdir}/fileattrs/${tag}.attr <<_EOF_
%%__${tag}_provides %%{_rpmconfigdir}/${tag}.sh --provides
%%__${tag}_requires %%{_rpmconfigdir}/${tag}.sh --requires
%%__${tag}_magic ^(ELF|Objective caml|OCaml) .*$
%%__${tag}_path .(cma|cmi|cmo|cmx|cmxa|cmxs)$
%%__${tag}_flags magic_and_path
_EOF_
#
tee %{buildroot}%{_rpmconfigdir}/${tag}.sh < %{SOURCE0}
@ -79,9 +80,9 @@ tee %{buildroot}%{_rpmconfigdir}/${tag}.sh < %{SOURCE0}
tag="ocamlfind"
mkdir -vp %{buildroot}%{_rpmconfigdir}/fileattrs
tee %{buildroot}%{_rpmconfigdir}/fileattrs/${tag}.attr <<_EOF_
%__${tag}_provides %%{_rpmconfigdir}/${tag}.sh -prov
%__${tag}_requires %%{_rpmconfigdir}/${tag}.sh -req
%__${tag}_path ^%{ocaml_standard_library}/.*/META$|^%{ocaml_standard_library}/META$
%%__${tag}_provides %%{_rpmconfigdir}/${tag}.sh -prov
%%__${tag}_requires %%{_rpmconfigdir}/${tag}.sh -req
%%__${tag}_path ^%{ocaml_standard_library}/.*/META$|^%{ocaml_standard_library}/META$
_EOF_
#
tee %{buildroot}%{_rpmconfigdir}/${tag}.sh < %{SOURCE1}