[Pkg-ocaml-maint-commits] [SCM] why packaging branch, master, updated. debian/2.13-1-38-g2ff07e3

Mehdi Dogguy dogguy at pps.jussieu.fr
Tue Nov 25 17:31:27 UTC 2008


The following commit has been merged in the master branch:
commit 2ff07e3f1a5d5b1d419dfd40a7ceb02633e3c0b7
Author: Mehdi Dogguy <dogguy at pps.jussieu.fr>
Date:   Tue Nov 25 16:28:23 2008 +0100

    This is the right solution to not install jc.a on non native archs

diff --git a/debian/libjessie-ocaml-dev.install.in b/debian/libjessie-ocaml-dev.install.in
index 4e32bf1..de7b6b7 100644
--- a/debian/libjessie-ocaml-dev.install.in
+++ b/debian/libjessie-ocaml-dev.install.in
@@ -1,4 +1,4 @@
 jc/jc.cm*a usr/lib/ocaml/@OCamlABI@/jessie/
 jc/jc.cmi usr/lib/ocaml/@OCamlABI@/jessie/
-jc/*.a usr/lib/ocaml/@OCamlABI@/jessie/
+ at OPT@jc/jc.a usr/lib/ocaml/@OCamlABI@/jessie/
 debian/META usr/lib/ocaml/@OCamlABI@/jessie/
diff --git a/debian/rules b/debian/rules
index b3f890c..9721861 100755
--- a/debian/rules
+++ b/debian/rules
@@ -20,6 +20,12 @@ WHYDIR    = $(CURDIR)/debian/why
 OCAMLABI := $(shell ocamlc -version)
 OFILES   := $(patsubst %.in,%,$(wildcard debian/*.in))
 VERSION   = $(shell cat Version | grep ^VERSION | cut -d= -f 2)
+OCAMLINITSED := -e 's/@OCamlABI@/$(OCAMLABI)/g' -e 's/@VERSION@/$(VERSION)/g'
+ifeq ($(shell test -e /usr/bin/ocamlopt && echo yes),yes)
+	OCAMLINITSED += -e 's/^@OPT@//'
+else
+	OCAMLINITSED += -e '/^@OPT@/d'
+endif
 
 CFLAGS = -Wall -g
 
@@ -31,9 +37,7 @@ endif
 
 ocamlinit:
 	for f in $(OFILES); do                      \
-		sed -e 's/@OCamlABI@/$(OCAMLABI)/g' \
-		    -e 's/@VERSION@/$(VERSION)/g'   \
-		$$f.in > $$f;                       \
+		sed $(OCAMLINITSED) $$f.in > $$f;   \
 	done
 
 config.status: configure

-- 
why packaging



More information about the Pkg-ocaml-maint-commits mailing list