You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
3.1 KiB

  1. #
  2. # Copyright (C) 2009-2015 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=git
  9. PKG_VERSION:=2.4.6
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@KERNEL/software/scm/git/
  13. PKG_MD5SUM:=fb2c5214f5dc90bad0a2abdd4c425df6
  14. PKG_INSTALL:=1
  15. PKG_BUILD_PARALLEL:=1
  16. PKG_FIXUP:=autoreconf
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/git/Default
  19. SECTION:=net
  20. CATEGORY:=Network
  21. SUBMENU:=Version Control Systems
  22. DEPENDS:=+libopenssl +libpthread +librt
  23. TITLE:=The fast version control system
  24. URL:=http://git-scm.com
  25. MAINTAINER:=Peter Wagner <tripolar@gmx.at>
  26. endef
  27. define Package/git
  28. $(call Package/git/Default)
  29. DEPENDS:=+libopenssl +libpthread +librt
  30. TITLE:=The fast version control system
  31. endef
  32. define Package/git/description
  33. Git is a free & open source, distributed version control system
  34. designed to handle everything from small to very large projects
  35. with speed and efficiency.
  36. endef
  37. define Package/git-http
  38. $(call Package/git/Default)
  39. DEPENDS:=git +libcurl +ca-certificates
  40. TITLE:=Git HTTP commands
  41. endef
  42. define Package/git-http/description
  43. $(call Package/git/description)
  44. This package allows git push/fetch over http(s) and ftp(s)
  45. endef
  46. MAKE_FLAGS := \
  47. CC="$(TARGET_CC)" \
  48. CFLAGS="$(TARGET_CFLAGS)" \
  49. CPPFLAGS="$(TARGET_CPPFLAGS)" \
  50. LDFLAGS="$(TARGET_LDFLAGS)" \
  51. NO_EXPAT="YesPlease" \
  52. NO_MKSTEMPS="YesPlease" \
  53. NO_GETTEXT="YesPlease" \
  54. NO_UNIX_SOCKETS="YesPlease" \
  55. NO_ICONV="YesPlease" \
  56. NO_NSEC="YesPlease" \
  57. NO_PERL="YesPlease" \
  58. NO_PYTHON="YesPlease" \
  59. NO_TCLTK="YesPlease" \
  60. NO_INSTALL_HARDLINKS="yes" \
  61. CONFIGURE_ARGS += \
  62. --without-iconv \
  63. define Build/Configure
  64. $(MAKE) -C $(PKG_BUILD_DIR) \
  65. configure
  66. $(call Build/Configure/Default,)
  67. endef
  68. define Package/git/install
  69. $(INSTALL_DIR) $(1)/usr/bin
  70. $(CP) $(PKG_INSTALL_DIR)/usr/bin/git $(1)/usr/bin
  71. $(RM) $(PKG_INSTALL_DIR)/usr/bin/git-cvsserver
  72. $(CP) $(PKG_INSTALL_DIR)/usr/bin/git-* $(1)/usr/bin
  73. $(INSTALL_DIR) $(1)/usr/lib/git-core
  74. $(LN) /usr/bin/git $(1)/usr/lib/git-core/git
  75. ( cd $(PKG_INSTALL_DIR); $(TAR) \
  76. --exclude=usr/lib/git-core/git-http-backend \
  77. --exclude=usr/lib/git-core/git-http-fetch \
  78. --exclude=usr/lib/git-core/git-remote-ftp \
  79. --exclude=usr/lib/git-core/git-remote-ftps \
  80. --exclude=usr/lib/git-core/git-remote-http \
  81. --exclude=usr/lib/git-core/git-remote-https \
  82. -cf - \
  83. usr/lib/git-core \
  84. ) | ( cd $(1); $(TAR) -xf - )
  85. endef
  86. define Package/git-http/install
  87. $(INSTALL_DIR) $(1)/usr/lib/git-core
  88. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-http-backend $(1)/usr/lib/git-core
  89. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-http-fetch $(1)/usr/lib/git-core
  90. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-ftp $(1)/usr/lib/git-core
  91. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-ftps $(1)/usr/lib/git-core
  92. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-http $(1)/usr/lib/git-core
  93. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-https $(1)/usr/lib/git-core
  94. endef
  95. $(eval $(call BuildPackage,git))
  96. $(eval $(call BuildPackage,git-http))