[Pkg-ocaml-maint-commits] [SCM] jocaml packaging branch, master, updated. upstream/3.11.0-15-gdf90773

Samuel Mimram smimram at debian.org
Fri Feb 27 17:58:47 UTC 2009


The following commit has been merged in the master branch:
commit 2233ae769269abd3878daf86fca896d8921dba06
Author: Samuel Mimram <smimram at debian.org>
Date:   Fri Feb 27 14:20:02 2009 +0100

    Use dh-ocaml.

diff --git a/debian/control b/debian/control
index a8e4897..44b9edc 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: devel
 Priority: optional
 Maintainer: Debian OCaml Maintainers <debian-ocaml-maint at lists.debian.org>
 Uploaders: Mehdi Dogguy <dogguy at pps.jussieu.fr>, Samuel Mimram <smimram at debian.org>
-Build-Depends: debhelper (>= 7), autotools-dev, libx11-dev
+Build-Depends: debhelper (>= 7), autotools-dev, libx11-dev, dh-ocaml, ocaml-nox (>= 3.11)
 Homepage: http://jocaml.inria.fr/
 Standards-Version: 3.8.0
 Vcs-Git: git://git.debian.org/git/pkg-ocaml-maint/packages/jocaml.git
@@ -14,9 +14,7 @@ Architecture: any
 Depends: ${shlibs:Depends}, ocaml-nox-${F:JOCamlABI}
 Provides: jocaml-${F:JOCamlABI}
 Description: OCaml extended for concurrent and distributed programming
- The JoCaml programming language is an experimental extension of the
- Objective-Caml language with high-level communications and synchronizations
- primitives between processes. This enables programmers to rapidly develop
- distributed large-scale applications, using both Objective-Caml ease of
- programmation and extended libraries, and the join-calculus distributed and
- concurrent features.
+ The JoCaml programming language is an extension of the OCaml language with
+ high-level prmitives for communication and synchronization between processes.
+ This enables programmers to rapidly develop distributed large-scale
+ applications using the expressivity of OCaml.
diff --git a/debian/jocaml.dirs.in b/debian/jocaml.dirs.in
index b95cceb..2fff24b 100644
--- a/debian/jocaml.dirs.in
+++ b/debian/jocaml.dirs.in
@@ -1,2 +1,2 @@
 usr/bin
-usr/lib/ocaml/@JOCamlABI@/
+ at JOCamlStdlibDir@
diff --git a/debian/jocaml.install.in b/debian/jocaml.install.in
index a443fd5..02dbd18 100644
--- a/debian/jocaml.install.in
+++ b/debian/jocaml.install.in
@@ -1,3 +1,3 @@
 usr/bin/jocaml*
-usr/lib/ocaml/@JOCamlABI@/threads/join*
-usr/lib/ocaml/@JOCamlABI@/vmthreads/join*
+ at JOCamlStdlibDir@/threads/join*
+ at JOCamlStdlibDir@/vmthreads/join*
diff --git a/debian/native-archs b/debian/native-archs
deleted file mode 100644
index 17daf3e..0000000
--- a/debian/native-archs
+++ /dev/null
@@ -1 +0,0 @@
-amd64 hurd-i386 i386 kfreebsd-i386 powerpc sparc
diff --git a/debian/rules b/debian/rules
index 8bc9682..fcc79fd 100755
--- a/debian/rules
+++ b/debian/rules
@@ -12,28 +12,28 @@
 
 #export DH_VERBOSE=1
 
+include /usr/share/ocaml/ocamlvars.mk
+include /usr/share/ocaml/ocamlinit.mk
+
 export DH_OPTIONS
 
 DEB_HOST_GNU_TYPE  := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
-JOCAMLABI  := $(shell head -1 VERSION)
-ARCHS      := $(filter "`cat debian/native-archs`", $(DEB_HOST_GNU_TYPE))
-NATIVECODE := $(shell [ -z "$(ARCHS)" ] || echo yes)
-OPTTARGET  := $(if $(NATIVECODE),,opt opt.opt)
-OFILES     := $(patsubst %.in,%,$(wildcard debian/*.in))
+JOCAML_ABI         := $(shell head -1 VERSION)
+JOCAML_OPT_ARCH    := $(OCAML_OPT_ARCH)
+JOCAML_STDLIB_DIR  := /usr/lib/jocaml/$(JOCAML_ABI)
 
-pre-config:
-	for f in $(OFILES); do sed -e 's/@JOCamlABI@/$(JOCAMLABI)/g' $$f.in > $$f; done
-	if [ -n "$(OPTTARGET)" ]; then                           \
-		cp  debian/jocaml.links.opt debian/jocaml.links; \
-	fi
+OPTTARGET := $(if $(JOCAML_OPT_ARCH),,opt opt.opt)
+
+OCAMLINIT_SED += -e 's/@JOCamlABI@/$(JOCAML_ABI)/g'
+OCAMLINIT_SET += -e 's/@JOCamlStdlibDir@/$(JOCAML_STDLIB_DIR)/g'
 
-config-stamp: pre-config
+config-stamp: ocamlinit
 	dh_testdir
-	./configure --prefix /usr            \
-	--libdir /usr/lib/ocaml/$(JOCAMLABI) \
-	--mandir /usr/share/man              \
+	./configure --prefix /usr     \
+	--libdir $(JOCAML_STDLIB_DIR) \
+	--mandir /usr/share/man       \
 	--host $(DEB_HOST_GNU_TYPE)
 	touch $@
 
@@ -47,10 +47,9 @@ build-arch-stamp:
 
 build-indep: config-stamp build-indep-stamp
 build-indep-stamp:
-	# create ocaml source tarball
 	touch $@
 
-clean:
+clean: ocamlinit-clean
 	dh_testdir
 	dh_testroot
 	$(RM) -rf build-indep-stamp build-arch-stamp config-stamp myocamlbuild_config.ml
@@ -69,13 +68,16 @@ install: build-arch build-indep
 	dh_testroot
 	dh_prep
 	dh_installdirs
+ifneq ($(JOCAML_OPT_ARCH),)
+	cp  debian/jocaml.links.opt debian/jocaml.links
+endif
 	mkdir -p $(CURDIR)/debian/tmp/usr
-	$(MAKE) PREFIX=$(CURDIR)/debian/tmp/usr LIBDIR=$(CURDIR)/debian/tmp/usr/lib/ocaml/$(JOCAMLABI) install
+	$(MAKE) PREFIX=$(CURDIR)/debian/tmp/usr LIBDIR=$(CURDIR)/debian/tmp/usr/lib/jocaml/$(JOCAML_ABI) install
 
 binary-common:
 	dh_testdir
 	dh_testroot
-	dh_install --sourcedir=$(CURDIR)/debian/tmp
+	dh_install --list-missing
 	dh_installchangelogs Changes
 	dh_installdocs
 	dh_installman
@@ -86,7 +88,7 @@ binary-common:
 	dh_makeshlibs
 	dh_installdeb
 	dh_shlibdeps
-	dh_gencontrol -- -VF:JOCamlABI="$(JOCAMLABI)"
+	dh_gencontrol -- -VF:JOCamlABI="$(JOCAML_ABI)"
 	dh_md5sums
 	dh_builddeb
 

-- 
jocaml packaging



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