From cba6b313f0b1c4d324692f6fe74c37c190091642 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Fri, 17 Jul 2015 07:26:20 +0200 Subject: add no-byte-compile option In particular --no-byte-compile allows building dh-elpa without worrying about where to find the maintainer script helpers. --- dh_elpa | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) (limited to 'dh_elpa') diff --git a/dh_elpa b/dh_elpa index 93abd54..e742d86 100755 --- a/dh_elpa +++ b/dh_elpa @@ -34,7 +34,23 @@ List of files to be installed into I as an elpa package. =cut -init(); +init(options => { + "byte-compile!" => \$dh{BYTECOMPILE}, +}); + +=head1 OPTIONS + +=over 4 + +=item B<--byte-compile>, B<--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. + +=back + +=cut sub doit_quietly { my ($handle,$tmpfile) = tempfile(UNLINK=>1); @@ -59,7 +75,15 @@ sub doit_quietly { } -my $elpadir="/usr/share/emacs/site-lisp/elpa-src"; +$dh{BYTECOMPILE} = 1 unless defined($dh{BYTECOMPILE}); + +my $elpadir; + +if ($dh{BYTECOMPILE}) { + $elpadir="/usr/share/emacs/site-lisp/elpa-src"; +} else { + $elpadir="/usr/share/emacs/site-lisp/elpa"; +} foreach my $package (@{$dh{DOPACKAGES}}) { -- cgit v1.2.3