Put symlinks in packages.
authorSamuel Mimram <smimram@debian.org>
Fri, 16 Jun 2006 11:11:23 +0000 (11:11 +0000)
committerSamuel Mimram <smimram@debian.org>
Fri, 16 Jun 2006 11:11:23 +0000 (11:11 +0000)
20 files changed:
debian/changelog
debian/control
debian/control.in
debian/ocaml-base-nox.docs
debian/ocaml-base.dirs.in
debian/ocaml-base.postinst [deleted file]
debian/ocaml-base.prerm [deleted file]
debian/ocaml-native-compilers.files
debian/ocaml-native-compilers.postinst [deleted file]
debian/ocaml-native-compilers.prerm [deleted file]
debian/ocaml-nox.dirs.in
debian/ocaml-nox.postinst [new file with mode: 0644]
debian/ocaml-nox.postinst.in [deleted file]
debian/ocaml-nox.prerm [deleted file]
debian/ocaml.dirs.in
debian/ocaml.postinst
debian/ocaml.prerm [deleted file]
debian/ocaml_packaging_policy [deleted file]
debian/policy/Makefile
debian/rules

index da579758ed119b83deffe5df76859e03a990b09f..2ec09c77177e528603858fa026c5509d71aa5ba7 100644 (file)
@@ -1,9 +1,17 @@
-ocaml (3.09.2-3+SVN) UNRELEASED; urgency=low
+ocaml (3.09.2-4) UNRELEASED; urgency=low
 
+  [ Julien Cristau ]
   * Update reference to upstream tarball location in debian/copyright.
   * Actually apply the patch to fix the stdlib manpages' section.
 
- -- Julien Cristau <julien.cristau@ens-lyon.org>  Thu, 18 May 2006 10:44:52 +0200
+  [ Samuel Mimram ]
+  * Integrate the ocaml policy in the package. Added a build dependency on
+    docbook-utils to build it.
+  * Put the symbolic links directly in the packages instead of using postinst.
+  * Put forgotten ocamldep.opt in ocaml-native-compilers.
+  * We don't need to remove rpaths anymore.
+
+ -- Samuel Mimram <smimram@debian.org>  Fri, 16 Jun 2006 09:11:02 +0000
 
 ocaml (3.09.2-3) unstable; urgency=low
 
index e1dd41ccd453eb5e714cb7b50ab20e2be1ed2010..ab645e637ede6b5fe04422bc46af810ce16d168d 100644 (file)
@@ -3,7 +3,7 @@ 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
+Build-Depends: debhelper (>> 4.0.2), tcl8.4-dev, tk8.4-dev, libncurses5-dev, libgdbm-dev, dpatch, bzip2, docbook-utils
 Standards-Version: 3.7.2
 
 Package: ocaml-nox
index 3ea381f6fc8a02e8d8d10a0338bb58014037426c..d5b6e8cb6db0dfab3702ca097f8c6ef26b215bda 100644 (file)
@@ -3,8 +3,8 @@ 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
+Build-Depends: debhelper (>> 4.0.2), tcl8.4-dev, tk8.4-dev, libncurses5-dev, libgdbm-dev, dpatch, bzip2, docbook-utils
+Standards-Version: 3.7.2
 
 Package: ocaml-nox
 Architecture: any
index 2f5ae5ecef29048e6ea30deeda5c150f876a75b6..ae141cf713b5bd7b2a9501ea5e0fbde5b82b0e1c 100644 (file)
@@ -1,3 +1,4 @@
 Changes
 README
-debian/ocaml_packaging_policy
+debian/policy/ocaml_packaging_policy
+debian/policy/ocaml_packaging_policy-html
index 69d9e06469100c1090edee6bbcafbaf8e75ac570..ba87688d3e464aced73612760e1e1209842b3f63 100644 (file)
@@ -1 +1,2 @@
 usr/lib/ocaml/#OcamlABI#/stublibs
