Add a file containing the list of architectures with native compilers, and install...
authorJulien Cristau <julien.cristau@ens-lyon.org>
Mon, 19 Dec 2005 13:05:47 +0000 (13:05 +0000)
committerJulien Cristau <julien.cristau@ens-lyon.org>
Mon, 19 Dec 2005 13:05:47 +0000 (13:05 +0000)
debian/changelog
debian/control.in [new file with mode: 0644]
debian/native-archs [new file with mode: 0644]
debian/rules

index 413a23ff091921edd6c322d154c69ad55acd637b..d6c794ee9b1ab7421372ca0d133c478ff649e1f4 100644 (file)
@@ -12,8 +12,10 @@ ocaml (3.09.0-4) unstable; urgency=low
 
   [ Julien Cristau ]
   * Disable for_pack_static.dpatch for now, as it breaks the ABI.
+  * Install the list of architectures with native compilers in the ocaml-nox
+    package.
 
- -- Julien Cristau <julien.cristau@ens-lyon.org>  Mon, 19 Dec 2005 13:13:31 +0100
+ -- Julien Cristau <julien.cristau@ens-lyon.org>  Mon, 19 Dec 2005 14:03:50 +0100
 
 ocaml (3.09.0-3) unstable; urgency=low
 
diff --git a/debian/control.in b/debian/control.in
new file mode 100644 (file)
index 0000000..6aa334f
--- /dev/null
@@ -0,0 +1,165 @@
+Source: ocaml
+Section: devel
+Priority: optional
+Maintainer: Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org>
+Uploaders: Sven Luther <luther@debian.org>, Stefano Zacchiroli <zack@debian.org>, Julien Cristau <julien.cristau@ens-lyon.org>, Samuel Mimram <smimram@debian.org>
+Build-Depends: debhelper (>> 4.0.2), tcl8.4-dev, tk8.4-dev, libncurses5-dev, libgdbm-dev, dpatch, bzip2, chrpath
+Standards-Version: 3.6.2
+
+Package: ocaml-nox
+Architecture: any
+Depends: libncurses5-dev, ocaml-base-nox (=${Source-Version}), ocaml-base-nox-${F:OCamlABI}, ocaml-interp-${F:OCamlABI}, gcc, binutils
+Suggests: ocaml-doc, libgdbm-dev, tuareg-mode | ocaml-mode
+Recommends: ledit, file
+Provides: ocaml-nox-${F:OCamlABI}, ${F:BestProvides}, libnums-ocaml-dev
+Replaces: camlp4, ocaml (<< 3.07.2a-3), libnums-ocaml-dev
+Conflicts: camlp4, camlidl (<< 1.04), ocaml (<< 3.07.2a-3), libnums-ocaml-dev
+Description: ML language implementation with a class-based object system
+ Objective Caml is an implementation of the ML language, based on
+ the Caml Light dialect extended with a complete class-based object system
+ and a powerful module system in the style of Standard ML.
+ .
+ Objective Caml comprises two compilers. One generates bytecode
+ which is then interpreted by a C program. This compiler runs quickly,
+ generates compact code with moderate memory requirements, and is
+ portable to essentially any 32 or 64 bit Unix platform. Performance of
+ generated programs is quite good for a bytecoded implementation:
+ almost twice as fast as Caml Light 0.7. This compiler can be used
+ either as a standalone, batch-oriented compiler that produces
+ standalone programs, or as an interactive, toplevel-based system.
+ .
+ The other compiler generates high-performance native code for a number
+ of processors. Compilation takes longer and generates bigger code, but
+ the generated programs deliver excellent performance, while retaining
+ the moderate memory requirements of the bytecode compiler. It is not
+ available on all arches though.
+ .
+ This package contains everything needed to develop ocaml applications
+ that do not require the graphics library.
+
+Package: ocaml
+Architecture: any
+Depends: ocaml-base (= ${Source-Version}), ocaml-base-${F:OCamlABI}, ocaml-nox-${F:OCamlABI}
+Suggests: xlibs-dev, tcl8.4-dev, tk8.4-dev
+Provides: ocaml-${F:OCamlABI}
+Description: ML language implementation with a class-based object system
+ Objective Caml is an implementation of the ML language, based on
+ the Caml Light dialect extended with a complete class-based object system
+ and a powerful module system in the style of Standard ML.
+ .
+ Objective Caml comprises two compilers. One generates bytecode
+ which is then interpreted by a C program. This compiler runs quickly,
+ generates compact code with moderate memory requirements, and is
+ portable to essentially any 32 or 64 bit Unix platform. Performance of
+ generated programs is quite good for a bytecoded implementation:
+ almost twice as fast as Caml Light 0.7. This compiler can be used
+ either as a standalone, batch-oriented compiler that produces
+ standalone programs, or as an interactive, toplevel-based system.
+ .
+ The other compiler generates high-performance native code for a number
+ of processors. Compilation takes longer and generates bigger code, but
+ the generated programs deliver excellent performance, while retaining
+ the moderate memory requirements of the bytecode compiler. It is not
+ available on all arches though.
+ .
+ This package contains everything needed to develop ocaml applications,
+ including the graphics libraries.
+
+Package: ocaml-base-nox
+Architecture: any
+Provides: ocaml-base-nox-${F:OCamlABI}, libnums-ocaml
+Depends: ${shlibs:Depends}
+Replaces: ocaml-base (<< 3.07.2a-3), libnums-ocaml
+Conflicts: ocaml (<< 3.04-2), ocaml-base (<< 3.07.2a-3), libnums-ocaml
+Description: Runtime system for ocaml bytecode executables
+ Objective Caml is an implementation of the ML language, based on
+ the Caml Light dialect extended with a complete class-based object system
+ and a powerful module system in the style of Standard ML.
+ .
+ This package contains only the runtime system needed to run bytecode
+ executables that do not use the graphics library. The `ocaml' package
+ contains the full development suite of Objective Caml.
+
+Package: ocaml-base
+Architecture: any
+Depends: ${shlibs:Depends}, ocaml-base-nox-${F:OCamlABI}
+Provides: ocaml-base-${F:OCamlABI}
+Description: Runtime system for ocaml bytecode executables
+ Objective Caml is an implementation of the ML language, based on
+ the Caml Light dialect extended with a complete class-based object system
+ and a powerful module system in the style of Standard ML.
+ .
+ This package contains only the runtime system needed to run bytecode
+ executables. The `ocaml' package contains the full development suite of
+ Objective Caml.  You may wish to install the 'ocaml-base-nox' package if
+ you do not require any graphical capilities for your runtime.
+
+Package: ocaml-native-compilers
+Architecture: @native-archs@
+Depends: ocaml-nox (= ${Source-Version}), ocaml-nox-${F:OCamlABI}, gcc, binutils, ${shlibs:Depends}
+Provides: ocaml-best-compilers
+Description: Native code compilers of the ocaml suite (the .opt ones)
+ Objective Caml is an implementation of the ML language, based on
+ the Caml Light dialect extended with a complete class-based object system
+ and a powerful module system in the style of Standard ML.
+ .
+ This package contains the native code version of the compilers and lexer
+ (ocamlc.opt, ocamllex.opt, ocamlopt.opt, camlp4o.opt and camlp4r.opt).
+ The normal version of these programs are found in the ocaml package.
+ For big source codes, these packages can be two to three times faster, but
+ for most normal sized sources, the difference won't be noticeable.
+
+Package: ocaml-source
+Architecture: all
+Provides: ocaml-source-${F:OCamlABI}
+Description: Sources for Objective Caml
+ Objective Caml is an implementation of the ML language, based on
+ the Caml Light dialect extended with a complete class-based object system
+ and a powerful module system in the style of Standard ML.
+ .
+ This package contains the sources needed to build some packages which build
+ depend on the ocaml source. Notice that if you want to rebuild ocaml, these
+ will not work, consider using the source package instead.
+
+Package: ocaml-interp
+Architecture: any
+Provides: ocaml-interp-${F:OCamlABI}
+Depends: ocaml-base-nox-${F:OCamlABI}
+Replaces: ocaml (<< 3.07.2a-3)
+Conflicts: ocaml (<< 3.07.2a-3)
+Description: Ocaml interpreter and standard libraries
+ Objective Caml is an implementation of the ML language, based on
+ the Caml Light dialect extended with a complete class-based object system
+ and a powerful module system in the style of Standard ML.
+ .
+ This package contains the files required to run an ocaml shell from the
+ command line.
+
+Package: ocaml-compiler-libs
+Architecture: any
+Provides: ocaml-compiler-libs-${F:OCamlABI}
+Depends: ocaml-nox-${F:OCamlABI}
+Description: Ocaml interpreter and standard libraries
+ Objective Caml is an implementation of the ML language, based on
+ the Caml Light dialect extended with a complete class-based object system
+ and a powerful module system in the style of Standard ML.
+ .
+ This package contains several modules used internally by the ocaml
+ compilers.  They are not needed for normal ocaml development, but may
+ be helpful in the development of certain applications.
+
+Package: ocaml-mode
+Architecture: all
+Depends: emacs21 | emacsen
+Suggests: ocaml
+Conflicts: ocaml-nox (<< 3.08.3-8)
+Description: A major mode for editing Objective Caml in Emacs
+ This package provides support for editing both Objective Caml and
+ Caml Light programs with Emacs and XEmacs.
+ .
+ Caml-mode supports:
+  - indentation
+  - compilation and error retrieving
+  - interaction with the toplevel
+  - font-lock
+  - imenu
diff --git a/debian/native-archs b/debian/native-archs
new file mode 100644 (file)
index 0000000..26a6d99
--- /dev/null
@@ -0,0 +1 @@
+alpha amd64 arm hurd-i386 i386 ia64 kfreebsd-i386 powerpc sparc
index e3ecb1a186cf7361a5ee7a0e7a7bd1db2695d5c5..c5a0cd9a73339c04371bb03d1a044b662f8e7958 100755 (executable)
@@ -14,6 +14,8 @@ OCAMLABI = $(OCAMLMAJOR).$(OCAMLMINOR)
 STDLIBDIR = /usr/lib/ocaml/$(OCAMLABI)
 MD5SUMSDIR = /var/lib/ocaml/md5sums
 
