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.

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