From e16d9d66b228b36d148caa57870a2a8068894b5f Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 17 Dec 2015 11:18:59 -0700 Subject: put ELPA deps into substvar --- dh_elpa.in | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'dh_elpa.in') diff --git a/dh_elpa.in b/dh_elpa.in index cd02027..79d7b67 100755 --- a/dh_elpa.in +++ b/dh_elpa.in @@ -234,10 +234,16 @@ foreach my $package (@{$dh{DOPACKAGES}}) { } - if ($dh{BYTECOMPILE}) { - my $desc = read_package_desc ($tempdir,$elpapkg); + my $desc = read_package_desc ($tempdir,$elpapkg); + my $deps = $desc->{'ELPA-Requires'}; + + # TODO: addsubstvar fails to add a variable if its blank. So if the + # package has no ELPA dependencies, we should tell the user not to + # use this substvar in debian/control + addsubstvar($package, 'elpa:Depends', $deps); - addsubstvar($package,'misc:Depends','emacsen-common'); + if ($dh{BYTECOMPILE}) { + addsubstvar($package, 'misc:Depends', 'emacsen-common'); maybe_install_helper($package, 'compat', '0644', $desc); maybe_install_helper($package, 'install', '0755', $desc); maybe_install_helper($package, 'remove', '0755', $desc); @@ -254,7 +260,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) { =head1 SUBSTVARS -dh_elpa currently defines two substvars (cf. deb-substvars(5)) that +dh_elpa currently defines three substvars (cf. deb-substvars(5)) that can be used in debian/control =over 4 @@ -267,6 +273,12 @@ 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. +=item ${elpa:Depends} + +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. + =back =head1 EXAMPLES -- cgit v1.2.3