private void makeChangesFiles(final BinaryPackageControlFile packageControlFile) throws PackagingException {
if (changesOut == null) {
changesOut = new File(deb.getParentFile(), deb.getName().replace(".deb", ".changes"));
}
ChangesProvider changesProvider;
FileOutputStream out = null;
try {
console.info("Creating changes file: " + changesOut);
out = new FileOutputStream(changesOut);
if (changesIn != null && changesIn.exists()) {
// read the changes form a textfile provider
changesProvider = new TextfileChangesProvider(new FileInputStream(changesIn), packageControlFile);
} else {
// create an empty changelog
changesProvider = new ChangesProvider() {
@Override
public ChangeSet[] getChangesSets() {
return new ChangeSet[] {
new ChangeSet(packageControlFile.get("Package"),
packageControlFile.get("Version"),