[Pkg-ocaml-maint-commits] [SCM] jocaml packaging branch, master, updated. debian/3.11.0-3-12-g2c617ef

Mehdi Dogguy dogguy at pps.jussieu.fr
Wed Jun 24 09:48:22 UTC 2009


The following commit has been merged in the master branch:
commit a711b63d73a3af58d0d7455f6c81f3ed3606d8d2
Author: Mehdi Dogguy <dogguy at pps.jussieu.fr>
Date:   Wed Jun 24 09:24:27 2009 +0200

    Update debian/rules

diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..245c542
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1,7 @@
+myocamlbuild_config.ml
+debian/jocaml.links
+config/config.sh
+config/Makefile
+config/m.h
+config/s.h
+tools/myocamlbuild_config.ml
diff --git a/debian/rules b/debian/rules
index a1ef38f..e79927c 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,16 +1,7 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-#
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
-#
-# Modified to make a template file for a multi-binary package with separated
-# build-arch and build-indep targets  by Bill Allombert 2001
 
-#export DH_VERBOSE=1
+export DH_VERBOSE=1
 
 include /usr/share/ocaml/ocamlvars.mk
 include /usr/share/ocaml/ocamlinit.mk
@@ -19,25 +10,22 @@ export DH_OPTIONS
 
 JOCAML_ABI         := $(shell head -1 VERSION)
 JOCAML_OPT_ARCH    := $(OCAML_OPT_ARCH)
-JOCAML_STDLIB_DIR  := /usr/lib/jocaml/$(JOCAML_ABI)
+JOCAML_STDLIB_DIR  := /usr/lib/jocaml/
 
 OCAMLINIT_SED += -e 's/@JOCamlABI@/$(JOCAML_ABI)/g'
 OCAMLINIT_SED += -e 's%@JOCamlStdlibDir@%$(JOCAML_STDLIB_DIR)%g'
 
 OCAMLC := $(if $(wildcard /usr/bin/ocamlc.opt),/usr/bin/ocamlc.opt,/usr/bin/ocamlc)
 
-config-stamp: ocamlinit
-	dh_testdir
+override_dh_auto_configure: ocamlinit
 	./configure --prefix /usr     \
 	--libdir $(JOCAML_STDLIB_DIR) \
 	--mandir /usr/share/man       \
 	--host $(DEB_HOST_GNU_TYPE)   \
 	 -ocamlc $(OCAMLC)            \
 	 -no-curses
-	touch $@
 
-build-arch: config-stamp build-arch-stamp
-build-arch-stamp:
+override_dh_auto_build:
 	if test ! -d boot.debian; then   \
 		cp -xa boot boot.debian; \
 	fi
@@ -45,64 +33,30 @@ build-arch-stamp:
 ifdef JOCAML_OPT_ARCH
 	$(MAKE) opt opt.opt
 endif
-	touch $@
 
-build-indep: config-stamp build-indep-stamp
-build-indep-stamp:
-	touch $@
-
-clean: ocamlinit-clean
-	dh_testdir
-	dh_testroot
-	$(RM) -rf build-indep-stamp build-arch-stamp config-stamp myocamlbuild_config.ml
-	$(RM) -f $(OFILES) debian/jocaml.links
+override_dh_auto_clean: ocamlinit-clean
+	$(RM) -f $(OFILES)
 	if [ -f Makefile -a -f config/Makefile ]; then \
 		$(MAKE) clean;   \
 	fi
-	$(RM) -f config/config.sh config/Makefile config/m.h config/s.h tools/myocamlbuild_config.ml
 	if test -d boot.debian; then \
                 $(RM) -r boot;       \
                 mv boot.debian boot; \
         fi
-	dh_clean
 
-install: build-arch build-indep
-	dh_testdir
-	dh_testroot
-	dh_prep
-	dh_installdirs
+override_dh_auto_install:
 ifdef 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/jocaml/$(JOCAML_ABI) install
+	$(MAKE) PREFIX=$(CURDIR)/debian/tmp/usr LIBDIR=$(CURDIR)/debian/tmp/$(JOCAML_STDLIB_DIR) install
 	cd $(CURDIR)/debian/tmp/usr/bin; \
 	    for i in ocamldep ocamldep.opt ocamlprof ocamlcp ocamlmktop ocamlmklib; do \
 	        if [ -e $$i ]; then mv $$i j$$i; fi; \
 	    done
 	mkdir -p debian/tmp/usr/share/lintian/overrides
 	cp debian/jocaml.lintian-overrides debian/tmp/usr/share/lintian/overrides/jocaml
+	echo 'F:JOCamlABI=$(JOCAML_ABI)' >> debian/jocaml.substvars
 
-binary-common:
-	dh_testdir
-	dh_testroot
-	dh_install --list-missing
-	dh_installchangelogs Changes
-	dh_installdocs
-	dh_installman
-	dh_link
-	dh_strip
-	dh_compress
-	dh_fixperms
-	dh_makeshlibs
-	dh_installdeb
-	dh_shlibdeps
-	dh_gencontrol -- -VF:JOCamlABI="$(JOCAML_ABI)"
-	dh_md5sums
-	dh_builddeb
-
-binary-arch: install
-	$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
-
-binary: binary-arch
-.PHONY: build clean binary-arch binary install build-arch build-indep config-stamp
+%:
+	dh --with quilt $@

-- 
jocaml packaging



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