[Pkg-ocaml-maint-commits] [SCM] ocamlduce packaging branch, master, updated. debian/3.11.0.0.rc1-1-15-gf7f9f93

Stephane Glondu steph at glondu.net
Wed Jun 17 09:11:23 UTC 2009


The following commit has been merged in the master branch:
commit 23d2d9e872ef8829aba43f0e890c62661cdf21b5
Author: Stephane Glondu <steph at glondu.net>
Date:   Wed Jun 17 10:11:42 2009 +0200

    Build and install native code plugin
    
     * use quilt
     * add Build-and-install-native-code-plugin.patch

diff --git a/debian/control b/debian/control
index 487690f..3cb86f8 100644
--- a/debian/control
+++ b/debian/control
@@ -5,7 +5,8 @@ Maintainer: Debian OCaml Maintainers <debian-ocaml-maint at lists.debian.org>
 Uploaders: Stephane Glondu <steph at glondu.net>
 DM-Upload-Allowed: yes
 Build-Depends:
- debhelper (>= 7),
+ debhelper (>= 7.0.52),
+ quilt (>= 0.46-7),
  dh-ocaml,
  patch,
  ocaml-source (>= 3.11.1),
diff --git a/debian/patches/0001-Build-and-install-native-code-plugin.patch b/debian/patches/0001-Build-and-install-native-code-plugin.patch
new file mode 100644
index 0000000..9d830de
--- /dev/null
+++ b/debian/patches/0001-Build-and-install-native-code-plugin.patch
@@ -0,0 +1,49 @@
+From: Stephane Glondu <steph at glondu.net>
+Date: Wed, 17 Jun 2009 10:06:38 +0200
+Subject: [PATCH] Build and install native-code plugin
+
+---
+ Makefile       |    3 ++-
+ mkocamlduce.sh |    2 ++
+ 2 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index e8ca4fc..17ac494 100644
+--- a/Makefile
++++ b/Makefile
+@@ -20,6 +20,7 @@ CMI := $(MLI:.mli=.cmi) otherlibs/ocamlduce/cduce_types.cmi
+ 
+ CMA := otherlibs/ocamlduce/ocamlduce.cma
+ CMXA := $(CMA:.cma=.cmxa) $(CMA:.cma=.a)
++CMXS := $(CMA:.cma=.cmxs)
+ 
+ TOPCMO := toplevel/toploop.cmo toplevel/topdirs.cmo \
+   toplevel/topmain.cmo toplevel/topstart.cmo \
+@@ -76,7 +77,7 @@ installbyte: installcommon-stamp
+ installopt: installcommon-stamp
+ 	@echo "===> Installing native files... <==="
+ 	for X in $(OPT); do Y=$${X##*/}; Y=$${Y#ocaml}; install -m 755 _build/$$X $(BINDIR)/ocamlduce$$Y; done
+-	install -m 644 $(addprefix _build/,$(CMXA)) $(DUCE_LIBDIR)
++	install -m 644 $(addprefix _build/,$(CMXA) $(CMXS)) $(DUCE_LIBDIR)
+ 
+ clean:
+ 	build/distclean.sh
+diff --git a/mkocamlduce.sh b/mkocamlduce.sh
+index b677ae8..2dec75e 100755
+--- a/mkocamlduce.sh
++++ b/mkocamlduce.sh
+@@ -27,6 +27,7 @@ cd ..
+ 
+ OCAMLDUCE_BYTE="otherlibs/ocamlduce/ocamlduce.cma"
+ OCAMLDUCE_NATIVE="otherlibs/ocamlduce/ocamlduce.cmxa"
++OCAMLDUCE_SHARED="otherlibs/ocamlduce/ocamlduce.cmxs"
+ 
+ INI_TARGETS="ocamlc tools/ocamldep.byte"
+ ALL_TARGETS="$TOPLEVEL $OCAMLDUCE_BYTE $TOOLS_BYTE $OCAMLDOC_BYTE"
+@@ -51,4 +52,5 @@ cp -p _build/tools/ocamldep.byte _build/tools/ocamldep
+ if [ x"$HAS_NATIVE" = x"y" ]; then
+   rm -f _build/tools/ocamldep.opt
+   cp -p _build/tools/ocamldep.native _build/tools/ocamldep.opt
++  ocamlopt -shared -linkall -o "_build/$OCAMLDUCE_SHARED" "_build/$OCAMLDUCE_NATIVE"
+ fi
+-- 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..6499cff
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Build-and-install-native-code-plugin.patch
diff --git a/debian/rules b/debian/rules
index 82ae5b2..de2300e 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,9 +11,10 @@ INSTALL_TARGET := installbyte $(if $(OCAML_OPT_ARCH),installopt)
 
 OCAML_SRCDIR := ocaml-$(OCAML_ABI)
 MAKE_DUCE := $(MAKE) -C $(OCAML_SRCDIR) -f Makefile.ocamlduce
+DH := dh --with quilt
 
 config-stamp: ocamlinit-stamp
-	dh build --before auto_configure
+	$(DH) build --before auto_configure
 	$(MAKE) prepare
 	cd $(OCAML_SRCDIR) && \
 	  ./configure -prefix /usr -libdir $(OCAML_STDLIB_DIR)
@@ -25,27 +26,27 @@ config-stamp: ocamlinit-stamp
 build: build-stamp
 build-stamp: config-stamp
 	$(MAKE_DUCE) $(BUILD_TARGET)
-	dh build --after auto_build
+	$(DH) build --after auto_build
 	touch $@
 
 install: install-stamp
 install-stamp: build-stamp
-	dh install --before auto_install
+	$(DH) install --before auto_install
 	$(MAKE_DUCE) PREFIX=../debian/tmp/usr $(INSTALL_TARGET)
-	dh install --after auto_install
+	$(DH) install --after auto_install
 	touch $@
 
 clean: ocamlinit-clean
-	dh clean --before dh_auto_clean
+	$(DH) clean --before dh_auto_clean
 	rm -Rf $(OCAML_SRCDIR)
-	dh clean --after dh_auto_clean
+	$(DH) clean --after dh_auto_clean
 
 binary-indep: install-stamp
 	@echo No binary-indep packages
 
 binary-arch: install-stamp
 	echo 'F:OCamlABI=$(shell ocamlc -version)' >> debian/ocamlduce.substvars
-	dh $@
+	$(DH) $@
 
 binary: binary-indep binary-arch
 

-- 
ocamlduce packaging



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