diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-09 12:53:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-09 12:53:53 +0000 |
commit | 90169463f86997737ed5b9c0ea2b311cd3b056b7 (patch) | |
tree | 281a0f8d9850ea58cf2a3ddb8bf087fb52520925 /lib/Debian/Debhelper/Sequence/single_binary.pm | |
parent | Initial commit. (diff) | |
download | debhelper-upstream/13.15.3.tar.xz debhelper-upstream/13.15.3.zip |
Adding upstream version 13.15.3.upstream/13.15.3
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/Debian/Debhelper/Sequence/single_binary.pm')
-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; |