[Bug 767042] Review Request: js-of-ocaml - OCaml to Javascript compiler

bugzilla at redhat.com bugzilla at redhat.com
Wed Dec 21 20:55:16 UTC 2011


Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.


https://bugzilla.redhat.com/show_bug.cgi?id=767042

--- Comment #4 from Scott Tsai <scottt.tw at gmail.com> 2011-12-21 15:55:15 EST ---
Updated spec at same URL to incorporate these fixes:
1. Use RPM features not available on EPEL to simplify spec
2. Add /usr/bin/js_of_ocaml to prelink black list
3. Removed examples/graph_viewer/.depend
4. Add ExclusiveArch

diff --git a/js-of-ocaml.spec b/js-of-ocaml.spec
index 18db785..16c048d 100644
--- a/js-of-ocaml.spec
+++ b/js-of-ocaml.spec
@@ -1,8 +1,6 @@
 %global opt %(test -x %{_bindir}/ocamlopt && echo 1 || echo 0)
 %global debug_package %{nil}
-%global _use_internal_dependency_generator 0
-%global __find_requires /usr/lib/rpm/ocaml-find-requires.sh
-%global __find_provides /usr/lib/rpm/ocaml-find-provides.sh
+%global __provides_exclude_from ^%{_libdir}/ocaml/stublibs/.*\.so$

 Name:           js-of-ocaml
 Version:        1.0.9
@@ -16,12 +14,13 @@ Source0:       
http://ocsigen.org/download/js_of_ocaml-%{version}.tar.gz
 # Allow examples to be built with the distro packaged js-of-ocaml
 Source1:        Makefile.common.js-of-ocaml.examples

-BuildRequires:  ocaml >= 3.10.0
+BuildRequires:  ocaml
 BuildRequires:  ocaml-findlib-devel
 BuildRequires:  ocaml-ocamldoc
 BuildRequires:  ocaml-camlp4-devel
 BuildRequires:  ocaml-lwt >= 2.3.0
 BuildRequires:  chrpath
+ExclusiveArch: %{ocaml_arches}

 %description
 js_of_ocaml is a compiler of OCaml byte-code to JavaScript.
@@ -52,7 +51,6 @@ reference and examples for %{name}.
 make

 %install
-rm -rf $RPM_BUILD_ROOT
 export DESTDIR=$RPM_BUILD_ROOT
 export OCAMLFIND_DESTDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml
 mkdir -p $OCAMLFIND_DESTDIR $OCAMLFIND_DESTDIR/stublibs
@@ -70,17 +68,22 @@ cp lib/dlljs_of_ocaml.so $OCAMLFIND_DESTDIR/stublibs/
 strip $OCAMLFIND_DESTDIR/stublibs/dll*.so
 chrpath --delete $OCAMLFIND_DESTDIR/stublibs/dll*.so

+# NB. Do NOT strip the binaries and prevent prelink from stripping them too.
+# (https://bugzilla.redhat.com/show_bug.cgi?id=435559)
+mkdir -p $RPM_BUILD_ROOT/etc/prelink.conf.d
+echo '-b /usr/bin/js_of_ocaml' >
$RPM_BUILD_ROOT/etc/prelink.conf.d/js-of-ocaml.conf
+
 # docs
-find examples '(' -name '*.cmi' -or -name '*.cmo' -or -name '*.byte' ')' -exec
rm '{}' ';'
+find examples '(' -name '*.cmi' -or -name '*.cmo' -or -name '*.byte' -or -name
'.depend' ')' -exec rm '{}' ';'
 # Replacing Makefile.common allows the user to build the examples
 cp %{SOURCE1} examples/Makefile.common

 %files
-%defattr(-,root,root,-)
 %doc LICENSE README
 %{_libdir}/ocaml/js_of_ocaml/
 %{_libdir}/ocaml/stublibs/*.so
 %{_bindir}/js_of_ocaml
+%config(noreplace) /etc/prelink.conf.d/js-of-ocaml.conf

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the package-review mailing list