+usr/share/doc/ocaml-base
diff --git a/debian/ocaml-base.postinst b/debian/ocaml-base.postinst
deleted file mode 100644 (file)
index 8c606d9..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh -e
-
-ln -sf ../ocaml-base-nox/Changes.gz /usr/share/doc/ocaml-base
-ln -sf ../ocaml-base-nox/README.gz /usr/share/doc/ocaml-base
-ln -sf ../ocaml-base-nox/ocaml_packaging_policy.gz /usr/share/doc/ocaml-base
-
-#DEBHELPER#
diff --git a/debian/ocaml-base.prerm b/debian/ocaml-base.prerm
deleted file mode 100644 (file)
index af5b9e9..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh -e
-
-rm -f /usr/share/doc/ocaml-base/Changes.gz
-rm -f /usr/share/doc/ocaml-base/README.gz
-rm -f /usr/share/doc/ocaml-base/ocaml_packaging_policy.gz
-
-#DEBHELPER#
index 23e98234ed4056eb05e5ebd78d75673fdcac8a0f..b6d35e07e178ac0b57802c12f701b0b852b05146 100644 (file)
@@ -4,3 +4,4 @@
 /usr/bin/camlp4o.opt
 /usr/bin/camlp4r.opt
 /usr/bin/ocamldoc.opt
+/usr/bin/ocamldep.opt
diff --git a/debian/ocaml-native-compilers.postinst b/debian/ocaml-native-compilers.postinst
deleted file mode 100644 (file)
index 67424bf..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-ln -sf /usr/share/man/man1/ocamlc.1.gz /usr/share/man/man1/ocamlc.opt.1.gz
-ln -sf /usr/share/man/man1/ocamlopt.1.gz /usr/share/man/man1/ocamlopt.opt.1.gz
-ln -sf /usr/share/man/man1/ocamllex.1.gz /usr/share/man/man1/ocamllex.opt.1.gz
-ln -sf /usr/share/man/man1/camlp4r.1.gz /usr/share/man/man1/camlp4r.opt.1.gz
-ln -sf /usr/share/man/man1/camlp4o.1.gz /usr/share/man/man1/camlp4o.opt.1.gz
-
-#DEBHELPER#
diff --git a/debian/ocaml-native-compilers.prerm b/debian/ocaml-native-compilers.prerm
deleted file mode 100644 (file)
index e2a6a83..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-rm -f /usr/share/man/man1/ocamlc.opt.1.gz
-rm -f /usr/share/man/man1/ocamlopt.opt.1.gz
-rm -f /usr/share/man/man1/ocamllex.opt.1.gz
-rm -f /usr/share/man/man1/camlp4r.opt.1.gz
-rm -f /usr/share/man/man1/camlp4o.opt.1.gz
-
-#DEBHELPER#
index 49dbea4dcc7b23f0b25bbab0e7051615b375d426..64f6adeaf1b656ecd519b2ca9ee4c4b2a152a946 100644 (file)
@@ -1,7 +1,9 @@
 usr/bin
 usr/lib/ocaml/#OcamlABI#
 usr/lib/ocaml/#OcamlABI#/config
+usr/include
 usr/include/ocaml/#OcamlABI#
+usr/share/doc/ocaml-nox
 usr/share/man/man1
 usr/share/man/man3
 usr/share/texmf/tex/latex/misc
diff --git a/debian/ocaml-nox.postinst b/debian/ocaml-nox.postinst
new file mode 100644 (file)
index 0000000..b024813
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh -e
+
+if [ "$1" = "configure" ]; then
+  ocaml-md5sums update
+
+  # Save Emacs conffiles from previous ocaml versions
+  for f in ocaml ocaml-nox ; do
+    file="/etc/emacs/site-start.d/50$f.el"
+    if [ -e "$file" ]; then
+      mv "$file" "$file.save"
+    fi
+  done
+fi
+
+#DEBHELPER#
diff --git a/debian/ocaml-nox.postinst.in b/debian/ocaml-nox.postinst.in
deleted file mode 100644 (file)
index 5695cd4..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/bin/sh -e
-
-ln -sf /usr/lib/ocaml/#OcamlABI#/caml /usr/include/caml
-
-ln -sf ../ocaml-base-nox/Changes.gz /usr/share/doc/ocaml-nox
-ln -sf ../ocaml-base-nox/README.gz /usr/share/doc/ocaml-nox
-ln -sf ../ocaml-base-nox/ocaml_packaging_policy.gz /usr/share/doc/ocaml-nox
-
-if [ "$1" = "configure" ]; then
-  ocaml-md5sums update
-
-  # Save Emacs conffiles from previous ocaml versions
-  for f in ocaml ocaml-nox ; do
-    file="/etc/emacs/site-start.d/50$f.el"
-    if [ -e "$file" ]; then
-      mv "$file" "$file.save"
-    fi
-  done
-fi
-
-#DEBHELPER#
diff --git a/debian/ocaml-nox.prerm b/debian/ocaml-nox.prerm
deleted file mode 100644 (file)
index 648ab8e..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh -e
-
-rm -f /usr/share/doc/ocaml-nox/Changes.gz
-rm -f /usr/share/doc/ocaml-nox/README.gz
-rm -f /usr/share/doc/ocaml-nox/ocaml_packaging_policy.gz
-
-#DEBHELPER#
index 5105aee50aecf29307dfa2c9431300ca9170b49b..b8299c711cbcdafcccea7a3b5c869017bb4535da 100644 (file)
@@ -1,2 +1,3 @@
 usr/bin
 usr/lib/ocaml/#OcamlABI#
