summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdebian/rules2
-rwxr-xr-xdh_elpa28
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
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<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}}) {