   (clean)
   (cp-template-files template-dir)
   (cp-shared-files)
-  (let [config-files (cp-shared-config-files lein-project)
+  (let [dependencies (deputils/get-dependencies-with-jars lein-project)
+        config-files (cp-shared-config-files dependencies)
         config-files (cp-project-config-files project config-files)
-        terminus-files (cp-terminus-files lein-project)]
+        terminus-files (cp-terminus-files dependencies)]
     (cp-doc-files lein-project)
     (cp-project-file project-file)
     (rename-redhat-spec-file lein-project)

             (fs/file staging-dir "ext" "debian" (format "%s.default.erb"
                                                         (:name lein-project)))))

(defn get-out-dir-for-shared-config-file
  [dep jar-entry]
  (let [rel-path (relativize shared-config-prefix (File. (.getName jar-entry)))]
    (if-let [parent (.getParent rel-path)]
      (fs/file staging-dir "ext" "config" "conf.d" parent)
      (fs/file staging-dir "ext" "config" "conf.d"))))

(defn cp-shared-config-files
  [lein-project]
  (mapv (partial relativize staging-dir)
        (deputils/cp-files-of-type lein-project "shared config"
                                   shared-config-prefix
                                   get-out-dir-for-shared-config-file)))

(defn cp-project-config-file
  [project-config-dir config-file]


(def template-dir-prefix "./template")
(def staging-dir "./target/staging")
(def shared-config-prefix "ext/config/conf.d/")
(def docs-prefix "ext/docs/")
(def terminus-prefix "puppet/indirector")

