Don't strip bytecode binary (see RHBZ#435559).

This commit is contained in:
Richard Jones 2011-12-08 18:26:42 +01:00
parent f70cdb126f
commit 08b96c17a1
1 changed files with 22 additions and 3 deletions

View File

@ -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@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)