+usr/share/doc/ocaml
index 8b850617e3ec22def50e75a7b9b43311aaf6239c..8b1d7a20bdd3be09acc6dc0ca71c796646f259b2 100644 (file)
@@ -1,10 +1,5 @@
 #!/bin/sh -e
 
-ln -sf ../ocaml-base-nox/Changes.gz /usr/share/doc/ocaml-base
-ln -sf ../ocaml-base-nox/README.gz /usr/share/doc/ocaml-base
-ln -sf ../ocaml-base-nox/ocaml_packaging_policy.gz /usr/share/doc/ocaml-base
-ln -sf ../ocaml-base-nox/README.Debian /usr/share/doc/ocaml-base
-
 if [ "$1" = "configure" ]; then
   ocaml-md5sums update
 fi
diff --git a/debian/ocaml.prerm b/debian/ocaml.prerm
deleted file mode 100644 (file)
index d0819f3..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh -e
-
-rm -f /usr/share/doc/ocaml/Changes.gz
-rm -f /usr/share/doc/ocaml/README.gz
-rm -f /usr/share/doc/ocaml/ocaml_packaging_policy.gz
-
-#DEBHELPER#
diff --git a/debian/ocaml_packaging_policy b/debian/ocaml_packaging_policy
deleted file mode 100644 (file)
index 153ec8e..0000000
+++ /dev/null
@@ -1,240 +0,0 @@
-Policy for the packaging of ocaml libraries and programs (version 0.6)
-----------------------------------------------------------------------
-
-  1) User installed libraries
-
-     Debian package installed ocaml related stuff install per default under
-     /usr/lib/ocaml/<ocaml_version> (that is /usr/lib/ocaml/3.08 for
-     ocaml 3.08).
-
-     User installed stuff cannot by policy go under this directory, since the
-     /usr tree is for dpkg handled packages alone. As thus, user installed
-     stuff should go into /usr/local/lib/ocaml/<ocaml_version> (that is
-     /usr/local/lib/ocaml/3.08 for ocaml 3.08).
-
-     Findlib knows about this, and will install user installed stuff into the
-     right place. But this does not resolve the problem of user stuff which
-     does not use findlib.
-
-     Another problem is that the actual version of ocaml will not search more
-     than one path by default nor can the -I +dir option be used for locally
-     installed stuff, and as thus the full path needs to be handled for these
-     cases. A solution to this needs to be coordinated with upstream.
-
-     Finally, the runtime system will look for dll.so files first at
-     /usr/local/lib/ocaml/<ocaml_version>/stublibs and then at
-     /usr/lib/ocaml/<ocaml_version>/stublibs, as can be seen in the
-     /usr/lib/ocaml/<ocaml_version>/ld.conf file.
-
-  2) Dynamically loaded stub libraries and ld.conf handling
-  
-     Starting from ocaml 3.05, ocaml now puts all dll.so files into a common
-     stublibs directory, so the ocaml-ldconf tool for handling the ld.conf
-     file is not needed anymore, but we will still keep it around until all
-     libraries are ported. Since ocaml 3.08, ocaml-ldconf is now deprecated
-     and removed.
-
-     Notice that user installed dll.so files should go into
-     /usr/local/lib/ocaml/<ocaml_version>/stublibs which is searched before
-     /usr/lib/ocaml/<ocaml_version>/stublibs.
-
-  3) Findlib and META files
-
-     Findlib [2] provides a tool (namely "ocamlfind") to handle OCaml libraries 
-     and store information about libraries dependencies, compiler flags, linking
-     options, etc ...
-     Meta information regarding a library are contained in files (usually one
-     for each library), named "META" files, contained in the library directory.
-     For example: the META file for the lablgtk [3] library is named "META" and
-     has path /usr/lib/ocaml/3.08/lablgtk/META, where "/usr/lib/ocaml/3.08" is
-     the main OCaml installation directory and "lablgtk" is the lablgtk library
-     directory.
-
-     A package which provides OCaml libraries should provides one META file for
-     each library it provides and should have it installed so that findlib can
-     find it (easily checkable doing "ocamlfind list"), installing it in the
-     library directory is usually a good solution, but others are possible.
-     If the META file isn't available upstream, the maintainer should
-     write one, include it in the Debian package and suggest the upstream to
-     include it in next release.
-
-     Writing a META file is easy and usually takes a 5-minute-work, for more
-     information have a look at the Findlib manual [4], at the several META
-     files provided by other packages (e.g. lablgtk, pxp, pcre, netstring,
-     lablgl, ...) or ask on the debian-ocaml-maint ML [1] for help.
-
-  4) Ocaml library packages
-
-     A package, named xxx, which provides ocaml libraries should be split as
-     follows :
-
-       - libxxx-ocaml will provide the shared library stubs, and all other
-         stuff needed to run a dynamic loading ocaml bytecode executable that
-        links into this library.
-        It should depend on ocaml-base (or ocaml-base-nox, see section 8)
-        as well as any other library needed.
-
-       - libxxx-ocaml-dev will provide the rest of the library package, in
-        fact anything needed to develop programs using the library.
-
-     Optionally, two other packages can be split :
-
-       - libxxx-ocaml-bin may include binaries provided by the library source
-        package if they are numerous. This package should conform with the
-        same regulations as other packages providing ocaml programs. It is
-        only needed to split off this package if there is a significant
-        number of programs included in the library, if not, the programs
-        should go into libxxx-ocaml-dev.
-
-       - libxxx-ocaml-doc may include any kind of documentation provided by
-        the library source package or as separate documentation. Again, if
-        there is only little documentation, they should go with the -dev
-        package.
-
-     It is also recommended that libraries use the -pack option to pack all
-     the modules provided by the library into one module. I am not sure this
-     really works right now for libraries, and i don't think upstream
-     libraries will be moving to this scheme anytime soon (unless we actively
-     lobby for it) so this is just a recommendation for now.
-
-  5) Ocaml program packages
-
-     Any package providing executables issued from ocaml source should conform
-     the following regulations.
-
-     - the package will go by the name of the upstream package, without
-       modifications.
-
-     - the package debian/rules should build the native code executable if
-       supported on the architecture it is built on, and fall back to building
-       the bytecode version if no working native code compiler is available.
-       And exception to this are the executables who are small or not time
-       critical, which may be built only as bytecode executable. It is the
-       decision of the individual maintainers to choose this, maybe guided by
-       the practice of the upstream author.
-
-     - all bytecode executables should be dynamic loading, so as to not bloat
-       the archive. However, there may be special cases, were using statically
-       linked bytecode is necessary, in these cases, it is naturally ok to
-       link statically. That said, often the upstream authors will favor
-       statically linked bytecode executables, because so they don't need to
-       worry about the presence of the dll stub libraries and such. This will
-       never be a valid reason to use statically linked bytecode in a debian
-       package. If statically linked bytecode is provided, a justification of
-       this use should be provided in the README.Debian file.
-     
-     Notice, that for now, we will not split the packages into a native code
-     version and a dynamic loading bytecode version. This may be a change we
-     will go in post woody, and which will allow to distribute the bytecode
-     executables as binary: all.
-
-  6) Caml C headers
-
-     On debian systems, the caml C headers are encountered under
-     /usr/include/caml, as it should be. A /usr/lib/ocaml/<ocaml_version>/caml
-     symlink is provided for backward compatibility of non debian maintained
-     packages, but using them is considered broken for debian packages.
-
-  7) Ocaml-best-compilers
-
-     Packages for which it is recommended to use the optimized nativecode
-     compilers to build them should depend on the ocaml package and the
-     ocaml-best-compilers package. The ocaml-best-compilers will provide the
-     best compilers available for that architecture, but as it is a virtual
-     package, it cannot (yet) be a versioned dependency. The version
-     dependency should thus be carried by the ocaml dependency.
-
-     Notice that it is only useful to use the nativecode compilers when the
-     package contains especially large source files or is very large. Mostly
-     when this is the case, the upstream authors will recommend the use of
-     nativecode compilers in these cases.
-
-     If native code compilers are recommended, it would be a good idea to
-     split the package between the native code version and a binary: all
-     bytecode version, in order to not overload the slower not nativecode
-     architectures.
-
-  8) Ocaml dependencies.
-
-     The ocaml libraries should always depend on the exact version of ocaml
-     they were build with. Since ocaml 3.06-13, the ocaml and ocaml-base
-     package now provide virtual packages called ocaml-3.08 and
-     ocaml-base-3.08 respectively.
-
-     Since ocaml 3.07.2a-3, ocaml is split in ocaml-nox and ocaml and
-     ocaml-base is split in ocaml-base-nox and ocaml-base. The -nox packages
-     contain all the files the packages used to contain except the files
-     related to the Graphics module and labltk. This has been done in order to
-     avoid unnecessary dependencies to X libraries. The -nox packages should
-     be used in the dependencies when neither Graphics nor labltk is used in the
-     program.
-     
-     Ocaml libraries should build depend on ocaml-3.08 :
-     
-       Build-Depends: ocaml-3.08
-
-     (or ocaml-nox-3.08 if the library does not require X stuff)
-
-     Ocaml library runtime packages (the libxxx-ocaml)
-     should depend on ocaml-base-3.08 :
-
-       Depends: ocaml-base-3.08
-
-     (or ocaml-base-nox-3.08 if the library does not require X stuff)
-
-     And Ocaml library development packages (the libxxx-ocaml-dev)
-     should depend on ocaml-3.08 :
-     
-       Depends: ocaml-3.08
-
-     (or ocaml-nox-3.08 if the library does not require X stuff)
-     
-     The old way of doing this (Depends: ocaml (>= 3.08), ocaml (<< 3.09)) is
-     deprecated 
-
-     It is necessary to do this to future proof library packages, so they will
-     not remain installed when a new, maybe incompatible, version of ocaml is
-     installed, and thus provide library parts built with different versions
-     of the compiler, which may not work, and is not recommended by the ocaml
-     team.
-
-     In the future, this restriction may be lifted if ocaml gains a finer
-     control of the incompatible changes in the .cm* files.
-
-     Also i may add some stuff to be able to determine this version
-     dynamically from the ocaml package, in order to simplify the work of my
-     fellow maintainers, but this will probably be a post woody stuff.
-
-     Finally, i strongly recommend that all packages containing ocaml
-     executables follow these same dependency rules, although it may not be
-     always necessary, but again this is something recommended by the upstream
-     authors. As an exception, it is mandatory to add these dependencies for
-     executables which do dynamic loading of bytecode files, for the same
-     reason as the library case.
-
-     Notice that a critic to this is that it may hinder the ocaml compiler to
-     enter testing, if there are still packages in testing that depend on an
-     older version of ocaml. This is ok, in fact it is even the expected
-     behavior of testings and the new pool stuff. The idea is that all the
-     packages which depend on the exact same version of the ocaml package will
-     need to be available as testing candidates before the ocaml package can
-     enter testing simultaneously with these other packages. This is were the
-     pool name comes from, and we have here the ocaml pool.
-
-Ok, thats all for now, feel free to comment on it on the debian-ocaml-maint [1]
-list.
-References:
-
-[1] Debian Ocaml Maintainer Mailing List, <debian-ocaml-maint@lists.debian.org>,
-    archives available at http://lists.debian.org/debian-ocaml-maint/
-[2] http://www.ocaml-programming.de/packages/, debian package "ocaml-findlib"
-[3] http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/
-[4] http://www.ocaml-programming.de/packages/documentation/findlib/,
-    /usr/share/doc/ocaml-findlib/html/index.html
-
-Authors:
- First version:
- -- Sven Luther <luther@lambda.u-strasbg.fr>, Sat, 14 Dec 2002 22:18:44 +0100
- findlib && META:
- -- Stefano Zacchiroli <zack@cs.unibo.it>, Thu, 13 Jun 2002 21:21:52 +0200
index 05f3a7fbec06b84cf33121edf78ffbffd7f33b92..29f1347e0a5b93d8ea30d814c9fae30ef2e5c765 100644 (file)
@@ -1,12 +1,13 @@
 all: html text
 
 html:
