Snippets and such for dh_elpa-fied emacs addon Debian package

This contains information that may prove useful in packaging an emacs addon for Debian when using the dh_elpa system and conforming to Debian elpa emacs addon policy. An attempt is made to organize the information in a fashion that facilitates copy-and-paste.

For concreteness, we imagine packaging a "hello" emacs addon package, which was previously packaged as hello-el.

This is not exhaustive. It does not include files or stanzas which are not specific to dh_elpafied emacs addon packages, e.g., debian/source/format or debian/changelog. Nor does it show how to generate or install an info file.


debian/* script snippets


      Section: editors
      Priority: optional

      Maintainer: Debian Emacsen team <>
      Uploaders: Hello Packager <>

      Build-Depends: debhelper-compat (= 12), dh-elpa (>= 2.0.6~)


      Package: elpa-hello
      Architecture: all
      Depends: ${misc:Depends}, ${elpa:Depends}
      Enhances: emacs
      Breaks: hello-el (<< 1.0)
      Provides: hello-el
      Description: Emacs addon to say hello
       The Emacs editor addon likes to wave and say hello.

      Package: hello-el
      Architecture: all
      Depends: ${misc:Depends}, elpa-hello
      Description: Transition Package, hello-el to elpa-hello
       The hello emacs addon has been elpafied.  This dummy package
       helps ease transition from hello-el to elpa-hello.


      rm_conffile /etc/emacs/site-start.d/50hello-el.el

Only included if you have a hello-el transitional binary package.


      #!/usr/bin/make -f

              dh $@ --with elpa







Common mistakes to avoid

dh_elpa and dh_make_elpa are designed to obviate the need for tools like Cask. Do not be misled by upstream's repository into thinking that you need to build-depend on Cask! Generally, you will want to disable Cask with rules targets like this:

and then configure dh_elpa_test to run the test suite anyway (which in most cases will not require any additional configuration).