git: update to 2.6.3
[feed/packages.git] / net / git / Makefile
index 03bd8e7d10c62cefc9f2e3b18086e4e44eb10b5c..da3509d7c5adfeaf3096eb8cf063f6e7319e2cd1 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2009-2014 OpenWrt.org
+# Copyright (C) 2009-2015 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,19 +8,20 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=git
-PKG_VERSION:=2.2.1
+PKG_VERSION:=2.6.3
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/software/scm/git/
-PKG_MD5SUM:=43e01f9d96ba8c11611e0eef0d9f9f28
+PKG_MD5SUM:=5a6375349c3f13c8dbbabfc327bae429
 
 PKG_INSTALL:=1
 PKG_BUILD_PARALLEL:=1
+PKG_FIXUP:=autoreconf
 
 include $(INCLUDE_DIR)/package.mk
 
-define Package/git
+define Package/git/Default
   SECTION:=net
   CATEGORY:=Network
   SUBMENU:=Version Control Systems
@@ -30,42 +31,85 @@ define Package/git
   MAINTAINER:=Peter Wagner <tripolar@gmx.at>
 endef
 
+define Package/git
+$(call Package/git/Default)
+  DEPENDS:=+libopenssl +libpthread +librt
+  TITLE:=The fast version control system
+endef
+
 define Package/git/description
  Git is a free & open source, distributed version control system
  designed to handle everything from small to very large projects
  with speed and efficiency.
 endef
 
+define Package/git-http
+$(call Package/git/Default)
+  DEPENDS:=git +libcurl +ca-certificates
+  TITLE:=Git HTTP commands
+endef
+
+define Package/git-http/description
+$(call Package/git/description)
+
+ This package allows git push/fetch over http(s) and ftp(s)
+endef
+
 MAKE_FLAGS := \
        CC="$(TARGET_CC)" \
        CFLAGS="$(TARGET_CFLAGS)" \
        CPPFLAGS="$(TARGET_CPPFLAGS)" \
        LDFLAGS="$(TARGET_LDFLAGS)" \
-       NO_CURL="YesPlease" \
        NO_EXPAT="YesPlease" \
        NO_MKSTEMPS="YesPlease" \
        NO_GETTEXT="YesPlease" \
        NO_UNIX_SOCKETS="YesPlease" \
-       NO_IPV6="YesPlease" \
        NO_ICONV="YesPlease" \
        NO_NSEC="YesPlease" \
        NO_PERL="YesPlease" \
        NO_PYTHON="YesPlease" \
-       NO_TCLTK="YesPlease"
+       NO_TCLTK="YesPlease" \
+       NO_INSTALL_HARDLINKS="yes" \
+
+CONFIGURE_ARGS += \
+       --without-iconv \
 
 define Build/Configure
        $(MAKE) -C $(PKG_BUILD_DIR) \
                configure
 
-       ( cd $(PKG_BUILD_DIR); \
-               ./configure --prefix=/usr \
-       );
+       $(call Build/Configure/Default,)
 endef
 
 define Package/git/install
-       $(INSTALL_DIR) $(1)
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/git $(1)/usr/bin
        $(RM) $(PKG_INSTALL_DIR)/usr/bin/git-cvsserver
-       $(CP) $(PKG_INSTALL_DIR)/* $(1)/
+       $(CP) $(PKG_INSTALL_DIR)/usr/bin/git-* $(1)/usr/bin
+       $(INSTALL_DIR) $(1)/usr/lib/git-core
+       $(LN) /usr/bin/git $(1)/usr/lib/git-core/git
+       ( cd $(PKG_INSTALL_DIR); $(TAR) \
+               --exclude=usr/lib/git-core/git-http-backend \
+               --exclude=usr/lib/git-core/git-http-fetch \
+               --exclude=usr/lib/git-core/git-remote-ftp \
+               --exclude=usr/lib/git-core/git-remote-ftps \
+               --exclude=usr/lib/git-core/git-remote-http \
+               --exclude=usr/lib/git-core/git-remote-https \
+               -cf - \
+               usr/lib/git-core \
+       ) | ( cd $(1); $(TAR) -xf - )
+       $(INSTALL_DIR) $(1)/usr/share/git-core/templates
+endef
+
+define Package/git-http/install
+       $(INSTALL_DIR) $(1)/usr/lib/git-core
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-http-backend $(1)/usr/lib/git-core
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-http-fetch $(1)/usr/lib/git-core
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-ftp $(1)/usr/lib/git-core
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-ftps $(1)/usr/lib/git-core
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-http $(1)/usr/lib/git-core
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-https $(1)/usr/lib/git-core
 endef
 
 $(eval $(call BuildPackage,git))
+$(eval $(call BuildPackage,git-http))