docs: public BinaryPackageControlFile createSignedDeb(Compression compression, final PGPSignatureGenerator signatureGenerator, PGPSigner signer ) throws PackagingException {
          File tempData = null;
          File tempControl = null;
  
          try {
              tempData = File.createTempFile("deb", "data");
              tempControl = File.createTempFile("deb", "control");
  
              console.debug("Building data");
              DataBuilder dataBuilder = new DataBuilder(console);
              StringBuilder md5s = new StringBuilder();
              TarOptions options = new TarOptions()
                  .compression(compression)
                  .longFileMode(tarLongFileMode)
                  .bigNumberMode(tarBigNumberMode);
              BigInteger size = dataBuilder.buildData(dataProducers, tempData, md5s, options);
  
              console.info("Building conffiles");
              List<String> tempConffiles = populateConffiles(conffilesProducers);
  
              console.debug("Building control");
              ControlBuilder controlBuilder = new ControlBuilder(console, variableResolver, openReplaceToken, closeReplaceToken);
              BinaryPackageControlFile packageControlFile = controlBuilder.createPackageControlFile(new File(control, "control"), size);
              if (packageControlFile.get("Package") == null) {
                  packageControlFile.set("Package", packageName);
              }
              if (packageControlFile.get("Section") == null) {
                  packageControlFile.set("Section", section);
              }
              if (packageControlFile.get("Description") == null) {
                  packageControlFile.set("Description", description);
              }
              if (packageControlFile.get("Homepage") == null) {
                  packageControlFile.set("Homepage", homepage);
              }
  
              controlBuilder.buildControl(packageControlFile, control.listFiles(), tempConffiles , md5s, tempControl);
  
              if (!packageControlFile.isValid()) {
                  throw new PackagingException("Control file fields are invalid " + packageControlFile.invalidFields() +
                          ". The following fields are mandatory: " + packageControlFile.getMandatoryFields() +
                          ". Please check your pom.xml/build.xml and your control file.");
              }
  
              deb.getParentFile().mkdirs();
  
              ArArchiveOutputStream ar = new ArArchiveOutputStream(new FileOutputStream(deb));
  
              String binaryName = "debian-binary";
              String binaryContent = "2.0\n";
              String controlName = "control.tar.gz";
              String dataName = "data.tar" + compression.getExtension();
  
              addTo(ar, binaryName, binaryContent);
              addTo(ar, controlName, tempControl);
              addTo(ar, dataName, tempData);
  
              if (signatureGenerator != null) {
                  console.info("Signing package with key " + key);
  
                  if(signRole == null) {
                      signRole = "origin";
                  }
  
                  // Use debsig-verify as default
                  if(signMethod == null || !"dpkg-sig".equals(signMethod)) {
                      // Sign file to verify with debsig-verify
                      PGPSignatureOutputStream sigStream = new PGPSignatureOutputStream(signatureGenerator);
  
                      addTo(sigStream, binaryContent);
                      addTo(sigStream, tempControl);
                      addTo(sigStream, tempData);
                      addTo(ar, "_gpg" + signRole, sigStream.generateASCIISignature());
  
                  } else {
  
                      // Sign file to verify with dpkg-sig --verify
                      final String outputStr =
                              "Version: 4\n" +
                                      "Signer: \n" +
                                      "Date: " + new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy", Locale.ENGLISH).format(new Date()) + "\n" +
                                      "Role: " + signRole +"\n" +
                                      "Files: \n" +
                                      addFile(binaryName, binaryContent) +
                                      addFile(controlName, tempControl) +
                                      addFile(dataName, tempData);
  
                      ByteArrayOutputStream message = new ByteArrayOutputStream();
                      signer.clearSign(outputStr, message);
  
                      addTo(ar, "_gpg" + signRole, message.toString());
                  }
              }
  
              ar.close();
  
              return packageControlFile;
  
          } catch (Exception e) {
              throw new PackagingException("Could not create deb package", e);
          } finally {
              if (tempData != null) {
                  if (!tempData.delete()) {
                      console.warn("Could not delete the temporary file " + tempData);
                  }
              }
              if (tempControl != null) {
                  if (!tempControl.delete()) {
                      console.warn("Could not delete the temporary file " + tempControl);
                  }
              }
          }
      }