[ocaml-findlib] Don't strip bytecode binary (see RHBZ#435559).
Richard W.M. Jones
rjones at fedoraproject.org
Thu Dec 8 17:28:03 UTC 2011
commit 08b96c17a1c91aa5927b8ab3eaabd66844e73c84
Author: Richard Jones <rjones at redhat.com>
Date: Thu Dec 8 18:26:42 2011 +0100
Don't strip bytecode binary (see RHBZ#435559).
ocaml-findlib.spec | 25 ++++++++++++++++++++++---
1 files changed, 22 insertions(+), 3 deletions(-)
---
diff --git a/ocaml-findlib.spec b/ocaml-findlib.spec
index 8f8ae5e..9106eda 100644
--- a/ocaml-findlib.spec
+++ b/ocaml-findlib.spec
@@ -1,9 +1,12 @@
-%define opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
-%define debug_package %{nil}
+%global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
+%global debug_package %{nil}
+%if !%opt
+%global __strip /bin/true
+%endif
Name: ocaml-findlib
Version: 1.2.6
-Release: 3%{?dist}
+Release: 5%{?dist}
Summary: Objective CAML package manager and build helper
Group: Development/Libraries
@@ -67,7 +70,17 @@ mkdir -p $RPM_BUILD_ROOT%{_bindir}
make install prefix=$RPM_BUILD_ROOT OCAMLFIND_BIN=$RPM_BUILD_ROOT%{_bindir}
mv $RPM_BUILD_ROOT/$RPM_BUILD_ROOT%{_bindir}/* $RPM_BUILD_ROOT%{_bindir}
+%if %opt
strip $RPM_BUILD_ROOT%{_bindir}/ocamlfind
+%endif
+
+# If ocamlfind is bytecode, don't strip it and prevent prelink from
+# stripping it as well (RHBZ#435559).
+%if !%opt
+mkdir -p $RPM_BUILD_ROOT/etc/prelink.conf.d
+echo '-b /usr/bin/ocamlfind' \
+ > $RPM_BUILD_ROOT/etc/prelink.conf.d/ocaml-ocamlfind.conf
+%endif
%clean
@@ -93,6 +106,9 @@ rm -rf $RPM_BUILD_ROOT
%exclude %{_libdir}/ocaml/findlib/make_wizard
%exclude %{_libdir}/ocaml/findlib/make_wizard.pattern
%{_libdir}/ocaml/num-top
+%if !%opt
+%config(noreplace) %{_sysconfdir}/prelink.conf.d/ocaml-ocamlfind.conf
+%endif
%files devel
@@ -109,6 +125,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Thu Dec 8 2011 Richard W.M. Jones <rjones at redhat.com> - 1.2.6-5
+- Don't strip bytecode binary (see RHBZ#435559).
+
* Fri Jun 3 2011 Orion Poplawski - 1.2.6-3
- Add Requires: ocaml (Bug #710290)
More information about the scm-commits
mailing list