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.

113 lines
3.1 KiB

  1. #
  2. # Copyright (C) 2009-2016 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.10.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@KERNEL/software/scm/git/
  13. PKG_MD5SUM:=a9e1bf842497fc3a23e86424018b3499
  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 +zlib
  23. URL:=http://git-scm.com
  24. MAINTAINER:=Peter Wagner <tripolar@gmx.at>
  25. endef
  26. define Package/git
  27. $(call Package/git/Default)
  28. TITLE:=The fast version control system
  29. endef
  30. define Package/git/description
  31. Git is a free & open source, distributed version control system
  32. designed to handle everything from small to very large projects
  33. with speed and efficiency.
  34. endef
  35. define Package/git-http
  36. $(call Package/git/Default)
  37. DEPENDS+=git +libcurl +ca-certificates
  38. TITLE:=Git HTTP commands
  39. endef
  40. define Package/git-http/description
  41. $(call Package/git/description)
  42. This package allows git push/fetch over http(s) and ftp(s)
  43. endef
  44. MAKE_FLAGS := \
  45. CC="$(TARGET_CC)" \
  46. CFLAGS="$(TARGET_CFLAGS)" \
  47. CPPFLAGS="$(TARGET_CPPFLAGS)" \
  48. LDFLAGS="$(TARGET_LDFLAGS)" \
  49. NO_EXPAT="YesPlease" \
  50. NO_MKSTEMPS="YesPlease" \
  51. NO_GETTEXT="YesPlease" \
  52. NO_UNIX_SOCKETS="YesPlease" \
  53. NO_ICONV="YesPlease" \
  54. NO_NSEC="YesPlease" \
  55. NO_PERL="YesPlease" \
  56. NO_PYTHON="YesPlease" \
  57. NO_TCLTK="YesPlease" \
  58. NO_INSTALL_HARDLINKS="yes" \
  59. CONFIGURE_ARGS += \
  60. --without-iconv \
  61. define Build/Configure
  62. $(MAKE) -C $(PKG_BUILD_DIR) \
  63. configure
  64. $(call Build/Configure/Default,)
  65. endef
  66. define Package/git/install
  67. $(INSTALL_DIR) $(1)/usr/bin
  68. $(CP) $(PKG_INSTALL_DIR)/usr/bin/git $(1)/usr/bin
  69. $(RM) $(PKG_INSTALL_DIR)/usr/bin/git-cvsserver
  70. $(CP) $(PKG_INSTALL_DIR)/usr/bin/git-* $(1)/usr/bin
  71. $(INSTALL_DIR) $(1)/usr/lib/git-core
  72. $(LN) /usr/bin/git $(1)/usr/lib/git-core/git
  73. ( cd $(PKG_INSTALL_DIR); $(TAR) \
  74. --exclude=usr/lib/git-core/git-http-backend \
  75. --exclude=usr/lib/git-core/git-http-fetch \
  76. --exclude=usr/lib/git-core/git-remote-ftp \
  77. --exclude=usr/lib/git-core/git-remote-ftps \
  78. --exclude=usr/lib/git-core/git-remote-http \
  79. --exclude=usr/lib/git-core/git-remote-https \
  80. -cf - \
  81. usr/lib/git-core \
  82. ) | ( cd $(1); $(TAR) -xf - )
  83. $(INSTALL_DIR) $(1)/usr/share/git-core/templates
  84. endef
  85. define Package/git-http/install
  86. $(INSTALL_DIR) $(1)/usr/lib/git-core
  87. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-http-backend $(1)/usr/lib/git-core
  88. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-http-fetch $(1)/usr/lib/git-core
  89. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-ftp $(1)/usr/lib/git-core
  90. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-ftps $(1)/usr/lib/git-core
  91. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-http $(1)/usr/lib/git-core
  92. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-https $(1)/usr/lib/git-core
  93. endef
  94. $(eval $(call BuildPackage,git))
  95. $(eval $(call BuildPackage,git-http))