code: public BinaryPackageControlFile createPackageControlFile(File file, BigInteger pDataSize) throws IOException, ParseException {
          FilteredFile controlFile = new FilteredFile(new FileInputStream(file), resolver);
          BinaryPackageControlFile packageControlFile = new BinaryPackageControlFile(controlFile.toString());
  
          if (packageControlFile.get("Distribution") == null) {
              packageControlFile.set("Distribution", "unknown");
          }
  
          if (packageControlFile.get("Urgency") == null) {
              packageControlFile.set("Urgency", "low");
          }
  
          packageControlFile.set("Installed-Size", pDataSize.divide(BigInteger.valueOf(1024)).toString());
  
          // override the Version if the DEBVERSION environment variable is defined
          final String debVersion = System.getenv("DEBVERSION");
          if (debVersion != null) {
              packageControlFile.set("Version", debVersion);
              console.debug("Using version'" + debVersion + "' from the environment variables.");
          }
  
  
          // override the Maintainer field if the DEBFULLNAME and DEBEMAIL environment variables are defined
          final String debFullName = System.getenv("DEBFULLNAME");
          final String debEmail = System.getenv("DEBEMAIL");
  
          if (debFullName != null && debEmail != null) {
              final String maintainer = debFullName + " <" + debEmail + ">";
              packageControlFile.set("Maintainer", maintainer);
              console.debug("Using maintainer '" + maintainer + "' from the environment variables.");
          }
  
          return packageControlFile;
      }
docs: Creates a package control file from the specified file and adds the
  <tt>Date</tt>, <tt>Distribution</tt> and <tt>Urgency</tt> fields if missing.
  The <tt>Installed-Size</tt> field is also initialized to the actual size of
  the package. The <tt>Maintainer</tt> field is overridden by the <tt>DEBEMAIL</tt>
  and <tt>DEBFULLNAME</tt> environment variables if defined.
  
  @param file       the control file
  @param pDataSize  the size of the installed package