From 523a87652d416471c996064456443b91cfd8383c681e98bedce3e24980bb4e3a Mon Sep 17 00:00:00 2001 From: Olaf Hering Date: Thu, 10 Oct 2019 06:48:18 +0000 Subject: [PATCH] - Package also /etc/ld.so.conf.d OBS-URL: https://build.opensuse.org/package/show/devel:languages:ocaml/ocaml-rpm-macros?expand=0&rev=22 --- ocaml-rpm-macros.changes | 1 + ocaml-rpm-macros.spec | 34 +++++++++++++++++++++++++++++++--- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/ocaml-rpm-macros.changes b/ocaml-rpm-macros.changes index 4c77060..ed7af51 100644 --- a/ocaml-rpm-macros.changes +++ b/ocaml-rpm-macros.changes @@ -6,6 +6,7 @@ Wed Oct 9 05:48:16 UTC 2019 - ohering@suse.de - Package also *.cmo - Package also *.so.owner - Package also *.o +- Package also /etc/ld.so.conf.d ------------------------------------------------------------------- Fri Oct 4 07:56:44 UTC 2019 - ohering@suse.de diff --git a/ocaml-rpm-macros.spec b/ocaml-rpm-macros.spec index e301697..0da9881 100644 --- a/ocaml-rpm-macros.spec +++ b/ocaml-rpm-macros.spec @@ -90,6 +90,7 @@ tee %{buildroot}%{_rpmmacrodir}/macros.%{name} <<'_EOF_' %%ocaml_create_file_list \ > %%{name}.files ;\ > %%{name}.files.devel ;\ + > %%{name}.files.ldsoconf ;\ > %%{name}.files.unhandled ;\ for i in \\\ COPYING \\\ @@ -124,7 +125,17 @@ tee %{buildroot}%{_rpmmacrodir}/macros.%{name} <<'_EOF_' w %%{name}.files.devel\ d\ }\ - /\\/[^/]\\+\\.\\(cmxs\\|so\\|so.owner\\)$/{\ + /\\/[^/]\\+\\.\\(so\\|so.owner\\)$/{\ + w %%{name}.files\ + s@\\/[^/]\\+$@@\ + s@^@%%dir @\ + w %%{name}.files\ + w %%{name}.files.ldsoconf\ + s@\\/[^/]\\+$@@\ + w %%{name}.files\ + d\ + }\ + /\\/[^/]\\+\\.\\(cmxs\\)$/{\ w %%{name}.files\ s@\\/[^/]\\+$@@\ s@^@%%dir @\ @@ -136,12 +147,29 @@ tee %{buildroot}%{_rpmmacrodir}/macros.%{name} <<'_EOF_' w %%{name}.files.unhandled\ d\ ' ;\ - for i in %%{name}.files %%{name}.files.devel ;\ + for i in \\\ + %%{name}.files \\\ + %%{name}.files.devel \\\ + %%{name}.files.ldsoconf \\\ + %%{name}.files.unhandled \\\ + ;\ do\ sort -u $i > $$ ;\ mv $$ $i ;\ done ;\ - head -n 1234 %%{name}.files %%{name}.files.devel %%{name}.files.unhandled ;\ + if test -s %%{name}.files.ldsoconf ;\ + then \ + ldsoconfd='/etc/ld.so.conf.d' ;\ + mkdir -vp "%%{buildroot}${ldsoconfd}" ;\ + sort -u %%{name}.files.ldsoconf > "%%{buildroot}${ldsoconfd}/%%{name}.conf" ;\ + echo "%config %%{buildroot}${ldsoconfd}/%%{name}.conf" >> %%{name}.files ;\ + fi ;\ + head -n 1234 \\\ + %%{name}.files \\\ + %%{name}.files.devel \\\ + %%{name}.files.ldsoconf \\\ + %%{name}.files.unhandled \\\ + ;\ %%{nil} # setup.ml comes from oasis, but this is here for libs oasis depends on