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.

159 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. uname_S="Linux" \
  87. CONFIGURE_ARGS += \
  88. --without-iconv \
  89. define Build/Configure
  90. $(MAKE) -C $(PKG_BUILD_DIR) \
  91. configure
  92. $(call Build/Configure/Default,)
  93. endef
  94. define Build/Compile
  95. mkdir -p $(PKG_INSTALL_DIR)/www/cgi-bin $(PKG_INSTALL_DIR)/www/gitweb
  96. $(call Build/Compile/Default,DESTDIR=$(PKG_INSTALL_DIR) all install gitweb install-gitweb)
  97. endef
  98. define Package/git/install
  99. $(RM) $(PKG_INSTALL_DIR)/usr/bin/git-cvsserver
  100. $(RM) $(PKG_INSTALL_DIR)/usr/bin/git-shell
  101. $(INSTALL_DIR) $(1)/usr/bin
  102. $(CP) $(PKG_INSTALL_DIR)/usr/bin/git-* $(1)/usr/bin
  103. $(INSTALL_DIR) $(1)/usr/lib/git-core
  104. $(INSTALL_DIR) $(1)/usr/share/git-core/templates
  105. ( cd $(PKG_INSTALL_DIR); $(TAR) \
  106. --exclude=usr/lib/git-core/git-http-backend \
  107. --exclude=usr/lib/git-core/git-http-fetch \
  108. --exclude=usr/lib/git-core/git-remote-ftp \
  109. --exclude=usr/lib/git-core/git-remote-ftps \
  110. --exclude=usr/lib/git-core/git-remote-http \
  111. --exclude=usr/lib/git-core/git-remote-https \
  112. -cf - \
  113. usr/lib/git-core \
  114. usr/share/git-core/templates \
  115. ) | ( cd $(1); $(TAR) -xf - )
  116. ln $(1)/usr/lib/git-core/git $(1)/usr/bin/git
  117. ln $(1)/usr/lib/git-core/git-shell $(1)/usr/bin/git-shell
  118. endef
  119. define Package/git-http/install
  120. $(INSTALL_DIR) $(1)/usr/lib/git-core
  121. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-http-backend $(1)/usr/lib/git-core
  122. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-http-fetch $(1)/usr/lib/git-core
  123. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-ftp $(1)/usr/lib/git-core
  124. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-ftps $(1)/usr/lib/git-core
  125. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-http $(1)/usr/lib/git-core
  126. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-https $(1)/usr/lib/git-core
  127. endef
  128. define Package/git-gitweb/install
  129. $(INSTALL_DIR) $(1)/www/cgi-bin $(1)/www/gitweb
  130. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/www/cgi-bin/gitweb.cgi $(1)/www/cgi-bin/
  131. $(CP) $(PKG_INSTALL_DIR)/www/cgi-bin/static/* $(1)/www/gitweb/
  132. endef
  133. $(eval $(call BuildPackage,git))
  134. $(eval $(call BuildPackage,git-http))
  135. $(eval $(call BuildPackage,git-gitweb))