-       docbook2html ocaml_packaging_policy.xml -o packaging-policy-html
+       docbook2html ocaml_packaging_policy.xml -o ocaml_packaging_policy-html
 
 text:
        docbook2txt ocaml_packaging_policy.xml
+       mv ocaml_packaging_policy.txt ocaml_packaging_policy
 
 clean:
-       $(RM) -rf packaging-policy-html ocaml_packaging_policy.txt
+       $(RM) -rf ocaml_packaging_policy-html ocaml_packaging_policy
 
 .PHONY: html text
index 6edaf3bf2e9aa8577bf3cf0570d31daa9b2cd5f3..b8b2a44087a9814e478818d2bf35d5611683f9ac 100755 (executable)
@@ -105,6 +105,7 @@ endif
        else                                                            \
                $(MAKE) -C debian/ocaml-md5sums all;                    \
        fi
+       $(MAKE) -C debian/policy
        touch build-arch-stamp
 
 build-indep: build-indep-stamp
@@ -126,6 +127,7 @@ clean: abi-sed unpatch
        fi
        -$(MAKE) -C emacs clean
        -$(MAKE) -C debian/ocaml-md5sums clean
+       -$(MAKE) -C debian/policy clean
 ifneq "$(wildcard /usr/share/misc/config.sub)" ""
        -cp -f /usr/share/misc/config.sub config/gnu/config.sub
 endif
