diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 21:06:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 21:06:40 +0000 |
commit | d827c6cf1631209f5042a9d1d8a7ecc24223c8a0 (patch) | |
tree | 91a431d301efd0e524bdfb0c46e97d591a9d7b03 /lib/Debian/Debhelper/Sequence/single_binary.pm | |
parent | Initial commit. (diff) | |
download | debhelper-upstream/13.11.4.tar.xz debhelper-upstream/13.11.4.zip |
Adding upstream version 13.11.4.upstream/13.11.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | lib/Debian/Debhelper/Sequence/single_binary.pm | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/lib/Debian/Debhelper/Sequence/single_binary.pm b/lib/Debian/Debhelper/Sequence/single_binary.pm new file mode 100644 index 0000000..68d8db1 --- /dev/null +++ b/lib/Debian/Debhelper/Sequence/single_binary.pm @@ -0,0 +1,34 @@ +use strict; +use warnings; + +use Debian::Debhelper::Dh_Lib qw(getpackages error warning tmpdir); +use Debian::Debhelper::SequencerUtil; + +my @packages = getpackages(); +my $pkg = $packages[0]; +my $tmp = tmpdir($pkg); +if (@packages != 1) { + warning('Detected multiple binary packages (Package paragraphs) in debian/control, which is incompatible'); + warning('with the single-binary dh add-on.'); + warning(); + warning('Please:'); + warning(' 1) Remove the single-binary add-on ("dh-sequence-single-binary" in Build-Depends)'); + warning(' 2) Update the packaging to cope with dh_auto_install using \"debian/tmp\" as default dest dir'); + warning(" (Previously, it would probably have used \"${tmp}\")"); + warning(' 3) Add Breaks/Replaces if you are moving existing files into a new package.'); + warning(' 4) Double check that the resulting binaries have content.'); + warning(); + warning("IF YOU ARE ADDING A TRANSITIONAL PACKAGE: Then you probably want to pass --destdir=${tmp} to"); + warning(' dh_auto_install. Most likely you will need Breaks + Replaces as renaming a package counts as'); + warning(' moving files between two packages.'); + warning(); + warning('IF YOU ARE "SPLITTING" THE CONTENT INTO MULTIPLE PACKAGES: Then remember to install the content'); + warning(" into them (by creating debian/${pkg}.install, etc.). Also remember to add Breaks + Replaces if"); + warning(' you are moving files from one package into another.'); + warning(); + error("The single-binary add-on cannot be used for source packages that build multiple binary packages."); +} + +add_command_options('dh_auto_install', "--destdir=${tmp}/"); + +1; |