[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ next ]

Common Lisp in Debian Manual
Chapter 3 - Libraries

Common Lisp libraries in Debian use ASDF – Another System Definition Facility – to manage their components and dependencies.

In the following chapter, asdf-system-name stands for the name of the ASDF system provided in the package, while destination-dir is the basename of the directory the system is installed to. These may differ from each other, so may be the package name.

The Common Lisp Debhelper (see Common Lisp Debhelper, Chapter 4) can take some of the below actions for you.

3.1 Usage of libraries

Since all Common Lisp libraries in Debian make use of ASDF (Another System Definition Facility), loading them in programs is as easy as doing (asdf:oos 'asdf:load-op :library) or as depending on library in your own ASDF system definitions using the :depends-on keyword. Equally, you can do (clc:clc-require :library) or in case of SBCL also (require :library)

However, the naming scheme of Common Lisp library packages does not always allow to give the package the same name as the library it provides. The package documentation in /usr/share/doc/ should answer this question. If not, a listing of the package content using dpkg -Lpackage can be useful. Watch out for files called "asd".

3.1.1 User-specific Installation

Users may call clc-register-user-package /path/asdf-system-name.asd to make their own libraries available to their own instances of the Common Lisp Controller. clc-unregister-user-package /path/asdf-system-name.asd undoes this.

3.2 Package Name

Common Lisp library packages should carry the prefix cl-. If the package is highly implementation specific, it may carry a corresponding suffix, e.g. cl-clx-sbcl.

3.3 Installation Paths

3.3.1 Lisp Data

Packages must install the Lisp source code to /usr/share/common-lisp/source/destination-dir and establish a symbolic link from /usr/share/common-lisp/source/destination-dir/asdf-system-name.asd to /usr/share/common-lisp/systems/asdf-system-name.asd

3.3.2 Foreign Data

Foreign data must be built at package build time and follow the rules below, unless a policy specific to that kind of data states otherwise.

Platform dependent data that is solely required by the provided library should reside in /usr/lib/package-name. This for example affects glue code in form of shared libraries for foreign function interfaces.

Platform independent data that is solely required by the provided library should reside in /usr/share/package-name.

These locations are also recommended by the Debian Policy Manual.

3.4 Dependencies

The dependencies of the Debian package must reflect the dependencies of the ASDF system definition, i.e. all ASDF systems that are depended on must also be available as Debian packages and be listed in debian/control. Libraries must also depend on the common-lisp-controller package.

3.5 Maintainer Scripts

The following actions are required:

invokes /usr/sbin/register-common-lisp-source destination-dir when called with the configure argument.
invokes /usr/sbin/unregister-common-lisp-source destination-dir when called with the remove, upgrade or deconfigure argument.

See Libraries, Chapter 3 for the meaning of destination-dir.

[ previous ] [ Contents ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ next ]

Common Lisp in Debian Manual

René van Bevern rvb@debian.org