@@ -151,8 +153,7 @@ install-indep: build-indep
        fi
        $(MAKE) -C emacs SCRIPTDIR=$(CURDIR)/debian/ocaml-mode/usr/bin install-ocamltags
 
-       # Add here commands to install the indep part of the package into
-       # debian/<package>-doc.
+       # Build the archive for ocaml-source
        for i in `cat debian/ocaml-source.files`; do                    \
                install -m 644 -D $$i                                   \
                debian/ocaml-source/usr/src/ocaml-$(OCAMLABI)/$$i;      \
@@ -169,10 +170,6 @@ install-arch: build-arch
        dh_clean -k -a
        dh_installdirs -a
 
-       # Add here commands to install the arch part of the package into
-       # debian/tmp.
-       #$(MAKE) install prefix=$(CURDIR)/debian/ocaml/usr
-
        # Let's install ocaml first.
        $(MAKE) install PREFIX=$(CURDIR)/debian/ocaml-nox/usr
        install -m 644 debian/ocaml.xpm \
@@ -185,10 +182,11 @@ install-arch: build-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 the list of archs with ocamlopt
        install -m 644 debian/native-archs $(CURDIR)/debian/ocaml-nox$(STDLIBDIR)
 
-       # now move the graphics files over
+       # Now move the graphics files over
        if [ -e opt-built-stamp ]; then                                 \
                dh_movefiles -pocaml                                    \
                        --sourcedir=debian/ocaml-nox                    \
