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.

161 lines
4.4 KiB

  1. #
  2. # Copyright (C) 2009-2018 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.27.0
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@KERNEL/software/scm/git/
  13. PKG_HASH:=73ca9774d7fa226e1d87c1909401623f96dca6a044e583b9a762e84d7d1a73f9
  14. PKG_LICENSE:=GPL-2.0-or-later
  15. PKG_LICENSE_FILES:=COPYING
  16. PKG_CPE_ID:=cpe:/a:git-scm:git
  17. PKG_FIXUP:=autoreconf
  18. PKG_INSTALL:=1
  19. PKG_BUILD_PARALLEL:=1
  20. include $(INCLUDE_DIR)/package.mk
  21. define Package/git/Default
  22. SECTION:=net
  23. CATEGORY:=Network
  24. SUBMENU:=Version Control Systems
  25. DEPENDS:=+libopenssl +libpthread +librt +zlib
  26. URL:=https://git-scm.com
  27. MAINTAINER:=Peter Wagner <tripolar@gmx.at>
  28. endef
  29. define Package/git
  30. $(call Package/git/Default)
  31. TITLE:=The fast version control system
  32. endef
  33. define Package/git/description
  34. Git is a free & open source, distributed version control system
  35. designed to handle everything from small to very large projects
  36. with speed and efficiency.
  37. endef
  38. define Package/git-http
  39. $(call Package/git/Default)
  40. DEPENDS+= +git +libcurl
  41. TITLE:=Git HTTP commands
  42. endef
  43. define Package/git-http/description
  44. $(call Package/git/description)
  45. This package allows git push/fetch over http(s) and ftp(s)
  46. endef
  47. define Package/git-gitweb
  48. $(call Package/git/Default)
  49. TITLE:=Git repository web interface
  50. DEPENDS+= +git \
  51. +perl-cgi \
  52. +perlbase-digest \
  53. +perlbase-encode \
  54. +perlbase-essential \
  55. +perlbase-fcntl \
  56. +perlbase-file \
  57. +perlbase-filetest \
  58. +perlbase-storable \
  59. +perlbase-time
  60. endef
  61. define Package/git-gitweb/description
  62. $(call Package/git/description)
  63. This package builds the gitweb web interface for git repositories
  64. endef
  65. define Package/git-gitweb/conffiles
  66. /etc/gitweb.conf
  67. endef
  68. MAKE_FLAGS := \
  69. CC="$(TARGET_CC)" \
  70. CFLAGS="$(TARGET_CFLAGS)" \
  71. CPPFLAGS="$(TARGET_CPPFLAGS)" \
  72. LDFLAGS="$(TARGET_LDFLAGS)" \
  73. NO_EXPAT="YesPlease" \
  74. NO_MKSTEMPS="YesPlease" \
  75. NO_GETTEXT="YesPlease" \
  76. NO_UNIX_SOCKETS="YesPlease" \
  77. NO_ICONV="YesPlease" \
  78. NO_NSEC="YesPlease" \
  79. NO_PERL="YesPlease" \
  80. NO_PYTHON="YesPlease" \
  81. NO_TCLTK="YesPlease" \
  82. NO_INSTALL_HARDLINKS="yes" \
  83. gitwebdir="/www/cgi-bin" \
  84. GITWEB_JS="/gitweb/gitweb.js" \
  85. GITWEB_CSS="/gitweb/gitweb.css" \
  86. GITWEB_LOGO="/gitweb/gitweb-logo.png" \
  87. GITWEB_FAVICON="/gitweb/gitweb-favicon.png" \
  88. uname_S="Linux" \
  89. CONFIGURE_ARGS += \
  90. --without-iconv \
  91. define Build/Configure
  92. $(MAKE) -C $(PKG_BUILD_DIR) \
  93. configure
  94. $(call Build/Configure/Default,)
  95. endef
  96. define Build/Compile
  97. mkdir -p $(PKG_INSTALL_DIR)/www/cgi-bin $(PKG_INSTALL_DIR)/www/gitweb
  98. $(call Build/Compile/Default,DESTDIR=$(PKG_INSTALL_DIR) all install gitweb install-gitweb)
  99. endef
  100. define Package/git/install
  101. $(RM) $(PKG_INSTALL_DIR)/usr/bin/git-cvsserver
  102. $(RM) $(PKG_INSTALL_DIR)/usr/bin/git-shell
  103. $(INSTALL_DIR) $(1)/usr/bin
  104. $(CP) $(PKG_INSTALL_DIR)/usr/bin/git-* $(1)/usr/bin
  105. $(INSTALL_DIR) $(1)/usr/lib/git-core
  106. $(INSTALL_DIR) $(1)/usr/share/git-core/templates
  107. ( cd $(PKG_INSTALL_DIR); $(TAR) \
  108. --exclude=usr/lib/git-core/git-http-backend \
  109. --exclude=usr/lib/git-core/git-http-fetch \
  110. --exclude=usr/lib/git-core/git-remote-ftp \
  111. --exclude=usr/lib/git-core/git-remote-ftps \
  112. --exclude=usr/lib/git-core/git-remote-http \
  113. --exclude=usr/lib/git-core/git-remote-https \
  114. -cf - \
  115. usr/lib/git-core \
  116. usr/share/git-core/templates \
  117. ) | ( cd $(1); $(TAR) -xf - )
  118. ln $(1)/usr/lib/git-core/git $(1)/usr/bin/git
  119. ln $(1)/usr/lib/git-core/git-shell $(1)/usr/bin/git-shell
  120. endef
  121. define Package/git-http/install
  122. $(INSTALL_DIR) $(1)/usr/lib/git-core
  123. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-http-backend $(1)/usr/lib/git-core
  124. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-http-fetch $(1)/usr/lib/git-core
  125. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-ftp $(1)/usr/lib/git-core
  126. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-ftps $(1)/usr/lib/git-core
  127. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-http $(1)/usr/lib/git-core
  128. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-https $(1)/usr/lib/git-core
  129. endef
  130. define Package/git-gitweb/install
  131. $(INSTALL_DIR) $(1)/www/cgi-bin $(1)/www/gitweb
  132. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/www/cgi-bin/gitweb.cgi $(1)/www/cgi-bin/
  133. $(CP) $(PKG_INSTALL_DIR)/www/cgi-bin/static/* $(1)/www/gitweb/
  134. endef
  135. $(eval $(call BuildPackage,git))
  136. $(eval $(call BuildPackage,git-http))
  137. $(eval $(call BuildPackage,git-gitweb))