[Pkg-ocaml-maint-commits] [SCM] cryptokit packaging branch, master, updated. debian/1.3-14-14-g9ddb115

Stephane Glondu steph at glondu.net
Mon Nov 21 07:07:32 UTC 2011


The following commit has been merged in the master branch:
commit 5ef9e5648d5029bd3d82025f1ceb0a8c1e5cbc34
Author: Stephane Glondu <steph at glondu.net>
Date:   Mon Nov 21 07:22:56 2011 +0100

    New debian/rules using dh with overrides

diff --git a/debian/rules b/debian/rules
index d1c5594..7c482d3 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,59 +1,38 @@
 #!/usr/bin/make -f
-# debian/rules for cryptokit package
-# Copyright (C) 2006 Sylvain Le Gall <gildor at debian.org>
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation; either version 2, or (at
-# your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
-# MA 02110-1301, USA.
-
-# Generate debian/control using
-# fakeroot debian/rules debian/control DEB_AUTO_UPDATE_DEBIAN_CONTROL:=yes
-
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/makefile.mk
-include /usr/share/cdbs/1/rules/ocaml.mk
-
-PACKAGE := libcryptokit-ocaml
-DESTDIR := $(CURDIR)/debian/$(PACKAGE)
-
-PACKAGE_DEV := libcryptokit-ocaml-dev
-DESTDIR_DEV := $(CURDIR)/debian/tmp
-
-DEB_MAKE_CLEAN_TARGET    := clean
-DEB_MAKE_BUILD_TARGET    := all
-ifeq ($(OCAML_HAVE_OCAMLOPT),yes)
-DEB_MAKE_BUILD_TARGET    += allopt
-endif
-DEB_MAKE_INSTALL_TARGET  := install \
-                            INSTALLDIR="$(DESTDIR_DEV)/$(OCAML_STDLIB_DIR)/cryptokit"
 
-CDBS_BUILD_DEPENDS := $(subst ocaml-nox,ocaml-nox (>= 3.10.0-8),$(CDBS_BUILD_DEPENDS))
+DESTDIR=$(CURDIR)/debian/tmp
+include /usr/share/ocaml/ocamlvars.mk
+export OCAMLFIND_DESTDIR=$(DESTDIR)/$(OCAML_STDLIB_DIR)
+
+%:
+	dh $@ --with ocaml
 
-# Enable zlib support
-CFLAGS += -DHAVE_ZLIB
+.PHONY: override_dh_auto_configure
+override_dh_auto_configure:
+	ocaml setup.ml -configure --prefix /usr --destdir '$(DESTDIR)' --docdir /usr/share/doc/libcryptokit-ocaml-dev
 
-build/libcryptokit-ocaml::
-ifneq ($(OCAML_OPT_ARCH),)
-	ocamlopt -I . -shared -linkall -o cryptokit.cmxs cryptokit.cmxa
+.PHONY: override_dh_auto_build
+override_dh_auto_build:
+	ocaml setup.ml -build
+ifeq ($(OCAML_NATDYNLINK),yes)
+	cd _build/src && ocamlopt -I . -shared -linkall -o cryptokit.cmxs cryptokit.cmxa
 endif
+	ocaml setup.ml -doc
+
+.PHONY: override_dh_auto_test
+override_dh_auto_test:
+	ocaml setup.ml -test
+
+.PHONY: override_dh_auto_install
+override_dh_auto_install:
+	mkdir -p '$(OCAMLFIND_DESTDIR)'
+	mkdir -p '$(DESTDIR)$(OCAML_DLL_DIR)'
+	ocaml setup.ml -install
 
-common-install-prehook-arch::
-	mkdir -p "$(DESTDIR_DEV)/$(OCAML_STDLIB_DIR)/cryptokit"
+.PHONY: override_dh_auto_clean
+override_dh_auto_clean:
+	ocaml setup.ml -distclean
 
-install/libcryptokit-ocaml-dev::
-	VERSION=$(DEB_NOEPOCH_VERSION); \
-	VERSION=$${VERSION%%-*}; \
-	sed -i "s/@VERSION@/$$VERSION/g" debian/META.cryptokit
-	mv $(DESTDIR_DEV)/$(OCAML_STDLIB_DIR)/cryptokit/stublibs \
-	 $(DESTDIR)/$(OCAML_STDLIB_DIR)/stublibs/dllcryptokit.so
+.PHONY: override_dh_install
+override_dh_install:
+	dh_install --fail-missing -X.so.owner

-- 
cryptokit packaging



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