+NATIVE_ARCHS = $(shell cat debian/native-archs)
+
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
@@ -38,10 +40,16 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
 endif
 
 abi-sed:
-       for t in `find debian/ -name \*.in`; do \
+       for t in `find debian/ -name \*.in | grep -v debian/control.in`; do \
          sed -e 's%#OcamlABI#%$(OCAMLABI)%' -e 's%#OcamlMAJOR#%$(OCAMLMAJOR)%' $$t >$${t%.in}; \
        done
 
+# generate ocaml-native-compilers' Architecture field
+# should never be called automatically
+debian/control:
+       sed -e 's/@native-archs@/$(NATIVE_ARCHS)/g' debian/control.in > $@
+
+
 config-stamp: configure abi-sed
        dh_testdir
        # Add here commands to configure the package.
@@ -74,12 +82,10 @@ build-arch-stamp: patch-stamp config-stamp
        fi
        $(MAKE) world
        $(MAKE) bootstrap
-ifneq ($(DEB_BUILD_ARCH),hppa)
-       if ! grep -q "ARCH=none" config/Makefile; then \
-               echo "Building native compilers" && \
-               $(MAKE) opt opt.opt && \
-               touch opt-built-stamp; \
-       fi
+ifneq ($(findstring $(DEB_BUILD_ARCH),$(NATIVE_ARCHS)),)
+       @echo "Building native compilers"
+       $(MAKE) opt opt.opt
+       touch opt-built-stamp
 endif
        if [ -x ./ocamlopt ]; then                                      \
                $(MAKE) -C debian/ocaml-md5sums opt;                    \
@@ -165,6 +171,8 @@ install-arch:
                $(CURDIR)/debian/README.labltk
        install -m 644 config/Makefile \
                $(CURDIR)/debian/ocaml-nox/usr/lib/ocaml/$(OCAMLABI)/config/Makefile
+       # install the list of archs with ocamlopt
+       install -m 644 debian/native-archs $(CURDIR)/debian/ocaml-nox$(STDLIBDIR)
 
        # now move the graphics files over
        if [ -e opt-built-stamp ]; then                                 \