Add package config for git

Change-Id: If3180af3568237b5650415000694c57b5c91b3c3
diff --git a/BUILD.gn b/BUILD.gn
index 77ab2e3..55df11c 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -26,6 +26,48 @@
 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+import("//packages/package.gni")
+
+package("git") {
+  deps = [
+    ":all",
+  ]
+
+  binaries = [
+    {
+      name = "git"
+    },
+
+    {
+      name = "git-daemon"
+    },
+
+    {
+      name = "git-http-backend"
+    },
+
+    {
+      name = "git-http-fetch"
+    },
+
+    {
+      name = "git-http-push"
+    },
+
+    {
+      name = "git-remote-http"
+    },
+
+    {
+      name = "git-remote-http"
+    },
+
+    {
+      name = "git-upload-pack"
+    },
+  ]
+}
+
 config("git_config") {
   cflags = [
     "-Wno-sign-compare",
@@ -202,7 +244,6 @@
     "help.c",
     "help.h",
     "hex.c",
-
     "ident.c",
 
     # "imap-send.c",
@@ -558,19 +599,21 @@
 template("gitprogram") {
   executable("git-" + target_name) {
     sources = [
-      invoker.target_name + ".c"
+      invoker.target_name + ".c",
     ]
     if (defined(invoker.sources)) {
       sources += invoker.sources
     }
     deps = [
-      ":git_srcs"
+      ":git_srcs",
     ]
   }
 }
 
-gitprogram("daemon") {}
-gitprogram("http-backend") {}
+gitprogram("daemon") {
+}
+gitprogram("http-backend") {
+}
 gitprogram("http-fetch") {
   sources = [
     "http-walker.c",
@@ -584,21 +627,22 @@
     "http.h",
   ]
 }
-gitprogram("upload-pack") {}
+gitprogram("upload-pack") {
+}
 
 executable("git-remote-http") {
   sources = [
-    "remote-curl.c",
-    "http.c",
     "http-walker.c",
+    "http.c",
+    "remote-curl.c",
   ]
   deps = [
     ":git_srcs",
   ]
 }
 
-group("git") {
-  deps = [
+group("all") {
+  public_deps = [
     ":git-bin",
     ":git-daemon",
     ":git-http-backend",
@@ -608,5 +652,3 @@
     ":git-upload-pack",
   ]
 }
-
-