summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2015-07-13 11:03:16 +0200
committerDavid Bremner <david@tethera.net>2015-07-13 12:07:17 +0200
commitc122e61b4dbcf4f95eb43d003a776f90d1df5bc9 (patch)
tree94dcf2818170d7c8dcabe327bc330729c3733d5f
parentfcc1b4681fa04b38410c3e91d688135ece22cf78 (diff)
add minimal POD to dh_elpa, and install it as a man page
-rw-r--r--README.org10
-rwxr-xr-xdebian/rules9
-rwxr-xr-xdh_elpa42
3 files changed, 50 insertions, 11 deletions
diff --git a/README.org b/README.org
index 4d6c475..894de19 100644
--- a/README.org
+++ b/README.org
@@ -16,13 +16,3 @@ support byte compilation.
package.el gets confused if you have both a system and a user elpa
package and refuses to delete the user one unless you delete the
system one first.
-
-* Usage
-
-Here is an example of using the helper command (extracted from
-a previous debian/rules in this package).
-
-#+BEGIN_EXAMPLE
-override_dh_auto_install:
- ./dh_elpa dh-elpa.el
-#+END_EXAMPLE
diff --git a/debian/rules b/debian/rules
index d0aed4d..b553078 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,6 +5,13 @@ DESTDIR=$(CURDIR)/debian/tmp
%:
dh $@
-override_dh_auto_install:
+override_dh_auto_build:
+ pod2man -c Debhelper --section=1 dh_elpa > dh_elpa.1
+
+override_dh_install:
+ dh_install
+ dh_installman dh_elpa.1
./dh_elpa
+
+override_dh_auto_install:
install -m 755 -D dh_elpa $(DESTDIR)/usr/bin/dh_elpa
diff --git a/dh_elpa b/dh_elpa
index 83db575..fb6214b 100755
--- a/dh_elpa
+++ b/dh_elpa
@@ -1,5 +1,11 @@
#!/usr/bin/perl
+=head1 NAME
+
+dh_elpa - install emacs lisp packages into package build directories
+
+=cut
+
use strict;
use Cwd qw{ getcwd };
use File::Temp qw{ tempdir tempfile};
@@ -7,6 +13,27 @@ use IO::Handle;
use Debian::Debhelper::Dh_Lib;
+=head1 SYNOPSIS
+
+B<dh_elpa> [S<I<debhelper options>>] [S<I<pkg-file>>]
+
+=head1 DESCRIPTION
+
+B<dh_elpa> is a debhelper program that is responsible for installing
+elpa style emacs lisp packages into package build directories.
+
+=head1 FILES
+
+=over 4
+
+=item debian/I<package>.elpa
+
+List of files to be installed into I<package> as an elpa package.
+
+=back
+
+=cut
+
init();
sub doit_quietly {
@@ -87,3 +114,18 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
qw{-f package-initialize -l dh-elpa.el},
qw{-f dhelpa-batch-install-file}, "$tmp/$elpadir", $pkg_file);
}
+
+=head1 EXAMPLES
+
+Here is an example of using the helper in a dh(1) style debian/rules
+
+=over 4
+
+override_dh_install:
+ dh_install
+ dh_elpa
+
+=back
+
+=cut
+