     ; Jar
     (.mkdirs (file dir "usr" "lib" "riemann"))
     (copy (file (:root project) "target" 
-                (str "riemann-" (:version project) "-standalone.jar"))
+                (str "riemann-" (get-version project) "-standalone.jar"))
           (file dir "usr" "lib" "riemann" "riemann.jar"))
 
     ; Binary

  (cleanup project)
  (sh "rm" (str (:root project) "/target/*.deb")))

(defn control
  "Control file"
  [project]
  (join "\n"
        (map (fn [[k v]] (str (capitalize (name k)) ": " v))
             {:package (:name project)
              :version (:version project)
              :section "base"
              :priority "optional"
              :architecture "all"

(ns leiningen.fatdeb
  (:use [clojure.java.shell :only [sh]]
        [clojure.java.io :only [file delete-file writer copy]]
        [clojure.string :only [join capitalize trim-newline replace]]
        [leiningen.uberjar :only [uberjar]])
  (:import java.text.SimpleDateFormat
           java.util.Date))

(defn delete-file-recursively
    "Delete file f. If it's a directory, recursively delete all its contents.
