move ocaml cdbs class to the dh-ocaml package
authorStefano Zacchiroli <zack@upsilon.cc>
Thu, 7 Aug 2008 15:16:44 +0000 (12:16 -0300)
committerStefano Zacchiroli <zack@upsilon.cc>
Thu, 7 Aug 2008 15:16:44 +0000 (12:16 -0300)
debian/cdbs/ocaml-docbase-template.txt [deleted file]
debian/cdbs/ocaml-vars.mk [deleted file]
debian/cdbs/ocaml.mk [deleted file]
debian/cdbs/ocamldoc-api-ref-config [deleted file]
debian/changelog
debian/ocaml-nox.install.in

diff --git a/debian/cdbs/ocaml-docbase-template.txt b/debian/cdbs/ocaml-docbase-template.txt
deleted file mode 100644 (file)
index 1497498..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Document: @PACKAGE@-ocamldoc-api-reference
-Title: @PACKAGE@ OCamldoc API Reference
-Abstract: API reference manual for @PACKAGE@ (generated via OCamldoc)
-Section: Programming/OCaml
-
-Format: HTML
-Index: /usr/share/doc/@PACKAGE@/html/api/index.html
-Files: /usr/share/doc/@PACKAGE@/html/api/*
diff --git a/debian/cdbs/ocaml-vars.mk b/debian/cdbs/ocaml-vars.mk
deleted file mode 100644 (file)
index a826d0f..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-#
-# Description: Useful CDBS variables for OCaml related packages
-#
-# Copyright © 2006-2007 Stefano Zacchiroli <zack@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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# $Id: ocaml-vars.mk 4643 2007-10-18 00:21:51Z gildor $
-
-_cdbs_scripts_path ?= /usr/lib/cdbs
-_cdbs_rules_path ?= /usr/share/cdbs/1/rules
-_cdbs_class_path ?= /usr/share/cdbs/1/class
-
-ifndef _cdbs_class_ocaml_vars
-_cdbs_class_ocaml_vars = 1
-
-# current OCaml ABI version (e.g. 3.10.0).
-# Used internally by ocaml.mk (substituted for @OCamlABI@ in $(OCAML_IN_FILES)
-# below), may be useful to debian/rules writers as well
-OCAML_ABI := $(shell /usr/bin/ocamlc -version)
-
-# OCaml standard library location.
-# Used internally by ocaml.mk (substituted for @OCamlStdlibDir@ in
-# $(OCAML_IN_FILES) below), may be useful to debian/rules writers as well
-OCAML_STDLIB_DIR := $(shell /usr/bin/ocamlc -where)
-
-# OCaml stublibs (i.e. DLLs) location.
-# Used internally by ocaml.mk (substituted for @OCamlDllDir@) in
-# $(OCAML_IN_FILES) below), may be useful to debian/rules writers as well
-OCAML_DLL_DIR := $(OCAML_STDLIB_DIR)/stublibs
-
-# list of .in files contained (non-recursively) in debian/ that requires
-# pre-build filling.
-# Used internally by ocaml.mk.
-# debian/rules writers might need to add stuff to this list:
-#  e.g.: OCAML_IN_FILES += debian/patches/foo  # (no .in extension)
-OCAML_IN_FILES := $(filter-out debian/control,$(patsubst %.in,%,$(wildcard debian/*.in)))
-
-# 'yes' if native code compilation is available on the build architecture, 'no' otherwise.
-# For debian/rules writers.
-OCAML_HAVE_OCAMLOPT := $(shell if test -x /usr/bin/ocamlopt ; then echo "yes" ; else echo "no" ; fi)
-
-# space separated list of Debian architectures supporting OCaml native code
-# compilation.
-# Used internally by ocaml.mk and substituted in debian/control.in for the
-# @OCamlNativeArchs@ marker; may be useful to debian/rules writers as well
-OCAML_NATIVE_ARCHS := $(shell cat $(OCAML_STDLIB_DIR)/native-archs)
-
-# comma separated list of members of the OCaml team.
-# Substituted in debian/control.in for the @OCamlTeam@ marker
-OCAML_TEAM =
-
-OCAML_TEAM += Julien Cristau <julien.cristau@ens-lyon.org>,
-OCAML_TEAM += Ralf Treinen <treinen@debian.org>,
-OCAML_TEAM += Remi Vanicat <vanicat@debian.org>,
-OCAML_TEAM += Samuel Mimram <smimram@debian.org>,
-OCAML_TEAM += Stefano Zacchiroli <zack@debian.org>,
-OCAML_TEAM += Sven Luther <luther@debian.org>,
-OCAML_TEAM += Sylvain Le Gall <gildor@debian.org>
-# no trailing "," (comma) on the last name
-
-# space separated list of packages matching the naming convention for OCaml
-# development libraries, i.e. libXXX-ocaml-dev.
-# For debian/rules writers
-OCAML_LIBDEV_PACKAGES := $(filter lib%-ocaml-dev,$(DEB_PACKAGES))
-
-# as above, but keep packages matching the convention for OCaml runtime
-# libraries, i.e. libXX-ocaml
-OCAML_LIB_PACKAGES := $(filter lib%-ocaml,$(DEB_PACKAGES))
-
-# space separated list of packages on which ocamldoc usage is required. For
-# each package listed here will have ocamldoc invoked on all *.ml/*.mli files
-# installed under $(OCAML_STDLIB_DIR) to generated html documentation which
-# will be shipped in $(OCAML_OCAMLDOC_DESTDIR_HTML).
-# Typical usage is OCAML_OCAMLDOC_PACKAGES = $(OCAML_LIBDEV_PACKAGES).
-# For debian/rules writers
-OCAML_OCAMLDOC_PACKAGES =
-#OCAML_OCAMLDOC_PACKAGES = $(OCAML_LIBDEV_PACKAGES)    # more "aggressive" default
-
-# space separated list of packages for which a pkg.doc-base.ocamldoc-apiref is 
-# required. This file contains is the debian doc-base description of file which
-# should be located in the directory $(OCAML_OCAMLDOC_DESTDIR_HTML)
-# For debian/rules writers
-OCAML_OCAMLDOC_PACKAGES_DOCBASE =
-
-# ocamlfind flags which must be used in order to generate
-# correctly the ocamldoc documentation
-# For debian/rules writers
-OCAML_OCAMLDOC_OCAMLFIND_FLAGS =
-
-# generic (i.e. non backend specific) flags to be passed to ocamldoc
-# For debian/rules writers
-OCAML_OCAMLDOC_FLAGS = -stars -m A
-
-# html-specific flags to be passed to ocamldoc (in addition to -html -d DESTDIR)
-# For debian/rules writers
-OCAML_OCAMLDOC_FLAGS_HTML =
-
-# man-specific flags to be passed to ocamldoc (in addition to -man -d DESTDIR)
-# For debian/rules writers
-OCAML_OCAMLDOC_FLAGS_MAN = -man-mini
-
-# where to install HTML version of the ocamldoc generated API reference. You
-# can use "$(cdbs_curpkg)" stem there, it will be expanded to the current
-# package name by CDBS
-# For debian/rules writers
-OCAML_OCAMLDOC_DESTDIR_HTML = $(shell $(_cdbs_class_path)/ocamldoc-api-ref-config --html-directory $(cdbs_curpkg))
-
-endif
-
diff --git a/debian/cdbs/ocaml.mk b/debian/cdbs/ocaml.mk
deleted file mode 100644 (file)
index 20673b8..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-#
-# Description: CDBS class for OCaml related packages
-#
-# Copyright © 2006-2007 Stefano Zacchiroli <zack@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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# $Id: ocaml.mk 4944 2007-12-28 14:50:46Z zack $
-
-_cdbs_scripts_path ?= /usr/lib/cdbs
-_cdbs_rules_path ?= /usr/share/cdbs/1/rules
-_cdbs_class_path ?= /usr/share/cdbs/1/class
-
-ifndef _cdbs_class_ocaml
-_cdbs_class_ocaml = 1
-
-# needed by debian/control:: rule below
-include $(_cdbs_rules_path)/buildcore.mk$(_cdbs_makefile_suffix)
-
-# to ensure invocations and tests on /usr/bin/ocaml* are meaningful
-CDBS_BUILD_DEPENDS := $(CDBS_BUILD_DEPENDS), ocaml-nox
-
-# import OCAML_* make variables
-include $(_cdbs_class_path)/ocaml-vars.mk$(_cdbs_makefile_suffix)
-
-ifdef _cdbs_rules_debhelper
-
-# ensure dpkg-gencontrol will fill F:OCamlABI fields with the proper value
-DEB_DH_GENCONTROL_ARGS += -- -VF:OCamlABI="$(OCAML_ABI)"
-DEB_DH_GENCONTROL_ARGS +=    -VF:OCamlNativeArchs="$(OCAML_NATIVE_ARCHS)"
-
-endif
-
-# post-install hook to invoke ocamldoc on OCAML_OCAMLDOC_PACKAGES packages
-$(patsubst %,binary-install/%,$(DEB_PACKAGES))::
-       @OCAMLDOC="ocamldoc $(OCAML_OCAMLDOC_FLAGS)"; \
-       if test -n "$(OCAML_OCAMLDOC_OCAMLFIND_FLAGS)" ; then \
-               if ! test -x "/usr/bin/ocamlfind"; then \
-                       echo "OCamlfind flags set and no ocamlfind to be found" >&2; \
-                       exit 1; \
-               fi; \
-               OCAMLDOC="ocamlfind $$OCAMLDOC $(OCAML_OCAMLDOC_OCAMLFIND_FLAGS)"; \
-       fi; \
-       OCAML_OCAMLDOC_INCLUDE=`for i in $(OCAML_OCAMLDOC_PACKAGES); do \
-                                               find debian/$$i/$(OCAML_STDLIB_DIR)/ -type d -exec echo -I \{} \; ; \
-                               done`; \
-       if (echo $(OCAML_OCAMLDOC_PACKAGES) | egrep '( |^)$(cdbs_curpkg)( |$$)' > /dev/null) ; then \
-               echo 'mkdir -p debian/$(cdbs_curpkg)/$(OCAML_OCAMLDOC_DESTDIR_HTML)' ; \
-               mkdir -p debian/$(cdbs_curpkg)/$(OCAML_OCAMLDOC_DESTDIR_HTML) ; \
-               echo 'invoking ocamldoc on debian/$(cdbs_curpkg)$(OCAML_STDLIB_DIR)/ ...' ; \
-               find debian/$(cdbs_curpkg)$(OCAML_STDLIB_DIR)/ \
-                       -type f -name '*.mli' -or -name '*.ml' \
-               | xargs $$OCAMLDOC $$OCAML_OCAMLDOC_INCLUDE \
-                       -html $(OCAML_OCAMLDOC_FLAGS_HTML) \
-                       -d debian/$(cdbs_curpkg)/$(OCAML_OCAMLDOC_DESTDIR_HTML) \
-               || true ; \
-       fi
-
-# post-build hook to create doc-base entries for OCAML_OCAMLDOC_PACKAGES packages
-$(patsubst %,build/%,$(DEB_PACKAGES))::
-       @if (echo $(OCAML_OCAMLDOC_PACKAGES) $(OCAML_OCAMLDOC_PACKAGES_DOCBASE) \
-         | egrep '( |^)$(cdbs_curpkg)( |$$)' > /dev/null) ; then \
-               $(_cdbs_class_path)/ocamldoc-api-ref-config --doc-base-generate $(cdbs_curpkg) ; \
-       fi
-
-clean::
-       rm -f debian/*.doc-base.ocamldoc-apiref
-
-# generate .in files counterpars before building, substituting @OCamlABI@
-# markers with the proper value; clean stamps after building
-pre-build:: ocamlinit
-ocamlinit: ocamlinit-stamp
-ocamlinit-stamp:
-       for f in $(OCAML_IN_FILES) ; do \
-               sed \
-                       -e 's,@OCamlABI@,$(OCAML_ABI),g' \
-                       -e 's,@OCamlStdlibDir@,$(OCAML_STDLIB_DIR),g' \
-                       -e 's,@OCamlDllDir@,$(OCAML_DLL_DIR),g' \
-                       $$f.in > $$f ; \
-       done
-       touch $@
-clean::
-       rm -f ocamlinit-stamp $(OCAML_IN_FILES)
-
-# avoid dpatch breaking upon clean if debian/patches/*.in files are in use
-deapply-dpatches: ocamlinit
-
-# update debian/control substituting @OCamlNativeArchs@
-# XXX ASSUMPTION: debian/control has already been generated, i.e. this rule is
-# executed after the debian/control:: rule in builcore.mk
-ifneq ($(DEB_AUTO_UPDATE_DEBIAN_CONTROL),)
-debian/control::
-       if test -f debian/control && test -f debian/control.in ; then \
-               sed -i \
-                       -e "s/@OCamlNativeArchs@/$(OCAML_NATIVE_ARCHS)/g" \
-                       -e "s/@OCamlTeam@/$(OCAML_TEAM)/g" \
-                       $@ ; \
-       fi
-endif
-
-endif
-
diff --git a/debian/cdbs/ocamldoc-api-ref-config b/debian/cdbs/ocamldoc-api-ref-config
deleted file mode 100755 (executable)
index b72b605..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/bin/sh 
-# ocamldoc-api-ref-config: configuration and generation of .doc-base.ocamldoc-apiref
-# Copyright (C) 2006 Sylvain Le Gall <gildor@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.
-
-set -e
-#set -x
-
-print_usage ()
-{
-  PRG=`basename $0`
-  cat <<EOF
-$PRG -- Written by Sylvain Le Gall 
-"This program is under GPL v2"
-
-Usage:
-$PRG [options] package*
-
-Options:
---html-directory     Output the directory name where the generated ocamldoc 
-                     generated file should go
---doc-base-generate  Generate debian/PACKAGE.doc-base.ocamldoc-apiref
-
-EOF
-}
-
-error_usage ()
-{
-  print_usage >&2
-  echo $* >&2
-  exit 1
-}
-
-html_directory ()
-{
-  echo "/usr/share/doc/$1/html/api"
-}
-
-doc_base_generate ()
-{
-  if ! test -d "debian"; then
-    echo "Cannot find debian directory for generation" >&2
-    exit 1
-  fi
-  PKG="$1"
-  PKG_DIR=`html_directory $PKG`
-  FILE="debian/$PKG.doc-base.ocamldoc-apiref"
-  echo $FILE
-  cat > $FILE <<EOF
-Document: $PKG-ocamldoc-api-reference
-Title: $PKG OCamldoc API Reference
-Abstract: API reference manual for $PKG (generated via OCamldoc)
-Section: Programming/OCaml
-
-Format: HTML
-Index: $PKG_DIR/index.html
-Files: $PKG_DIR/*
-EOF
-}
-
-ACTION=true
-PACKAGES=
-
-while test $# -gt 0; do
-  case "$1" in
-    --html-directory)
-      ACTION="html_directory"
-    ;;
-    --doc-base-generate)
-      ACTION="doc_base_generate"
-    ;;
-    --help|-help|-?)
-      print_usage
-      exit 0
-    ;;
-    -*)
-      error_usage "Unknown option $1"
-    ;;
-    *)
-      PACKAGES="$PACKAGES $1"
-    ;;      
-  esac
-  shift
-done
-
-for i in $PACKAGES; do
-  $ACTION $i
-done
-
index c9836185cd5ef01a5613ad531f79581b2a6f7129..e7ba1950aaba145b5d37976dd90fabb65673aed6 100644 (file)
@@ -6,8 +6,9 @@ ocaml (3.10.2-4) UNRELEASED; urgency=low
     of dh_clean
 
   [ Stefano Zacchiroli ]
-  * Remove the OCaml Packaging Policy document, it will be shipped by the
-    new dh-ocaml package
+  * No longer ship stuff that will be now shipped by the new dh-ocaml package:
+    - OCaml packaging policy
+    - CDBS class ocaml.mk and related helpers
 
  -- Stephane Glondu <steph@glondu.net>  Tue, 08 Jul 2008 14:30:11 +0200
 
index 0f9231d02aba5cee283089aacd05e43fb6270327..a8bc837d88bb8ec47edee2800098e9bf5668f364 100644 (file)
@@ -1,3 +1,2 @@
-debian/cdbs/*                  /usr/share/cdbs/1/class/
 config/Makefile                        /usr/lib/ocaml/#OcamlABI#/config/Makefile
 debian/native-archs            /usr/lib/ocaml/#OcamlABI#/