summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog4
-rwxr-xr-xdh_elpa.in21
2 files changed, 22 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index cbad693..d4ee4a4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,10 @@
dh-elpa (0.0.18) UNRELEASED; urgency=medium
* Document "--with elpa"
+ * Add --fix-autoload-date option (on by default) to take autoload dates
+ from changelog
- -- David Bremner <bremner@debian.org> Sun, 29 Nov 2015 13:16:51 -0400
+ -- David Bremner <bremner@debian.org> Sat, 19 Dec 2015 14:11:42 -0400
dh-elpa (0.0.17) unstable; urgency=medium
diff --git a/dh_elpa.in b/dh_elpa.in
index d0938bc..1cc9377 100755
--- a/dh_elpa.in
+++ b/dh_elpa.in
@@ -37,6 +37,7 @@ List of files to be installed into I<package> as an elpa package.
init(options => {
"byte-compile!" => \$dh{BYTECOMPILE},
+ "fix-autoload-date!" => \$dh{FIXAUTOLOADDATE},
});
=head1 OPTIONS
@@ -51,6 +52,15 @@ to one that is found by the emacs package system.
=back
+=over 4
+
+=item B<--fix-autoload-date>, B<--no--fix-autoload-date>
+
+Enable (default) or disable munging the dates in Emacs generated
+autoload files to match debian/changelog.
+
+=back
+
=cut
sub doit_quietly {
@@ -136,6 +146,7 @@ sub maybe_install_helper{
}
$dh{BYTECOMPILE} = 1 unless defined($dh{BYTECOMPILE});
+$dh{FIXAUTOLOADDATE} = 1 unless defined($dh{FIXAUTOLOADDATE});
my $elpadir;
@@ -181,6 +192,12 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
my $tempdir = "${cwd}/debian/.debhelper/elpa";
my $helper_version = '@HELPER_VERSION@';
+ my @extra_args = ( $tempdir );
+
+ if ($dh{FIXAUTOLOADDATE}) {
+ push @extra_args, get_source_date_epoch();
+ }
+
File::Path::rmtree $tempdir ||
error "cleaning $tempdir";
@@ -196,7 +213,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
'--eval',"(add-to-list 'package-directory-list \"$dhelpadir\")",
'--eval',"(add-to-list 'package-directory-list \"$elpadir\")",
qw{-f package-initialize -l dh-elpa.el},
- qw{-f dhelpa-batch-install-file}, "$tmp/$elpadir", $pkg_file, $tempdir);
+ qw{-f dhelpa-batch-install-file}, "$tmp/$elpadir", $pkg_file, @extra_args);
} else {
my $stagedir = "$tempdir/$elpapkg";
File::Path::make_path $stagedir ||
@@ -213,7 +230,7 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
'--eval',"(add-to-list 'package-directory-list \"$elpadir\")",
qw{-f package-initialize -l dh-elpa.el},
qw{-f dhelpa-batch-install-directory},
- "$tmp/$elpadir", $stagedir, $tempdir);
+ "$tmp/$elpadir", $stagedir, @extra_args);
}