# File lib/fpm/package/deb.rb, line 579
  def converted_from(origin)
    self.dependencies = self.dependencies.collect do |dep|
      fix_dependency(dep)
    end.flatten
    self.provides = self.provides.collect do |provides|
      fix_provides(provides)
    end.flatten

    if origin == FPM::Package::Deb
      changelog_path = staging_path("usr/share/doc/#{name}/changelog.Debian.gz")
      if File.exists?(changelog_path)
        logger.debug("Found a deb changelog file, using it.", :path => changelog_path)
        attributes[:deb_changelog] = build_path("deb_changelog")
        File.open(attributes[:deb_changelog], "w") do |deb_changelog|
          Zlib::GzipReader.open(changelog_path) do |gz|
            IO::copy_stream(gz, deb_changelog)
          end
        end
        File.unlink(changelog_path)
      end
    end

    if origin == FPM::Package::Deb
      changelog_path = staging_path("usr/share/doc/#{name}/changelog.gz")
      if File.exists?(changelog_path)
        logger.debug("Found an upstream changelog file, using it.", :path => changelog_path)
        attributes[:deb_upstream_changelog] = build_path("deb_upstream_changelog")
        File.open(attributes[:deb_upstream_changelog], "w") do |deb_upstream_changelog|
          Zlib::GzipReader.open(changelog_path) do |gz|
            IO::copy_stream(gz, deb_upstream_changelog)
          end
        end
        File.unlink(changelog_path)
      end
    end
  end