From 6acae0361b77a63a8df0ec6db119fac29d0575b7337e563642cfa195bbf71af8 Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Fri, 1 Nov 2019 23:56:52 +0000 Subject: [PATCH] - SLE_12 has still no license macro, package as doc instead OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-rpm-macros?expand=0&rev=28 --- ocaml-rpm-macros.changes | 1 + ocaml-rpm-macros.spec | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ocaml-rpm-macros.changes b/ocaml-rpm-macros.changes index bcc9ff7..e50ca5e 100644 --- a/ocaml-rpm-macros.changes +++ b/ocaml-rpm-macros.changes @@ -11,6 +11,7 @@ Fri Nov 1 12:34:56 UTC 2019 - ohering@suse.de - Pass --for-release-of-packages to dune via dune_release_pkgs= - Print potential BuildRequires during build - Package sml for camlp5 +- SLE_12 has still no license macro, package as doc instead ------------------------------------------------------------------- Wed Oct 9 05:48:16 UTC 2019 - ohering@suse.de diff --git a/ocaml-rpm-macros.spec b/ocaml-rpm-macros.spec index 65f71f4..7e2e2c2 100644 --- a/ocaml-rpm-macros.spec +++ b/ocaml-rpm-macros.spec @@ -115,7 +115,12 @@ tee %{buildroot}%{_rpmmacrodir}/macros.%{name} <<'_EOF_' LICENSE.txt \\\ ;\ do\ - test -f "${license}" && echo "%%%%license ${license}" >> '%%{name}.files.license' ;\ +%if 0%{?suse_version} > 1315 + license_macro='license' ;\ +%else + license_macro='doc' ;\ +%endif + test -f "${license}" && echo "%%%%${license_macro} ${license}" >> '%%{name}.files.license' ;\ done ;\ find %%{buildroot}$(ocamlc -where) | sed -ne '\ s@^%%{buildroot}@@\