From 5bb60ff8c85ca6314c2f4cdad148a3f240e510ce6ecc3485187b2841ef17050a Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Fri, 4 Oct 2019 08:02:30 +0000 Subject: [PATCH] - Automatically package known license files in main pkg OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-rpm-macros?expand=0&rev=7 --- ocaml-rpm-macros.changes | 1 + ocaml-rpm-macros.spec | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/ocaml-rpm-macros.changes b/ocaml-rpm-macros.changes index bddd8f6..7e60832 100644 --- a/ocaml-rpm-macros.changes +++ b/ocaml-rpm-macros.changes @@ -2,6 +2,7 @@ Fri Oct 4 07:56:44 UTC 2019 - ohering@suse.de - Use _rpmmacrodir +- Automatically package known license files in main pkg ------------------------------------------------------------------- Mon Sep 30 14:15:16 UTC 2019 - ohering@suse.de diff --git a/ocaml-rpm-macros.spec b/ocaml-rpm-macros.spec index 553ea9d..c74a675 100644 --- a/ocaml-rpm-macros.spec +++ b/ocaml-rpm-macros.spec @@ -90,6 +90,17 @@ tee %{buildroot}%{_rpmmacrodir/macros.%{name} <<'_EOF_' %%ocaml_create_file_list \ > %%{name}.files ;\ > %%{name}.files.devel ;\ + for i in \ + COPYING \ + COPYING.txt \ + LICENCE \ + LICENSE \ + LICENSE.md \ + LICENSE.txt \ + ;\ + do\ + test -f "$i" && echo "%%license $i" >> %%{name}.files ;\ + done ;\ find %%{buildroot}$(ocamlc -where) | sed -ne '\ s@^%%{buildroot}@@\ /\\/\\(META\\|dune-package\\|opam\\)$/{\