dh_elpa(1) install emacs lisp packages into package build directories


dh_elpa [debhelperĀ options] [pkg-file]


dh_elpa is a debhelper program that is responsible for installing elpa style emacs lisp packages into package build directories.

dh_elpa will attempt to run ERT and Buttercup test suites using dh_elpa_test(1) if the debhelper compat level is 10 or higher. To disable this behaviour, or tweak it if it is failing to run the tests as they should be run, set environment variables in debian/rules as detailed in dh_elpa_test(1).


List of files to be installed into package as an elpa package.


--byte-compile, --no-byte-compile
Enable (default) or disable byte compilation of installed emacs lisp files. Disabling byte compilation changes the destination directory to one that is found by the emacs package system.
--fix-autoload-date, --no---fix-autoload-date
Enable (default) or disable munging the dates in Emacs generated autoload files to match debian/changelog.


dh_elpa currently defines three substvars (cf. deb-substvars(5)) that can be used in debian/control
These are dependencies needed by every dh_elpa based package.
This adds a value suitable for a Built-Using header identifying the version of dh_elpa used at build time.
These are dependencies on other ELPA packages as given in the Package-Requires: line of the package's main Emacs Lisp file.

Note that Emacs Lisp dependencies packaged outside the elpa-* dpkg namespace must be specified manually. For example, the s.el library is provided by the binary package s-el. If dh_elpa adds dependency elpa-x where x is an Emacs Lisp binary package outside the elpa-* namespace, please file a bug against dh_elpa to have an exclusion added.


Here is an example of using the helper in a dh(1) style debian/rules

    #!/usr/bin/make -f
        dh $@ --with elpa

Here is an example of a binary package stanza using dh_elpa generated substvars

    Package: elpa-hello
    Architecture: all
    Depends: ${misc:Depends}, ${elpa:Depends}
    Built-Using: ${misc:Built-Using}
    Description: Emacs addon to say hello
     The Emacs editor addon likes to wave and say hello.