From c122e61b4dbcf4f95eb43d003a776f90d1df5bc9 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Mon, 13 Jul 2015 11:03:16 +0200 Subject: add minimal POD to dh_elpa, and install it as a man page --- README.org | 10 ---------- debian/rules | 9 ++++++++- dh_elpa | 42 ++++++++++++++++++++++++++++++++++++++++++ 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 [S>] [S>] + +=head1 DESCRIPTION + +B 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.elpa + +List of files to be installed into I 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 + -- cgit v1.2.3