Makefile 4.1 KB

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