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.

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