The following commit has been merged in the master branch:
commit d7f54dec486b2e2f3a68a0104cbc486e703c05f7
Author: Ralf Treinen <trei...@free.fr>
Date:   Thu Jun 14 20:37:55 2012 +0200

    rewrite debian/rules using dh

diff --git a/debian/changelog b/debian/changelog
index 6d4b69f..4c239de 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-ocamldsort (0.15.0-2) UNRELEASED; urgency=low
+ocamldsort (0.15.0-2) unstable; urgency=low
 
   [ St├ęphane Glondu ]
   * Switch packaging to git
@@ -8,8 +8,11 @@ ocamldsort (0.15.0-2) UNRELEASED; urgency=low
   * debian/rules: added targets build-{arch,indep}
   * Standards-Version 3.9.3: 
     - debian/copyright: convert to machine-readable format 1.0
+  * use dh-ocaml (closes: #599325):
+    - debian/rules: rewrite, using dh and dh-ocaml
+    - debian/control: build-dep on dh-ocaml, dependency on {ocaml:Depends}
 
- -- Ralf Treinen <trei...@debian.org>  Wed, 13 Jun 2012 21:12:25 +0200
+ -- Ralf Treinen <trei...@debian.org>  Thu, 14 Jun 2012 21:19:48 +0200
 
 ocamldsort (0.15.0-1) unstable; urgency=low
 
diff --git a/debian/control b/debian/control
index 4f90879..68e4422 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,8 @@ Section: ocaml
 Priority: optional
 Maintainer: Debian OCaml Maintainers <debian-ocaml-ma...@lists.debian.org>
 Uploaders: Ralf Treinen <trei...@debian.org>
-Build-Depends: ocaml-nox (>= 3.09.0), camlp4, debhelper (>= 8)
+Build-Depends: debhelper (>= 8),
+              ocaml-nox (>= 3.09.0), camlp4,  dh-ocaml (>= 0.9)
 Standards-Version: 3.9.3
 Homepage: http://dimitri.mutu.net/informatique.html
 Vcs-Git: git://git.debian.org/git/pkg-ocaml-maint/packages/ocamldsort.git
@@ -11,7 +12,7 @@ Vcs-Browser: 
http://git.debian.org/?p=pkg-ocaml-maint/packages/ocamldsort.git
 
 Package: ocamldsort
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, ${F:OCamlRun}
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${ocaml:Depends}
 Description: dependency sorter for OCaml source files
  The ocamldsort command scans a set of Objective Caml source files (.ml
  and .mli files), sorts them according to their dependencies and prints
diff --git a/debian/rules b/debian/rules
index 66d5a83..a45cf26 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,80 +1,22 @@
 #!/usr/bin/make -f
-# Sample debian/rules that uses debhelper.
-# GNU copyright 1997 to 1999 by Joey Hess.
 
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-# These are used for cross-compiling and for saving the configure script
-# from having to guess our platform (since we know it already)
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 
-OCAMLABI = $(shell ocamlc -version)
-BYTECODE = $(shell [ -x /usr/bin/ocamlopt ] || echo yes)
-OCAMLRUN = $(if $(BYTECODE),ocaml-base-nox-$(OCAMLABI))
-
-ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
-       CFLAGS += -g
-endif
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-       INSTALL_PROGRAM += -s
-endif
-
-config.status: configure
-       dh_testdir
-       touch configure.in && sleep 1 && touch configure
-       ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) 
--prefix=/usr --bindir=\$${prefix}/bin --mandir=\$${prefix}/share/man
-
-build: build-arch build-indep
-build-arch: build-stamp
-build-indep: build-stamp
+%:
+       dh $@ --with=ocaml
 
-build-stamp:  config.status
-       dh_testdir
-       $(MAKE) depend
-       $(MAKE) all
-       touch build-stamp
+override_dh_auto_configure:
+       ./configure --host=$(DEB_HOST_GNU_TYPE) \
+                       --build=$(DEB_BUILD_GNU_TYPE) \
+                       --prefix=/usr \
+                       --bindir=\$${prefix}/bin \
+                       --mandir=\$${prefix}/share/man
 
-clean:
-       dh_testdir
-       dh_testroot
-       rm -f build-stamp
-       [ ! -f Makefile ] || $(MAKE) distclean
-       dh_clean
-
-install: build
-       dh_testdir
-       dh_testroot
-       dh_prep
-       dh_installdirs
+override_dh_auto_install:
        $(MAKE) install prefix=$(CURDIR)/debian/ocamldsort/usr
+       cd $(CURDIR)/debian/ocamldsort/usr/bin/; \
+               [ ! -f ocamldsort.opt ] || mv ocamldsort.opt ocamldsort
 
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
-       dh_testdir
-       dh_testroot
-       dh_installdocs
-       dh_installchangelogs Changes
-
-       if test -f $(CURDIR)/debian/ocamldsort/usr/bin/ocamldsort.opt; then \
-               mv $(CURDIR)/debian/ocamldsort/usr/bin/ocamldsort.opt \
-                  $(CURDIR)/debian/ocamldsort/usr/bin/ocamldsort; \
-               dh_strip; \
-       fi
 
-       dh_compress
-       dh_fixperms
-       dh_makeshlibs
-       dh_installdeb
-       dh_shlibdeps
-       dh_gencontrol -- -VF:OCamlRun=$(OCAMLRUN)
-       dh_md5sums
-       dh_builddeb
 
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install

-- 
ocamldsort packaging

_______________________________________________
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits

Reply via email to