[Pkg-ocaml-maint-commits] [SCM] findlib packaging branch, master, updated. debian/1.2.5+debian-1-15-g8b51437
Stephane Glondu
steph at glondu.net
Sat Feb 12 11:09:27 UTC 2011
The following commit has been merged in the master branch:
commit b48ec8897c9147c02cc0cdbb1d43d6b4c76f3143
Author: Stephane Glondu <steph at glondu.net>
Date: Sat Feb 12 10:58:37 2011 +0100
Rewrite debian/rules using dh with overrides
On the way, bump debhelper compat level to 8.
diff --git a/debian/compat b/debian/compat
index 7f8f011..45a4fb7 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-7
+8
diff --git a/debian/control b/debian/control
index 69807fd..925ab99 100644
--- a/debian/control
+++ b/debian/control
@@ -7,12 +7,11 @@ Uploaders:
Mehdi Dogguy <mehdi at debian.org>,
Stéphane Glondu <glondu at debian.org>
Build-Depends:
- debhelper (>= 7),
+ debhelper (>= 8),
ocaml (>= 3.11.1-3~),
camlp4,
m4,
gawk | awk,
- cdbs,
dh-ocaml (>= 0.9)
Standards-Version: 3.8.3
Vcs-Git: git://git.debian.org/git/pkg-ocaml-maint/packages/findlib.git
diff --git a/debian/rules b/debian/rules
index ba73e0a..d8f0594 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,43 +1,57 @@
#!/usr/bin/make -f
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/rules/ocaml.mk
-include /usr/share/cdbs/1/class/makefile.mk
+# -*- makefile -*-
-PKGNAME = ocaml-findlib
-DEB_MAKE_INSTALL_TARGET = install prefix=$(CURDIR)/debian/tmp
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
-configure/$(PKGNAME)::
- rm -f README # just a symlink, the good one is doc/README
+include /usr/share/ocaml/ocamlvars.mk
+
+%:
+ dh $@ --with ocaml
+
+.PHONY: override_dh_auto_configure
+override_dh_auto_configure:
./configure \
-config /etc/ocamlfind.conf \
-bindir /usr/bin \
-sitelib $(OCAML_STDLIB_DIR) \
-mandir /usr/share/man \
-with-toolbox
+
+.PHONY: override_dh_auto_build
+override_dh_auto_build:
+ $(MAKE)
ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
-build/$(PKGNAME)::
$(MAKE) opt
-else
-DEB_STRIP_EXCLUDE += usr/bin/ocamlfind
-DEB_STRIP_EXCLUDE += $(OCAML_STDLIB_DIR)/findlib/make_wizard
endif
-install/$(PKGNAME)::
- # rm ocamlc.opt and similar settings, they're not avail everywhere in debian
+
+.PHONY: override_dh_auto_install
+override_dh_auto_install:
+ $(MAKE) install prefix=$(CURDIR)/debian/tmp
+# rm ocamlc.opt and similar settings, they're not avail everywhere in debian
grep -v \\.opt debian/tmp/etc/ocamlfind.conf > debian/ocamlfind.conf.new
sed -i -e 's/@OCamlABI@/$(OCAML_ABI)/g' debian/ocamlfind.conf.new
mv debian/ocamlfind.conf.new debian/tmp/etc/ocamlfind.conf
- # mv METAs from empty directories to the /META directory
+# mv METAs from empty directories to the /META directory
mkdir -p $(CURDIR)/debian/tmp$(OCAML_STDLIB_DIR)/METAS
for p in `ls site-lib-src/`; do \
mv $(CURDIR)/debian/tmp$(OCAML_STDLIB_DIR)/$$p/META \
$(CURDIR)/debian/tmp$(OCAML_STDLIB_DIR)/METAS/META.$$p; \
rmdir $(CURDIR)/debian/tmp$(OCAML_STDLIB_DIR)/$$p/; \
done
- # rm empty man3 dir
+# rm empty man3 dir
test -d $(CURDIR)/debian/tmp/usr/share/man/man3 && \
rmdir $(CURDIR)/debian/tmp/usr/share/man/man3
-clean::
+# do not strip executables on bytecode executables (is this still needed?)
+ifneq ($(OCAML_HAVE_OCAMLOPT),yes)
+.PHONY: override_dh_strip
+override_dh_strip:
+endif
+
+.PHONY: override_dh_auto_clean
+override_dh_auto_clean:
+ if [ -f Makefile.config ]; then $(MAKE) clean; fi
ln -sf doc/README README
-find . -name META -delete
-rm -f src/findlib/depend src/findlib/fl_metascanner.ml
--
findlib packaging
More information about the Pkg-ocaml-maint-commits
mailing list