Differences between revisions 6 and 8 (spanning 2 versions)
Revision 6 as of 2019-09-28 23:04:00
Size: 4290
Comment: fix typo. "hellpackage" should probably not be uploaded to the archive ;-)
Revision 8 as of 2020-06-28 05:30:49
Size: 4282
Editor: LevLamberov
Comment: Proper place for teams' wikis are under Teams/
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from EmacsenTeam/elpa-hello
Line 13: Line 14:
are not specific to dh_elpa-ified emacs addon packages, e.g., are not specific to dh_elpafied emacs addon packages, e.g.,
Line 34: Line 35:
      Maintainer: Debian Emacs addons team <pkg-emacsen-addons@lists.alioth.debian.org>
      Uploaders: Hello Packager <hellopackage@debian.org>
      Maintainer: Debian Emacsen team <debian-emacsen@lists.debian.org>
      Uploaders: Hello Packager <hellopackager@debian.org>
Line 37: Line 38:
 * Declare appropriate build dependencies. Note that dh-elpa pulls in
 
emacs.  Need dh-elpa 0.0.17+ for "dh --with elpa" in debian/rules.
 * Declare appropriate build dependencies. Note that dh-elpa depends on emacs-nox if emacs is not installed.
Line 40: Line 40:
      Build-Depends: debhelper-compat (= 12), dh-elpa (>= 0.0.17)       Build-Depends: debhelper-compat (= 12), dh-elpa
Line 44: Line 44:
      Vcs-Git: https://salsa.debian.org/emacsen-team/hello.git/       Vcs-Git: https://salsa.debian.org/emacsen-team/hello.git
Line 48: Line 48:
  pre-existing collab-maint repository.)   pre-existing collab-maint repository.  Collab-maint became the Debian team/namespace on Salsa.)
Line 55: Line 55:
      Recommends: emacs (>= 46.0)
      Enhances: emacs, emacs24, emacs25
      Enhances: emacs

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.

Quickstart

  • apt-get install dh-make-elpa
  • man dh-make-elpa

debian/* script snippets

debian/control

  • Appropriate section and priority:

      Section: editors
      Priority: optional
  • Indicate team maintenance:

      Maintainer: Debian Emacsen team <debian-emacsen@lists.debian.org>
      Uploaders: Hello Packager <hellopackager@debian.org>
  • Declare appropriate build dependencies. Note that dh-elpa depends on emacs-nox if emacs is not installed.

      Build-Depends: debhelper-compat (= 12), dh-elpa
  • Use an emacs addon packaging team git repo:

      Vcs-Git: https://salsa.debian.org/emacsen-team/hello.git
      Vcs-Browser: https://salsa.debian.org/emacsen-team/hello
  • (Unless there are good reasons to use something else, like a pre-existing collab-maint repository. Collab-maint became the Debian team/namespace on Salsa.)
  • Declare the actual binary package:

      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.
  • The transition package only included if there the addon was previously packaged under a different name, in this case hello-el. You should build a binary package for each ELPA package included in the upstream source repo. See "debian/*.elpa" below.

debian/hello-el.maintscript

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

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

debian/rules

  • Standard boilerplate:

      #!/usr/bin/make -f

      %:
              dh $@ --with elpa

debian/*.elpa

  • You should include a .elpa file for each elpa-* binary package your source package builds.
  • For our hello.el example, you just need elpa-hello.elpa:

      *.el
  • For upstream source repos that contain more than one ELPA package,
    • first identify the root ELPA packages---generally the .el files that

      contains a Package-Requires line. Then list the *.el files associated with each one. For example, for magit, we would have

      git-commit.elpa:

      lisp/git-commit.el
  • with-editor.elpa:

      lisp/with-editor.el
  • git-rebase.elpa:

      lisp/git-rebase.el
  • magit.elpa:

      lisp/magit.el
      lisp/magit-*.el
  • To help in figuring this out you can look at the MELPA recipes for the packages where upstream should have broken down the files like this for you.

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:

  • override_dh_auto_build:
    • /bin/true

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