dh_ada_library - help packaging Ada libraries for Debian
is a debhelper program that handles some common tasks in
packaging libraries written in the Ada programming language.
argument designates a GNAT project file building a
shared library provided by the source package. Since using environment
variables in such projects is common practice, a list of variable assignments
may be provided before each project.
reads each project file and extracts the following
information from it: library name, imported projects, source directories,
library directory, object directory (containing ALI files) and linker options
). Then it
to check that three package names exist
conforming to the Coexistence Not Allowed naming scheme described in the
Debian Policy for Ada
and extracts the ALI files version (
)) and the shared library version ( soversion
processes each of the three packages as follows:
installs the shared library (mode 644) into the package
then, if debian/control
mentions a -dbg package, runs package then runs
with options storing its debugging information into the -dbg
If the shared library declares its stack executable, dh_ada_library
generates a lintian override for the runtime library package about GNAT using
trampolines for exception handling. dh_lintian
is run first so that it
will not overwrite the override file later.
The file /usr/share/doc/dh-ada-policy/README.Debian
describes how to
provide the same service with less efforts.
ments a -dbg package, the ada:Depends
substitution variables receive
values reflecting that the -dbg package depends on the library package,
recommends the -dev package and suggests the gnat
Versions <= 5.3 used to replace the documentation directory with a symbolic
link to the one in the runtime library package, but usage has shown that
linking directories caused upgrade problems. If a binary package built with
such a version has been released, the source package should add maintainer
scripts as described in https://wiki.debian.org/MissingCopyrightFile.
installs the usual development symbolic link
(*.so-> *.so. soversion
), ALI files (mode 444) and sources (mode
644) into the -dev package. Languages other than Ada listed in the project
file are taken into account, whether they have been previously dealt with by
, or ignored by gnatmake
and compiled separately. Then
it looks for a file named lib
(the static library)
in the current directory or its subdirectories and installs this file (mode
644) into the -dev package.
A second project file, intended for use by programs linking against the library,
is generated and installed into the -dev package. The Linker
the new project inherits any -l
linker options from
attributes of the
build project file.
Each renaming exception is transmitted to the generated project.
before installing the static library
so that the latter keeps its debugging information.
substitution variable receives a value reflecting that
the package depends on gnat
and the library package.
For each imported library project recognized, either as already processed or
installed on the build system by dpkg-query
, a dependency is added into
and the generated project is added the corresponding
line. In the case of an already processed project within the same
source package, the dependency mandates an exact binary:Version
ensuring that all static libraries are compiled with compatible options.
This program does not belong to the debhelper suite. To activate it, please run
sequencer with the --with ada-library
project attribute is purposedly ignored. Instead, the
soname is guessed from the library package name. For projects needing an
external variable definition to set this attribute, any arbitrary value may be
given. This will often allow the maintainer to use a simple
file instead of a debhelper override or an
environment variable exportation.
Both libraries and ALI files are installed into
DEB_HOST_MULTIARCH, the project and sources into
. This implies that the -dev package cannot be
declared Multi-Arch: same
as the content of the project (and maybe of
generated sources) will vary across architectures.
- Projects and variables, in addition to those in the command
line if called directly from debian/rules. Line breaks are
considered as normal spaces. This may change in the future and it is
recommended to put exactly one affectation or project on each line. Any
line starting with a dash will be ignored.
Common debhelper command line options and environment variables are recognized.
dh_ada_library 'DIRS=src gen SOVERSION=ignored foo.gpr --verbose --no-act
(5), the Debian Policy for Ada
available at http://people.debian.org/~lbrenta/debian-ada-policy.html.
and this manpage were written by Nicolas Boulenguez
<firstname.lastname@example.org> for the Debian project (and may be used by