From 93c90551df21fc7df60ade835e29bdbe91f65744 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 17 Jun 2018 15:18:55 +0100 Subject: git-debrebase: Split into its own package * Provide and use Debian::Dgit::GDR which does the same for @INC as Debian::Dgit:Infra, only for GDR. It's not *entirely* similar as its doc comment talks about ExitStatus too. * In Makefile, split off lots of GDR_* variables and the two targets install-gdr and installdirs-gdr We take no care that only the required manpages are built for each install target; instead, they all go in MANPAGES and `all'. * Add a control file stanza. git-debrebase takes over the dependenc on libfile-fnmatch-perl. We Recommend dgit and gbp. (Even though if you're working with neither the Debian archive nor `3.0 (quilt)', you need neither.) * In rules, add specpkg_install_gdr, to run the Makefile machinery. * In the test dependencies, GDR now means to ask for git-debrebase and also git-buildpackage (for make-patches). libfile-fnmatch-perl is handled via the dependencies of git-debrebase.deb. * Add a .gitignore for the staging area in debian/ Signed-off-by: Ian Jackson --- Debian/Dgit/GDR.pm | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 Debian/Dgit/GDR.pm (limited to 'Debian/Dgit/GDR.pm') diff --git a/Debian/Dgit/GDR.pm b/Debian/Dgit/GDR.pm new file mode 100644 index 0000000..ca7e621 --- /dev/null +++ b/Debian/Dgit/GDR.pm @@ -0,0 +1,26 @@ +# -*- perl -*- + +package Debian::Dgit::GDR; + +use strict; +use warnings; + +# Scripts and programs which are going to `use Debian::Dgit' but which +# live in git-debrebase (ie are installed with install-gdr) +# should `use Debian::Dgit::GDR' first. All this module does is +# adjust @INC so that the script gets the version of the script from +# the git-debrebase package (which is installed in a different +# location and may be a different version). + +# To use this with ExitStatus, put at the top (before use strict, even): +# +# END { $? = $Debian::Dgit::ExitStatus::desired // -1; }; +# use Debian::Dgit::GDR; +# use Debian::Dgit::ExitStatus; +# +# and then replace every call to `exit' with `finish'. +# Add a `finish 0' to the end of the program. + +# unshift @INC, q{/usr/share/dgit/gdr/perl5}; ###substituted### + +1; -- cgit v1.2.3