[Pkg-ocaml-maint-commits] [SCM] lablgl packaging branch, master, updated. debian/1.04-1-12-gdcd2a41
Stephane Glondu
steph at glondu.net
Mon Feb 16 08:06:48 UTC 2009
The following commit has been merged in the master branch:
commit 92bfb6edf5da5fe6fe7b141bbaf8fb9079e7020d
Author: Stephane Glondu <steph at glondu.net>
Date: Mon Feb 16 08:46:23 2009 +0100
Get closer to CDBS interface
diff --git a/debian/liblablgl-ocaml-dev.dirs.in b/debian/liblablgl-ocaml-dev.dirs.in
index e35fd02..30ef5cd 100644
--- a/debian/liblablgl-ocaml-dev.dirs.in
+++ b/debian/liblablgl-ocaml-dev.dirs.in
@@ -1,2 +1,2 @@
usr/bin
-usr/lib/ocaml/#OcamlABI#/lablgl
+ at OCamlStdlibDir@/lablgl
diff --git a/debian/liblablgl-ocaml.dirs.in b/debian/liblablgl-ocaml.dirs.in
index 69d9e06..a8131b4 100644
--- a/debian/liblablgl-ocaml.dirs.in
+++ b/debian/liblablgl-ocaml.dirs.in
@@ -1 +1 @@
-usr/lib/ocaml/#OcamlABI#/stublibs
+ at OCamlDllDir@
diff --git a/debian/rules b/debian/rules
index fbd26df..8766062 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,20 +7,30 @@
include /usr/share/dpatch/dpatch.make
PACKAGE = lablgl
-OCAMLABI = ${shell ocamlc -version}
+OCAML_ABI := $(shell ocamlc -version)
+OCAML_STDLIB_DIR := $(shell ocamlc -where)
+OCAML_DLL_DIR := $(OCAML_STDLIB_DIR)/stublibs
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
export OCAML_LIBDIR=$(shell ocamlc -where)
-#debian/control:
-# sed -e 's%#OcamlABI#%$(OCAMLABI)%' $@.in >$@
+OCAML_IN_FILES := $(filter-out debian/control,$(patsubst %.in,%,$(wildcard debian/*.in)))
+OCAMLINIT_SED := -e 's%^ \+%%' \
+ -e 's%@OCamlABI@%$(OCAML_ABI)%' \
+ -e 's%@OCamlStdlibDir@%$(OCAML_STDLIB_DIR)%' \
+ -e 's%@OCamlDllDir@%$(OCAML_DLL_DIR)%'
+ifeq (,$(OCAML_OPT_ARCH))
+ OCAMLINIT_SED += -e '/^OPT: /d'
+else
+ OCAMLINIT_SED += -e 's/^OPT: //'
+endif
configure: configure-stamp
configure-stamp:
- for t in `find . -name \*.in | grep -v debian/control.in`; do \
- sed -e 's%#OcamlABI#%$(OCAMLABI)%' $$t >$${t%.in}; \
+ for t in $(OCAML_IN_FILES); do \
+ sed $(OCAMLINIT_SED) $$t.in > $$t; \
done
dh_testdir
@@ -84,7 +94,7 @@ install: build
mkdir -p debian/$$i/usr/share/doc/$$i/html/api; \
OCAMLDOC_INCLUDE=`find debian/$$i/$(OCAML_LIBDIR)/ -type d -exec echo -I \{} \;`; \
find debian/$$i/$(OCAML_LIBDIR)/ \
- -type f -name '*.mli' -or -name '*.ml' \
+ -type f -name '*.mli' -or -name '*.ml' \
| xargs ocamldoc -I $(OCAML_LIBDIR)/labltk \
-stars -m A -no-custom-tags $$OCAMLDOC_INCLUDE -html \
-d debian/$$i/usr/share/doc/$$i/html/api \
@@ -118,7 +128,7 @@ binary-arch: build install
# dh_makeshlibs -s
dh_installdeb -s
dh_shlibdeps -s
- dh_gencontrol -s -- -VF:OCamlABI="$(OCAMLABI)"
+ dh_gencontrol -s -- -VF:OCamlABI="$(OCAML_ABI)"
dh_md5sums -s
dh_builddeb -s
--
lablgl packaging
More information about the Pkg-ocaml-maint-commits
mailing list