diff options
author | David Bremner <david@tethera.net> | 2015-07-17 07:26:20 +0200 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2015-07-17 07:26:20 +0200 |
commit | cba6b313f0b1c4d324692f6fe74c37c190091642 (patch) | |
tree | 0efbd8b09a28c974cffd290d23482d3a262f1c81 | |
parent | b921f829b88d325e5d9df09295eb30e45d153d18 (diff) |
add no-byte-compile option
In particular --no-byte-compile allows building dh-elpa without
worrying about where to find the maintainer script helpers.
-rwxr-xr-x | debian/rules | 2 | ||||
-rwxr-xr-x | dh_elpa | 28 |
2 files changed, 27 insertions, 3 deletions
diff --git a/debian/rules b/debian/rules index b553078..49e5292 100755 --- a/debian/rules +++ b/debian/rules @@ -11,7 +11,7 @@ override_dh_auto_build: override_dh_install: dh_install dh_installman dh_elpa.1 - ./dh_elpa + ./dh_elpa --no-byte-compile override_dh_auto_install: install -m 755 -D dh_elpa $(DESTDIR)/usr/bin/dh_elpa @@ -34,7 +34,23 @@ List of files to be installed into I<package> 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}}) { |