[Pkg-ocaml-maint-commits] [SCM] menhir packaging branch, master, updated. debian/20090204.dfsg-1-2-g2e19118
Mehdi Dogguy
dogguy at pps.jussieu.fr
Thu Feb 19 23:09:24 UTC 2009
The following commit has been merged in the master branch:
commit 2e191189d0821eee676b0956ad1e7ef539984910
Author: Mehdi Dogguy <dogguy at pps.jussieu.fr>
Date: Fri Feb 20 00:09:15 2009 +0100
Use dh-ocaml predefined variables.
diff --git a/debian/changelog b/debian/changelog
index 5146599..773a61c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
menhir (20090204.dfsg-2) UNRELEASED; urgency=low
* Depend on ocaml-nox, Closes: #516134.
+ * Use dh-ocaml predefined variables.
-- Mehdi Dogguy <dogguy at pps.jussieu.fr> Thu, 19 Feb 2009 23:41:32 +0100
diff --git a/debian/control b/debian/control
index 29045b7..2d07182 100644
--- a/debian/control
+++ b/debian/control
@@ -9,7 +9,7 @@ Build-Depends:
debhelper (>= 7.0.0),
dpatch,
ocaml-nox (>= 3.11.0),
- dh-ocaml
+ dh-ocaml (>= 0.2)
Standards-Version: 3.8.0
DM-Upload-Allowed: yes
Homepage: http://gallium.inria.fr/~fpottier/menhir/
diff --git a/debian/menhir.install.in b/debian/menhir.install.in
index d38f742..c839c29 100644
--- a/debian/menhir.install.in
+++ b/debian/menhir.install.in
@@ -1,4 +1,4 @@
src/standard.mly usr/share/menhir
demos usr/share/doc/menhir
-src/menhirLib.* usr/lib/ocaml/@OCAMLABI@/menhirLib/
-META usr/lib/ocaml/@OCAMLABI@/menhirLib/
+src/menhirLib.* @OCamlStdlibDir@/menhirLib/
+META @OCamlStdlibDir@/menhirLib/
diff --git a/debian/rules b/debian/rules
index 441b8ee..62ac337 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,32 +1,26 @@
#!/usr/bin/make -f
# -*- makefile -*-
-#export DH_VERBOSE=1
+export DH_VERBOSE=1
include /usr/share/dpatch/dpatch.make
+include /usr/share/ocaml/ocamlvars.mk
+include /usr/share/ocaml/ocamlinit.mk
DESTDIR := $(CURDIR)/debian/menhir
-OCAMLABI := $(shell ocamlc -version)
-IS_NATIVE:= $(wildcard /usr/bin/ocamlopt)
-TARGET := $(if $(IS_NATIVE),opt,byte)
-STRIPOPT := -e "$(if $(IS_NATIVE),,/native/d)"
-OCAML_IN_FILES := $(filter-out debian/control,$(patsubst %.in,%,$(wildcard debian/*.in)))
-
-ocamlinit: ocamlinit-stamp
-ocamlinit-stamp:
- for t in $(OCAML_IN_FILES); do \
- sed -e 's%@OCAMLABI@%$(OCAMLABI)%' $$t.in > $$t; \
- done
- sed $(STRIPOPT) src/META > META
- touch $@
-
-ocamlinit-clean:
- rm -f $(OCAML_IN_FILES)
+ifeq ($(OCAML_HAVE_OCAMLOPT), yes)
+ TARGET := opt
+else
+ TARGET := byte
+endif
-build: ocamlinit build-stamp
+build: ocamlinit-stamp build-stamp
build-stamp: patch-stamp
dh_testdir
$(MAKE) TARGET=$(TARGET) PREFIX=/usr
+ifeq ($(OCAML_HAVE_OCAMLOPT), no)
+ sed -e "/native/d" src/META > META
+endif
dh build --after auto_build
touch $@
@@ -41,12 +35,10 @@ install-stamp:
dh install --after auto_install
touch $@
-# Build architecture-independent files here.
binary-indep: install-stamp
-# Build architecture-dependent files here.
binary-arch: install-stamp
- echo 'F:OCamlAbi=$(OCAMLABI)' >> debian/menhir.substvars
+ echo 'F:OCamlAbi=$(OCAML_ABI)' >> debian/menhir.substvars
dh $@
binary: binary-indep binary-arch
--
menhir packaging
More information about the Pkg-ocaml-maint-commits
mailing list