summaryrefslogtreecommitdiff
path: root/dh_elpa
diff options
context:
space:
mode:
Diffstat (limited to 'dh_elpa')
-rwxr-xr-xdh_elpa31
1 files changed, 31 insertions, 0 deletions
diff --git a/dh_elpa b/dh_elpa
index e742d86..617c6f5 100755
--- a/dh_elpa
+++ b/dh_elpa
@@ -75,6 +75,25 @@ sub doit_quietly {
}
+my $templatedir = "/usr/share/debhelper/dh_elpa/emacsen-common";
+
+sub maybe_install_helper{
+ my ($package,$piece)=@_;
+ my $file=pkgfile($package,"emacsen-$piece");
+
+ my $tmp=tmpdir($package);
+ my $ecdest="$tmp/usr/lib/emacsen-common/packages";
+
+ # if there is file, leave it for dh_installemacsen
+ if ($file eq '') {
+ if (! -d "$ecdest/$piece") {
+ doit("install","-d","$ecdest/$piece");
+ }
+ doit("install","-m0755","$templatedir/$piece",
+ "$ecdest/$piece/$package");
+ }
+}
+
$dh{BYTECOMPILE} = 1 unless defined($dh{BYTECOMPILE});
my $elpadir;
@@ -90,6 +109,18 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
my $tmp=tmpdir($package);
my $file=pkgfile($package,"elpa");
+ if ($dh{BYTECOMPILE}) {
+ foreach my $piece (qw{compat install remove}) {
+ maybe_install_helper($package,$piece);
+ }
+ if (! $dh{NOSCRIPTS}) {
+ autoscript($package,"postinst","postinst-emacsen",
+ "s/#PACKAGE#/$package/");
+ autoscript($package,"prerm","prerm-emacsen",
+ "s/#PACKAGE#/$package/");
+ }
+ }
+
my $elpapkg=$package;
# TODO do this more sanely or at least allow an override
$elpapkg =~ s/^elpa-//;