This sets up the template directory.

def CopyFiles(self):
    """This sets up the template directory."""
    if self.fleetspeak_enabled:
      # Copy files needed for dpkg-buildpackage.
      shutil.copytree(
          config_lib.Resource().Filter(
              "install_data/debian/dpkg_client/fleetspeak-debian"),
          os.path.join(self.package_dir, "debian/debian.in"))
      return

    # Copy the nanny binary.
    shutil.copy(
        package.ResourcePath("grr-response-core",
                             "install_data/debian/dpkg_client/nanny.sh.in"),
        self.output_dir)

    # Copy files needed for dpkg-buildpackage.
    shutil.copytree(
        config_lib.Resource().Filter("install_data/debian/dpkg_client/debian"),
        os.path.join(self.package_dir, "debian/debian.in"))

    # Copy upstart files
    outdir = os.path.join(self.package_dir, "debian/upstart.in")
    utils.EnsureDirExists(outdir)
    shutil.copy(
        config_lib.Resource().Filter(
            "install_data/debian/dpkg_client/upstart/grr-client.conf"), outdir)

    # Copy init files
    outdir = os.path.join(self.package_dir, "debian/initd.in")
    utils.EnsureDirExists(outdir)
    shutil.copy(
        config_lib.Resource().Filter(
            "install_data/debian/dpkg_client/initd/grr-client"), outdir)

    # Copy systemd unit file
    outdir = os.path.join(self.package_dir, "debian/systemd.in")
    utils.EnsureDirExists(outdir)
    shutil.copy(
        config_lib.Resource().Filter(
            "install_data/systemd/client/grr-client.service"), outdir)