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.

156 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.20.1
  10. PKG_RELEASE:=2
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@KERNEL/software/scm/git/
  13. PKG_HASH:=9d2e91e2faa2ea61ba0a70201d023b36f54d846314591a002c610ea2ab81c3e9
  14. PKG_INSTALL:=1
  15. PKG_FIXUP:=autoreconf
  16. PKG_BUILD_PARALLEL:=1
  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:=https://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
  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. define Package/git-gitweb
  45. $(call Package/git/Default)
  46. TITLE:=Git repository web interface
  47. DEPENDS+= +git \
  48. +perl-cgi \
  49. +perlbase-digest \
  50. +perlbase-encode \
  51. +perlbase-essential \
  52. +perlbase-fcntl \
  53. +perlbase-file \
  54. +perlbase-filetest \
  55. +perlbase-storable \
  56. +perlbase-time
  57. endef
  58. define Package/git-gitweb/description
  59. $(call Package/git/description)
  60. This package builds the gitweb web interface for git repositories
  61. endef
  62. define Package/git-gitweb/conffiles
  63. /etc/gitweb.conf
  64. endef
  65. MAKE_FLAGS := \
  66. CC="$(TARGET_CC)" \
  67. CFLAGS="$(TARGET_CFLAGS)" \
  68. CPPFLAGS="$(TARGET_CPPFLAGS)" \
  69. LDFLAGS="$(TARGET_LDFLAGS)" \
  70. NO_EXPAT="YesPlease" \
  71. NO_MKSTEMPS="YesPlease" \
  72. NO_GETTEXT="YesPlease" \
  73. NO_UNIX_SOCKETS="YesPlease" \
  74. NO_ICONV="YesPlease" \
  75. NO_NSEC="YesPlease" \
  76. NO_PERL="YesPlease" \
  77. NO_PYTHON="YesPlease" \
  78. NO_TCLTK="YesPlease" \
  79. NO_INSTALL_HARDLINKS="yes" \
  80. gitwebdir="/www/cgi-bin" \
  81. GITWEB_JS="/gitweb/gitweb.js" \
  82. GITWEB_CSS="/gitweb/gitweb.css" \
  83. GITWEB_LOGO="/gitweb/gitweb-logo.png" \
  84. GITWEB_FAVICON="/gitweb/gitweb-favicon.png"
  85. CONFIGURE_ARGS += \
  86. --without-iconv \
  87. define Build/Configure
  88. $(MAKE) -C $(PKG_BUILD_DIR) \
  89. configure
  90. $(call Build/Configure/Default,)
  91. endef
  92. define Build/Compile
  93. mkdir -p $(PKG_INSTALL_DIR)/www/cgi-bin $(PKG_INSTALL_DIR)/www/gitweb
  94. $(call Build/Compile/Default,DESTDIR=$(PKG_INSTALL_DIR) all install gitweb install-gitweb)
  95. endef
  96. define Package/git/install
  97. $(RM) $(PKG_INSTALL_DIR)/usr/bin/git-cvsserver
  98. $(RM) $(PKG_INSTALL_DIR)/usr/bin/git-shell
  99. $(INSTALL_DIR) $(1)/usr/bin
  100. $(CP) $(PKG_INSTALL_DIR)/usr/bin/git-* $(1)/usr/bin
  101. $(INSTALL_DIR) $(1)/usr/lib/git-core
  102. $(INSTALL_DIR) $(1)/usr/share/git-core/templates
  103. ( cd $(PKG_INSTALL_DIR); $(TAR) \
  104. --exclude=usr/lib/git-core/git-http-backend \
  105. --exclude=usr/lib/git-core/git-http-fetch \
  106. --exclude=usr/lib/git-core/git-remote-ftp \
  107. --exclude=usr/lib/git-core/git-remote-ftps \
  108. --exclude=usr/lib/git-core/git-remote-http \
  109. --exclude=usr/lib/git-core/git-remote-https \
  110. -cf - \
  111. usr/lib/git-core \
  112. usr/share/git-core/templates \
  113. ) | ( cd $(1); $(TAR) -xf - )
  114. ln $(1)/usr/lib/git-core/git $(1)/usr/bin/git
  115. ln $(1)/usr/lib/git-core/git-shell $(1)/usr/bin/git-shell
  116. endef
  117. define Package/git-http/install
  118. $(INSTALL_DIR) $(1)/usr/lib/git-core
  119. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-http-backend $(1)/usr/lib/git-core
  120. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-http-fetch $(1)/usr/lib/git-core
  121. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-ftp $(1)/usr/lib/git-core
  122. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-ftps $(1)/usr/lib/git-core
  123. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-http $(1)/usr/lib/git-core
  124. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-https $(1)/usr/lib/git-core
  125. endef
  126. define Package/git-gitweb/install
  127. $(INSTALL_DIR) $(1)/www/cgi-bin $(1)/www/gitweb
  128. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/www/cgi-bin/gitweb.cgi $(1)/www/cgi-bin/
  129. $(CP) $(PKG_INSTALL_DIR)/www/cgi-bin/static/* $(1)/www/gitweb/
  130. endef
  131. $(eval $(call BuildPackage,git))
  132. $(eval $(call BuildPackage,git-http))
  133. $(eval $(call BuildPackage,git-gitweb))