[Pkg-ocaml-maint-commits] [SCM] ocamlbricks packaging branch, master, updated. c044f63455d81a59586722c8c4d7fbc8b440e259
Sylvain Le Gall
gildor at debian.org
Mon Jun 16 22:09:55 UTC 2008
The following commit has been merged in the master branch:
commit 2174d0f21f2e7e9154e7b81ef237c48854eae7e6
Author: Sylvain Le Gall <gildor at debian.org>
Date: Mon Jun 16 23:56:52 2008 +0200
Initial packaging of ocamlbricks
(done by J. Roudiere)
diff --git a/debian/README.Debian b/debian/README.Debian
new file mode 100644
index 0000000..8b8c231
--- /dev/null
+++ b/debian/README.Debian
@@ -0,0 +1,17 @@
+Ocamlbricks for Debian
+======================
+
+Originally, OCamlbricks is provided with a useful build system, it is composed
+of a generic and coherent, set of files, for compile OCaml project using
+OCamlBuild.
+
+The main Makefile allow to generate automatically file, the myOCamlBuild plugin,
+you can also use it to create binary or sources tarball, and for distribute easily
+generic files for any kind of project (like configuration file, README,
+REQUIREMENT, NEWS, INSTALL, etc ...)
+
+The Debian package provide this build system like an example, under buildsystem
+directory in /usr/share/doc/libocamlbricks-ocaml-dev/examples/ with hope to help
+OCaml's developpers for build and distribute their project.
+
+For more informations see INSTALL file in examples/buildsystem/ directory.
diff --git a/AUTHORS b/debian/buildsystem/AUTHORS
similarity index 94%
copy from AUTHORS
copy to debian/buildsystem/AUTHORS
index 19ee132..49bae06 100644
--- a/AUTHORS
+++ b/debian/buildsystem/AUTHORS
@@ -1,4 +1,4 @@
-This file is part of our reusable OCaml BRICKS library
+This file is part of XXXXXX
Copyright (C) 2008 Luca Saiu
Copyright (C) 2008 Jean-Vincent Loddo
diff --git a/CONFIGME b/debian/buildsystem/CONFIGME
similarity index 98%
copy from CONFIGME
copy to debian/buildsystem/CONFIGME
index f1dea6b..5778d7b 100644
--- a/CONFIGME
+++ b/debian/buildsystem/CONFIGME
@@ -38,7 +38,6 @@
# to install into a different, custom prefix.
# *No* trailing slash should be included.
libraryprefix=`ocamlc -where || exit -1`
-#libraryprefix=/mystrangepath
# Installation prefix, for example /usr or /usr/local
# *No* trailing slash should be included.
diff --git a/COPYING b/debian/buildsystem/COPYING
similarity index 100%
copy from COPYING
copy to debian/buildsystem/COPYING
diff --git a/INSTALL b/debian/buildsystem/INSTALL
similarity index 100%
copy from INSTALL
copy to debian/buildsystem/INSTALL
diff --git a/debian/buildsystem/META b/debian/buildsystem/META
new file mode 100644
index 0000000..300865a
--- /dev/null
+++ b/debian/buildsystem/META
@@ -0,0 +1,13 @@
+name="xxxxxx"
+description="An XXXXXX"
+version="xx.xx.xx"
+requires(mt) = "threads lablgtk2"
+directory="+XXXXXX"
+archive(byte) = "xxxxxx.cma"
+archive(native) = "xxxxxx.cmxa"
+
+#package "init" (
+# requires = "lablgtk2"
+# archive(byte) = "gtkInit.cmo"
+# archive(native) = "gtkInit.cmx"
+#)
diff --git a/Makefile b/debian/buildsystem/Makefile
similarity index 94%
copy from Makefile
copy to debian/buildsystem/Makefile
index 05440ab..8a73666 100644
--- a/Makefile
+++ b/debian/buildsystem/Makefile
@@ -34,9 +34,6 @@
# override these, but only to define the project-dependant '-local'
# versions:
-# Makefiles (this one as those in other parts) use extensively the bash shell
-SHELL=/bin/bash
-
OCAMLBUILD = $$( $(call OCAMLBUILD_COMMAND_LINE) )
# The main target. Its implementation is entirely project-dependant:
@@ -44,18 +41,16 @@ main: ocamlbuild-stuff main-local data libraries programs documentation
@(echo "Success.")
BUILD_FROM_STUFF = \
- @( echo "Building $(1)..."; \
+ @( (echo "Building $(1)..."; \
shopt -s execfail; set -e; \
- for x in $(2); do \
- echo "Building \"$$x\"..."; \
- if $(MAKE) $$x; then \
- echo "Ok, \"$$x\" was built with success."; \
- else \
- echo "FAILED when building \"$$x\"."; \
- exit -1; \
- fi; \
- done; \
- echo "Success: $(1) were built.")
+ ( (for x in $(2); do \
+ (echo "Building \"$$x\"..." && \
+ $(MAKE) $$x && \
+ echo "Ok, \"$$x\" was built with success.") || \
+ (echo "Failed when building \"$$x\"."; exit -1); \
+ done)) && \
+ echo "Success: $(1) were built.") || \
+ (echo "Failure in building $(1)."; exit -1))
# Build only data:
data: ocamlbuild-stuff data-local $(DATA)
@@ -69,38 +64,19 @@ native-libraries: ocamlbuild-stuff native-libraries-local $(NATIVE_LIBRARIES)
byte-libraries: ocamlbuild-stuff byte-libraries-local $(BYTE_LIBRARIES)
$(call BUILD_FROM_STUFF, byte-libraries, $(BYTE_LIBRARIES))
-# Build libraries; bytecode, native, or both:
+# Build only libraries:
libraries: libraries-local
- @($(call BUILD_NATIVE_ANDOR_BYTECODE,libraries) ) # Spaces are ok
-
-# Build programs; bytecode, native, or both:
-programs: programs-local
- @($(call BUILD_NATIVE_ANDOR_BYTECODE,programs) ) # Spaces are ok
-
-# Build the native and/or bytecode version of $(1). $(1) may be either
-# "libraries" or "programs". *Don't* put a space before the argument.
-BUILD_NATIVE_ANDOR_BYTECODE = \
- (if [ "$$( $(call NATIVE) )" == 'native' ]; then \
- echo "Builing native $(1)..."; \
- if $(MAKE) native-$(1); then \
- echo "Success: native $(1) were built."; \
- else \
- echo "FAILURE: could not build native $(1)."; \
- exit -1; \
- fi; \
+ @(if [ "$$( $(call NATIVE) )" == 'native' ]; then \
+ echo "Builing native libraries..."; \
+ $(MAKE) native-libraries; \
else \
- echo "NOT builing native $(1)..."; \
+ echo "NOT builing native libraries..."; \
fi; \
if [ "$$( $(call BYTE) )" == 'byte' ]; then \
- echo "Builing bytecode $(1)..."; \
- if $(MAKE) byte-$(1); then \
- echo "Success: bytecode $(1) were built."; \
- else \
- echo "FAILURE: could not build bytecode $(1)."; \
- exit -1; \
- fi; \
+ echo "Builing bytecode libraries..."; \
+ $(MAKE) byte-libraries; \
else \
- echo "NOT builing bytecode $(1)..."; \
+ echo "NOT builing bytecode libraries..."; \
fi)
# Build only native programs:
@@ -111,6 +87,21 @@ native-programs: ocamlbuild-stuff native-programs-local $(NATIVE_PROGRAMS) $(ROO
byte-programs: ocamlbuild-stuff byte-programs-local $(BYTE_PROGRAMS) $(ROOT_BYTE_PROGRAMS)
$(call BUILD_FROM_STUFF, byte-programs, $(BYTE_PROGRAMS) $(ROOT_BYTE_PROGRAMS))
+# Build only programs:
+programs: programs-local
+ @(if [ "$$( $(call NATIVE) )" == 'native' ]; then \
+ echo "Builing native programs..."; \
+ $(MAKE) native-programs; \
+ else \
+ echo "NOT builing native programs..."; \
+ fi; \
+ if [ "$$( $(call BYTE) )" == 'byte' ]; then \
+ echo "Builing bytecode programs..."; \
+ $(MAKE) byte-programs; \
+ else \
+ echo "NOT builing bytecode programs..."; \
+ fi)
+
# 'all' is just an alias for 'main':
all: main
@@ -523,22 +514,13 @@ LIBRARIES_TO_LINK =
@($(OCAMLBUILD) $@)
# Bytecode programs:
%.byte: ocamlbuild-stuff
- @($(call BUILD_WITH_OCAMLBUILD, $@) )
+ @($(OCAMLBUILD) $@; \
+ rm $@)
# Native programs:
%.native: ocamlbuild-stuff
- @($(call BUILD_WITH_OCAMLBUILD, $@) )
-
-# Build the target $(1) using OCamlBuild. ocamlbuild-stuff is assumed
-# to be already generated.
-BUILD_WITH_OCAMLBUILD = \
- $(OCAMLBUILD) $@; \
- if [ -e $@ ]; then \
- rm $@; \
- echo "Success: $@ was built"; \
- else \
- echo "FAILURE when building $@"; \
- exit -1; \
- fi
+ @($(OCAMLBUILD) $@; \
+ rm $@)
+
#####################################################################
# Some macros, used internally and possibly by Makefile.local:
diff --git a/ocamlbricks.odocl b/debian/buildsystem/Makefile.local
similarity index 64%
copy from ocamlbricks.odocl
copy to debian/buildsystem/Makefile.local
index 0d20fc7..974012b 100644
--- a/ocamlbricks.odocl
+++ b/debian/buildsystem/Makefile.local
@@ -1,5 +1,6 @@
-# This file is part of our reusable OCaml BRICKS library
+# This -*- makefile -*- is part of XXXXXX
# Copyright (C) 2008 Luca Saiu
+# Copyright (C) 2008 Jean-Vincent Loddo
# 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
@@ -15,27 +16,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# This is simply a list of the OCaml modules (*not* filenames) for which
-# documentation should be generated:
-Configuration_files
-Environment
-Extras
-FilenameExtra
-Fix
-Hashmap
-Hashmmap
-Hashset
-Identifier
-Ledgrid
-ListExtra
-Memo
-Oomarshal
-PreludeExtra
-Shell
-StrExtra
-StringExtra
-Sugar
-SysExtra
-UnixExtra
-Widget
-Wrapper
+COMPILE_OPTIONS +=
+#DIRECTORIES_TO_INCLUDE = lablgtk2
+#LIBRARIES_TO_LINK = lablgtk
+
+BYTE_PROGRAMS =
+NATIVE_PROGRAMS =
+ROOT_BYTE_PROGRAMS =
+ROOT_NATIVE_PROGRAMS =
+NATIVE_LIBRARIES =
+BYTE_LIBRARIES =
+DATA =
diff --git a/NEWS b/debian/buildsystem/NEWS
similarity index 92%
copy from NEWS
copy to debian/buildsystem/NEWS
index 446722c..880618d 100644
--- a/NEWS
+++ b/debian/buildsystem/NEWS
@@ -1,4 +1,4 @@
-This file is part of our reusable OCaml BRICKS library
+This file is part of XXXXXX
Copyright (C) 2008 Luca Saiu
Copyright (C) 2008 Jean-Vincent Loddo
diff --git a/NEWS b/debian/buildsystem/README
similarity index 90%
copy from NEWS
copy to debian/buildsystem/README
index 446722c..fed5044 100644
--- a/NEWS
+++ b/debian/buildsystem/README
@@ -1,4 +1,4 @@
-This file is part of our reusable OCaml BRICKS library
+This file is part of XXXXXX
Copyright (C) 2008 Luca Saiu
Copyright (C) 2008 Jean-Vincent Loddo
@@ -16,4 +16,4 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-[To do: fill this.]
+[To do: fill this]
diff --git a/REQUIREMENTS b/debian/buildsystem/REQUIREMENTS
similarity index 95%
copy from REQUIREMENTS
copy to debian/buildsystem/REQUIREMENTS
index e4082bf..dfca4f4 100644
--- a/REQUIREMENTS
+++ b/debian/buildsystem/REQUIREMENTS
@@ -1,4 +1,4 @@
-This file is part of our reusable OCaml Bricks library
+This file is part of XXXXXX
Copyright (C) 2008 Luca Saiu
This program is free software: you can redistribute it and/or modify
diff --git a/THANKS b/debian/buildsystem/THANKS
similarity index 93%
copy from THANKS
copy to debian/buildsystem/THANKS
index 89d3ae5..f6ff602 100644
--- a/THANKS
+++ b/debian/buildsystem/THANKS
@@ -1,4 +1,4 @@
-This file is part of our reusable OCaml BRICKS library
+This file is part of XXXXXX
Copyright (C) 2008 Luca Saiu
Copyright (C) 2008 Jean-Vincent Loddo
diff --git a/configure b/debian/buildsystem/configure
similarity index 100%
copy from configure
copy to debian/buildsystem/configure
diff --git a/ocamlbricks.odocl b/debian/buildsystem/etc/xxxxxx.conf
similarity index 63%
copy from ocamlbricks.odocl
copy to debian/buildsystem/etc/xxxxxx.conf
index 0d20fc7..f50688f 100644
--- a/ocamlbricks.odocl
+++ b/debian/buildsystem/etc/xxxxxx.conf
@@ -1,4 +1,4 @@
-# This file is part of our reusable OCaml BRICKS library
+# This -*- sh -*- script is a configuration file for XXXXXX.
# Copyright (C) 2008 Luca Saiu
# This program is free software: you can redistribute it and/or modify
@@ -15,27 +15,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# This is simply a list of the OCaml modules (*not* filenames) for which
-# documentation should be generated:
-Configuration_files
-Environment
-Extras
-FilenameExtra
-Fix
-Hashmap
-Hashmmap
-Hashset
-Identifier
-Ledgrid
-ListExtra
-Memo
-Oomarshal
-PreludeExtra
-Shell
-StrExtra
-StringExtra
-Sugar
-SysExtra
-UnixExtra
-Widget
-Wrapper
+# This file can be installed into /etc/xxxxxx to make a "global"
+# site configuration, and each user can override some or all values
+# in his/her private ~/.xxxxxx file.
+#
+# Each user can also override these settings by defining the same
+# variables in the shell environment, before launching Xxxxxx.
+
+# Comment
+VARIABLE=value
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..1064d81
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,9 @@
+ocamlbricks (0.50.1-1) unstable; urgency=low
+
+ * Initial release (closes: Bug#477326)
+ First package of OCamlbricks, including documentation OCamldoc in HTML
+ format and the build system use to build OCamlbricks like an example.
+
+ * Creation and adding *.mli (OCaml header files) in the package.
+
+ -- Jonathan Roudiere <jonathan.roudiere at lipn.univ-paris13.fr> Mon, 12 May 2008 17:34:13 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..7ed6ff8
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..d88f31e
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,39 @@
+Source: ocamlbricks
+Section: libdevel
+Priority: optional
+Maintainer: Jonathan Roudiere <jonathan.roudiere at lipn.univ-paris13.fr>
+Build-Depends: debhelper (>> 5.0.0), ocaml (>= 3.10.2), liblablgtk2-ocaml-dev (>= 2.6.0-7), bash (>= 3.1), dpatch
+Standards-Version: 3.7.3
+Homepage: http://darcs.marionnet.org/repos/ocamlbricks/
+
+Package: libocamlbricks-ocaml-dev
+Section: libdevel
+Architecture: any
+Depends: ocaml-nox-${F:OCamlABI}, liblablgtk2-ocaml-dev (>= 2.6.0-7)
+Replaces: ocamlbricks (<< 0.50.1)
+Suggests: ocaml-findlib
+Description: Miscellaneous utility functions in OCaml for Marionnet
+ Library OCaml which provide a set of needed and useful macros for developing.
+ Modules and functionality are the follows :
+ .
+ Configuration_files: Allow to get information from configuration files
+ Environments: Environments are useful for maintaining the state, intendend
+ as a set of bindings, of a user interaction with a GUI
+ FilenameExtra: Additional features for the standard module Filename
+ Fix: Poor man fix point operators
+ Hashm[m]ap: 2 Module implementing polymorphic unbounded (multi) maps
+ Hashset: Very simple module implementing a polymorphic unbounded sets
+ Identifier: Build and manage unique (fresh) identifiers
+ Ledgrid: Constants Some global constant definitions, for fine-tuning
+ ListExtra: Additional features for the standard module List
+ Memo: Module for building memoised functions
+ Oomarshal: Object-oriented marshalling support
+ PreludeExtra: "Additional features" for the standard module Pervasives
+ Shell: A collection of (mainly quick and easy) wrappers for the most
+ famous Unix tools and generic unix commands or scripts
+ StrExtra: Additional features for the standard library Str
+ Sugar: Basic shortcuts and syntactic sugar
+ SysExtra: Additional features for the standard module Sys
+ UnixExtra: Additional features for the standard library Unix
+ Widget: Some generic tools for building GUIs
+ Wrapper: Handling shell scripts in OCaml
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..2a9cc72
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,37 @@
+This package was debianized by Jonathan Roudiere <jonathan.roudiere at lipn.univ-paris13.fr> on
+Mon, 14 Apr 2008 03:21:38 +0200.
+
+It was downloaded from <http://darcs.marionnet.org/repos/ocamlbricks/>
+
+Upstream Authors:
+
+ Luca Saiu <luca.saiu at lipn.univ-paris13.fr>
+ Jean-Vincent Loddo <jean-vincent.loddo at lipn.univ-paris13.fr>
+
+Copyright:
+
+ Copyright (C) 2008 Luca Saiu
+ Copyright (C) 2008 Jean-Vincent Loddo
+
+License:
+
+ This package 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 of the License, or
+ (at your option) any later version.
+
+ This package 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 package; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+On Debian systems, the complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
+
+The Debian packaging is (C) 2008, root <jonathan.roudiere at lipn.univ-paris13.fr> and
+is licensed under the GPL, see above.
+
diff --git a/debian/generate_mli.sh b/debian/generate_mli.sh
new file mode 100755
index 0000000..498660e
--- /dev/null
+++ b/debian/generate_mli.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+# Script provide with libocamlbricks-ocaml-dev packages
+# utility: create *.mli files from sources in $TARGET directory.
+# where $TARGET is the first argument pass to the script
+
+# directory to add in command line
+OCAML_PATH=$(ocamlc -where)
+# where we put *.mli files
+TARGET=$1
+# to exclude a sources file word or regexp
+EXCLUDE="stupid"
+
+# if not exist create $TARGET directory
+mkdir -p $TARGET
+
+# for all *.ml files found in sources directory
+for i in $(find ./[A-Z]* -name \*.ml |grep -v $EXCLUDE |grep -v -e "/m[e,y]" );
+do
+ # create the *.mli corresponding
+ ocamlc -I debian/tmp/$OCAML_PATH/ocamlbricks/ -I $OCAML_PATH/ -I $OCAML_PATH/lablgtk2/ \
+ -i $i > $TARGET/$(basename $i |sed s/'$'/'i'/g) 2> /dev/null
+ done
+
+# Not possible to build this .mli
+rm -f $TARGET/modelExtra.mli 2> /dev/null
+
+exit 0
diff --git a/debian/libocamlbricks-ocaml-dev.dirs.in b/debian/libocamlbricks-ocaml-dev.dirs.in
new file mode 100644
index 0000000..51df790
--- /dev/null
+++ b/debian/libocamlbricks-ocaml-dev.dirs.in
@@ -0,0 +1,4 @@
+ at OCamlStdlibDir@/ocamlbricks
+usr/share/doc-base
+usr/share/doc/libocamlbricks-ocaml-dev/html/api
+usr/share/doc/libocamlbricks-ocaml-dev/examples/buildsystem
diff --git a/debian/libocamlbricks-ocaml-dev.docs b/debian/libocamlbricks-ocaml-dev.docs
new file mode 100644
index 0000000..c231d73
--- /dev/null
+++ b/debian/libocamlbricks-ocaml-dev.docs
@@ -0,0 +1,3 @@
+README
+AUTHORS
+THANKS
diff --git a/debian/patches/00list b/debian/patches/00list
new file mode 100644
index 0000000..e467521
--- /dev/null
+++ b/debian/patches/00list
@@ -0,0 +1 @@
+01_adapt_debian
diff --git a/debian/patches/01_adapt_debian.dpatch b/debian/patches/01_adapt_debian.dpatch
new file mode 100755
index 0000000..0aace05
--- /dev/null
+++ b/debian/patches/01_adapt_debian.dpatch
@@ -0,0 +1,64 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_adapt_debian.dpatch by <root@>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Little modif to add cmx file, one compilation option and path to build
+## DP: package
+
+ at DPATCH@
+
+diff -rN -u ocamlbricks-0.50.1-orig/CONFIGME ocamlbricks-0.50.1/CONFIGME
+--- ocamlbricks-0.50.1-orig/CONFIGME 2008-05-12 23:46:28.000000000 +0200
++++ ocamlbricks-0.50.1/CONFIGME 2008-05-13 01:52:53.000000000 +0200
+@@ -32,21 +32,23 @@
+ # Section 2: Installation setup: prefixes, and the like
+ ###########################################################################
+
+-# Installation prefix for OCaml libraries: they will be installed into
++# Change for Debian Packaging
++DESTDIR=$PWD"/debian/tmp"
++
+ # $prefix/$name, where $name is the package name defined in META.
+ # This is a reasonable default, but you can change it if you really want
+ # to install into a different, custom prefix.
+ # *No* trailing slash should be included.
+-libraryprefix=`ocamlc -where || exit -1`
+-#libraryprefix=/mystrangepath
++#libraryprefix=`ocamlc -where || exit -1`
++libraryprefix=$DESTDIR/`ocamlc -where || exit -1`
+
+ # Installation prefix, for example /usr or /usr/local
+ # *No* trailing slash should be included.
+-prefix=/usr/local
++prefix=$DESTDIR"/usr"
+
+ # Prefix for host-wide configuration files; you should probably keep the
+ # default setting:
+-configurationprefix=/etc
++configurationprefix=$DESTDIR"/etc"
+
+ # Prefix for documentation files; you should probably keep the
+ # default setting:
+diff -rN -u ocamlbricks-0.50.1-orig/Makefile ocamlbricks-0.50.1/Makefile
+--- ocamlbricks-0.50.1-orig/Makefile 2008-05-12 23:46:29.000000000 +0200
++++ ocamlbricks-0.50.1/Makefile 2008-05-13 01:52:57.000000000 +0200
+@@ -349,6 +349,7 @@
+ cp -f META $(OTHER_LIBRARY_FILES_TO_INSTALL) \
+ _build/*.cma _build/*.cmxa _build/*.a \
+ `find _build/ -name \*.cmi | grep -v /myocamlbuild` \
++ `find _build/ -name \*.cmx | grep -v /myocamlbuild` \
+ `find _build/ -name \*.mli | grep -v /myocamlbuild` \
+ $$libraryprefix/$$name/) && \
+ echo 'Library installation was successful.'; \
+@@ -574,9 +575,9 @@
+ # -byte-plugin if needed:
+ OCAMLBUILD_COMMAND_LINE = \
+ (if [ $$( $(call NATIVE_OR_BYTE) ) == 'byte' ]; then \
+- echo 'ocamlbuild -byte-plugin'; \
++ echo 'ocamlbuild -byte-plugin -classic-display'; \
+ else \
+- echo 'ocamlbuild'; \
++ echo 'ocamlbuild -classic-display'; \
+ fi)
+
+ # Macro extracting, via source, the value associated to some keys
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..bc85b27
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,99 @@
+#!/usr/bin/make -f
+# This file was generated by dh_make and adapted by
+# Jonathan Roudiere (2008) for liboamlbricks-ocaml-dev package.
+
+# Variable use here (find version, path)
+OCAMLABI := $(shell ocamlc -version)
+OCAML_LIBDIR := $(shell ocamlc -where)
+OCAML_LIBDIR2 := $(subst /,\/,$(OCAML_LIBDIR))
+DESTDIR = $(CURDIR)/debian/tmp
+OFILES := $(patsubst %.in,%,$(shell ls debian/*.in))
+
+# include an external Makefile to use dpatch
+include /usr/share/dpatch/dpatch.make
+
+# Upstream package
+PACKAGE = ocamlbricks
+VERSION = 0.50.1
+
+# Name of generated package
+DEB_PACKAGE = libocamlbricks-ocaml-dev
+
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -g
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+ INSTALL_PROGRAM += -s
+endif
+
+ocamlinit:
+ for f in $(OFILES); do sed -e 's/@OCamlStdlibDir@/$(OCAML_LIBDIR2)/g' $$f.in > $$f; done
+
+configure: configure-stamp
+configure-stamp: ocamlinit
+ dh_testdir
+ touch configure-stamp
+
+build: build-stamp
+build-stamp: patch-stamp configure-stamp
+ dh_testdir
+ $(MAKE)
+ touch build-stamp
+
+clean: unpatch
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp configure-stamp
+ $(MAKE) clean
+ dh_clean --exclude=buildsystem/*
+ rm -f $(CURDIR)/debian/$(DEB_PACKAGE).doc-base.ocamldoc-apiref
+ rm -f $(CURDIR)/debian/$(DEB_PACKAGE).dirs
+ rm -f $(CURDIR)/debian/$(DEB_PACKAGE).*.debhelper
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k --exclude=buildsystem/*
+ dh_installdirs
+ $(MAKE) install
+
+ # Documentation type html
+ cp $(DESTDIR)/usr/share/doc/$(PACKAGE)/html/*.html $(CURDIR)/debian/$(DEB_PACKAGE)/usr/share/doc/$(DEB_PACKAGE)/html/api/
+ cp $(DESTDIR)/usr/share/doc/$(PACKAGE)/html/*.css $(CURDIR)/debian/$(DEB_PACKAGE)/usr/share/doc/$(DEB_PACKAGE)/html/api/
+
+ # Reference to doc-base
+ /usr/share/cdbs/1/class/ocamldoc-api-ref-config --doc-base-generate libocamlbricks-ocaml-dev
+
+ # Copy libraries for libocamlbricks-ocaml-dev
+ cp $(DESTDIR)/$(OCAML_LIBDIR)/$(PACKAGE)/* $(CURDIR)/debian/$(DEB_PACKAGE)/$(OCAML_LIBDIR)/$(PACKAGE)/
+ rm $(CURDIR)/debian/$(DEB_PACKAGE)/$(OCAML_LIBDIR)/$(PACKAGE)/stupidprogram*
+
+ # create .mli file (header)
+ chmod +x $(CURDIR)/debian/generate_mli.sh
+ $(CURDIR)/debian/generate_mli.sh $(CURDIR)/debian/$(DEB_PACKAGE)/$(OCAML_LIBDIR)/$(PACKAGE)/
+
+# 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 -s
+ dh_testroot -s
+ dh_installchangelogs -s
+ dh_installdocs -s
+ dh_installexamples -s --exclude=COPYING $(CURDIR)/debian/buildsystem
+ dh_installexamples -s $(CURDIR)/stupidprogram.ml
+ dh_installexamples -s $(CURDIR)/LEDGRID/sample-images
+ dh_install -s
+ dh_compress -s
+ dh_fixperms -s
+ dh_makeshlibs -s
+ dh_installdeb -s
+ dh_shlibdeps -s
+ dh_gencontrol -s -- -VF:OCamlABI="$(OCAMLABI)"
+ dh_md5sums -s
+ dh_builddeb -s
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
--
ocamlbricks packaging
More information about the Pkg-ocaml-maint-commits
mailing list