diff options
author | David Bremner <bremner@debian.org> | 2015-12-19 14:13:50 -0400 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2015-12-19 14:13:50 -0400 |
commit | fe532decdbcf0ba8e89c48834cd063880f00583e (patch) | |
tree | 64d287daeb62ee4ab766f6c7c3cc256dd66e4db4 /dh_elpa.in | |
parent | f0d844d13bf4890089237785da499e8e7707cbb4 (diff) |
add --fix-autoload-date option to dh_elpa
Diffstat (limited to 'dh_elpa.in')
-rwxr-xr-x | dh_elpa.in | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -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); } |