@@ -198,13 +196,12 @@ install-arch: build-arch
                        --sourcedir=debian/ocaml-nox;                   \
        fi
 
-
        # Then move the ocaml-base-nox package.
        dh_movefiles -pocaml-base-nox --sourcedir=debian/ocaml-nox
        install -m 644 debian/ld.conf \
                $(CURDIR)/debian/ocaml-base-nox/usr/lib/ocaml/$(OCAMLABI)
 
-       # and base's corresponding graphics stuff.
+       # And base's corresponding graphics stuff.
        dh_movefiles -pocaml-base --sourcedir=debian/ocaml-nox
 
        # The ocaml-native-compilers, if available.
@@ -216,8 +213,7 @@ install-arch: build-arch
        fi
 
        # The interpreter files
-       dh_movefiles -pocaml-interp                                     \
-                       --sourcedir=debian/ocaml-nox
+       dh_movefiles -pocaml-interp --sourcedir=debian/ocaml-nox
 
        # Some extra stuff
        install -m 644 utils/*.mli utils/*.cmi utils/*.cmo              \
@@ -230,11 +226,6 @@ install-arch: build-arch
                        $(CURDIR)/debian/ocaml-compiler-libs/usr/lib/ocaml/$(OCAMLABI)/compiler-libs; \
        fi
 
-       # Delete rpath in DLLs
-       chrpath -d $(CURDIR)/debian/ocaml-base/usr/lib/ocaml/$(OCAMLABI)/stublibs/dllgraphics.so        \
-               $(CURDIR)/debian/ocaml-base/usr/lib/ocaml/$(OCAMLABI)/stublibs/dlllabltk.so             \
-               $(CURDIR)/debian/ocaml-base/usr/lib/ocaml/$(OCAMLABI)/stublibs/dlltkanim.so
-
        # install ocaml-md5sums
        $(MAKE) -C debian/ocaml-md5sums install DESTDIR=$(CURDIR)/debian/ocaml-base-nox/usr/bin
 
@@ -247,6 +238,38 @@ install-arch: build-arch
                        ../$$pkg$(MD5SUMSDIR)/$$pkg.md5sums;                            \
         done)
 
+       # Remove .opt manpages from ocaml-nox
+       rm -f $(wildcard debian/ocaml-nox/usr/share/man/man1/*.opt.1) $(wildcard debian/ocaml-nox/usr/share/man/man1/*.opt.1.gz)
+
+       # make some symbolic links
+       cd debian/ocaml-nox/usr/include; ln -sf /usr/lib/ocaml/$(ocamlabi)/caml .
+       cd debian/ocaml-native-compilers/usr/share/man/man1; \
+               ln -sf /usr/share/man/man1/ocamlc.1.gz ocamlc.opt.1.gz; \
+               ln -sf /usr/share/man/man1/ocamlopt.1.gz ocamlopt.opt.1.gz; \
+               ln -sf /usr/share/man/man1/ocamllex.1.gz ocamllex.opt.1.gz; \
+               ln -sf /usr/share/man/man1/ocamldoc.1.gz ocamldoc.opt.1.gz; \
+               ln -sf /usr/share/man/man1/ocamldep.1.gz ocamldep.opt.1.gz; \
+               ln -sf /usr/share/man/man1/camlp4r.1.gz camlp4r.opt.1.gz; \
+               ln -sf /usr/share/man/man1/camlp4o.1.gz camlp4o.opt.1.gz
+       cd debian/ocaml/usr/share/doc/ocaml; \
+               ln -sf ../ocaml-base-nox/changes.gz .; \
+               ln -sf ../ocaml-base-nox/readme.gz .; \
+               ln -sf ../ocaml-base-nox/readme.debian .; \
+               ln -sf ../ocaml-base-nox/ocaml_packaging_policy.gz .; \
+               ln -sf ../ocaml-base-nox/ocaml_packaging_policy-html .
+       cd debian/ocaml-nox/usr/share/doc/ocaml-nox; \
+               ln -sf ../ocaml-base-nox/changes.gz .; \
+               ln -sf ../ocaml-base-nox/readme.gz .; \
+               ln -sf ../ocaml-base-nox/readme.debian .; \
+               ln -sf ../ocaml-base-nox/ocaml_packaging_policy.gz .; \
+               ln -sf ../ocaml-base-nox/ocaml_packaging_policy-html .
+       cd debian/ocaml-base/usr/share/doc/ocaml-base; \
+               ln -sf ../ocaml-base-nox/changes.gz .; \
+               ln -sf ../ocaml-base-nox/readme.gz .; \
+               ln -sf ../ocaml-base-nox/readme.debian .; \
+               ln -sf ../ocaml-base-nox/ocaml_packaging_policy.gz .; \
+               ln -sf ../ocaml-base-nox/ocaml_packaging_policy-html .
+
        dh_install -a
 
 # Must not depend on anything. This is to be called by