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.

148 lines
4.2 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.19.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  12. PKG_SOURCE_URL:=@KERNEL/software/scm/git/
  13. PKG_HASH:=345056aa9b8084280b1b9fe1374d232dec05a34e8849028a20bfdb56e920dbb5
  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. $(RM) $(PKG_INSTALL_DIR)/usr/bin/git-cvsserver
  90. $(RM) $(PKG_INSTALL_DIR)/usr/bin/git-shell
  91. $(INSTALL_DIR) $(1)/usr/bin
  92. $(CP) $(PKG_INSTALL_DIR)/usr/bin/git-* $(1)/usr/bin
  93. $(INSTALL_DIR) $(1)/usr/lib/git-core
  94. $(INSTALL_DIR) $(1)/usr/share/git-core/templates
  95. ( cd $(PKG_INSTALL_DIR); $(TAR) \
  96. --exclude=usr/lib/git-core/git-http-backend \
  97. --exclude=usr/lib/git-core/git-http-fetch \
  98. --exclude=usr/lib/git-core/git-remote-ftp \
  99. --exclude=usr/lib/git-core/git-remote-ftps \
  100. --exclude=usr/lib/git-core/git-remote-http \
  101. --exclude=usr/lib/git-core/git-remote-https \
  102. -cf - \
  103. usr/lib/git-core \
  104. usr/share/git-core/templates \
  105. ) | ( cd $(1); $(TAR) -xf - )
  106. ln $(1)/usr/lib/git-core/git $(1)/usr/bin/git
  107. ln $(1)/usr/lib/git-core/git-shell $(1)/usr/bin/git-shell
  108. endef
  109. define Package/git-http/install
  110. $(INSTALL_DIR) $(1)/usr/lib/git-core
  111. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-http-backend $(1)/usr/lib/git-core
  112. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-http-fetch $(1)/usr/lib/git-core
  113. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-ftp $(1)/usr/lib/git-core
  114. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-ftps $(1)/usr/lib/git-core
  115. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-http $(1)/usr/lib/git-core
  116. $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-https $(1)/usr/lib/git-core
  117. endef
  118. define Package/git-gitweb/install
  119. $(INSTALL_DIR) $(1)/www/cgi-bin $(1)/www/gitweb
  120. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/www/cgi-bin/gitweb.cgi $(1)/www/cgi-bin/
  121. $(CP) $(PKG_INSTALL_DIR)/www/cgi-bin/static/* $(1)/www/gitweb/
  122. endef
  123. $(eval $(call BuildPackage,git))
  124. $(eval $(call BuildPackage,git-http))
  125. $(eval $(call BuildPackage,git-gitweb))