git: update to 2.17.1
[feed/packages.git] / net / git / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=git
11 PKG_VERSION:=2.17.1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=@KERNEL/software/scm/git/
16 PKG_HASH:=79136e7aa83abae4d8a25c8111f113d3c5a63aeb5fd93cc72c26d49c6d5ba65e
17
18 PKG_INSTALL:=1
19 PKG_BUILD_PARALLEL:=1
20 PKG_FIXUP:=autoreconf
21 PKG_BUILD_PARALLEL:=1
22
23 include $(INCLUDE_DIR)/package.mk
24
25 define Package/git/Default
26 SECTION:=net
27 CATEGORY:=Network
28 SUBMENU:=Version Control Systems
29 DEPENDS:=+libopenssl +libpthread +librt +zlib
30 URL:=http://git-scm.com
31 MAINTAINER:=Peter Wagner <tripolar@gmx.at>
32 endef
33
34 define Package/git
35 $(call Package/git/Default)
36 TITLE:=The fast version control system
37 endef
38
39 define Package/git/description
40 Git is a free & open source, distributed version control system
41 designed to handle everything from small to very large projects
42 with speed and efficiency.
43 endef
44
45 define Package/git-http
46 $(call Package/git/Default)
47 DEPENDS+= +git +libcurl +ca-certificates
48 TITLE:=Git HTTP commands
49 endef
50
51 define Package/git-http/description
52 $(call Package/git/description)
53
54 This package allows git push/fetch over http(s) and ftp(s)
55 endef
56
57 define Package/git-gitweb
58 $(call Package/git/Default)
59 TITLE:=Git repository web interface
60 DEPENDS+= +git +perlbase-essential +perlbase-file +perlbase-fcntl +perlbase-encode +perlbase-digest +perlbase-time +perl-cgi
61 endef
62
63 define Package/git-gitweb/description
64 $(call Package/git/description)
65 This package builds the gitweb web interface for git repositories
66 endef
67
68 define Package/git-gitweb/conffiles
69 /etc/gitweb.conf
70 endef
71
72 MAKE_FLAGS := \
73 CC="$(TARGET_CC)" \
74 CFLAGS="$(TARGET_CFLAGS)" \
75 CPPFLAGS="$(TARGET_CPPFLAGS)" \
76 LDFLAGS="$(TARGET_LDFLAGS)" \
77 NO_EXPAT="YesPlease" \
78 NO_MKSTEMPS="YesPlease" \
79 NO_GETTEXT="YesPlease" \
80 NO_UNIX_SOCKETS="YesPlease" \
81 NO_ICONV="YesPlease" \
82 NO_NSEC="YesPlease" \
83 NO_PERL="YesPlease" \
84 NO_PYTHON="YesPlease" \
85 NO_TCLTK="YesPlease" \
86 NO_INSTALL_HARDLINKS="yes" \
87 gitwebdir="/www/cgi-bin" \
88 GITWEB_JS="/gitweb/gitweb.js" \
89 GITWEB_CSS="/gitweb/gitweb.css" \
90 GITWEB_LOGO="/gitweb/gitweb-logo.png" \
91 GITWEB_FAVICON="/gitweb/gitweb-favicon.png"
92
93 CONFIGURE_ARGS += \
94 --without-iconv \
95
96 define Build/Configure
97 $(MAKE) -C $(PKG_BUILD_DIR) \
98 configure
99
100 $(call Build/Configure/Default,)
101 endef
102
103 define Build/Compile
104 mkdir -p $(PKG_INSTALL_DIR)/www/cgi-bin $(PKG_INSTALL_DIR)/www/gitweb
105 $(call Build/Compile/Default,DESTDIR=$(PKG_INSTALL_DIR) all install gitweb install-gitweb)
106 endef
107
108 define Package/git/install
109 $(INSTALL_DIR) $(1)/usr/bin
110 $(CP) $(PKG_INSTALL_DIR)/usr/bin/git $(1)/usr/bin
111 $(RM) $(PKG_INSTALL_DIR)/usr/bin/git-cvsserver
112 $(CP) $(PKG_INSTALL_DIR)/usr/bin/git-* $(1)/usr/bin
113 $(INSTALL_DIR) $(1)/usr/lib/git-core
114 ln $(1)/usr/bin/git $(1)/usr/lib/git-core/git
115 ln $(1)/usr/bin/git-shell $(1)/usr/lib/git-core/git-shell
116 ln $(1)/usr/bin/git-upload-pack $(1)/usr/lib/git-core/git-upload-pack
117 $(INSTALL_DIR) $(1)/usr/share/git-core/templates
118 ( cd $(PKG_INSTALL_DIR); $(TAR) \
119 --exclude=usr/lib/git-core/git-http-backend \
120 --exclude=usr/lib/git-core/git-http-fetch \
121 --exclude=usr/lib/git-core/git-remote-ftp \
122 --exclude=usr/lib/git-core/git-remote-ftps \
123 --exclude=usr/lib/git-core/git-remote-http \
124 --exclude=usr/lib/git-core/git-remote-https \
125 --exclude=usr/lib/git-core/git \
126 --exclude=usr/lib/git-core/git-shell \
127 --exclude=usr/lib/git-core/git-upload-pack \
128 -cf - \
129 usr/lib/git-core \
130 usr/share/git-core/templates \
131 ) | ( cd $(1); $(TAR) -xf - )
132 endef
133
134 define Package/git-http/install
135 $(INSTALL_DIR) $(1)/usr/lib/git-core
136 $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-http-backend $(1)/usr/lib/git-core
137 $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-http-fetch $(1)/usr/lib/git-core
138 $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-ftp $(1)/usr/lib/git-core
139 $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-ftps $(1)/usr/lib/git-core
140 $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-http $(1)/usr/lib/git-core
141 $(CP) $(PKG_INSTALL_DIR)/usr/lib/git-core/git-remote-https $(1)/usr/lib/git-core
142 endef
143
144 define Package/git-gitweb/install
145 $(INSTALL_DIR) $(1)/www/cgi-bin $(1)/www/gitweb
146 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/www/cgi-bin/gitweb.cgi $(1)/www/cgi-bin/
147 $(CP) $(PKG_INSTALL_DIR)/www/cgi-bin/static/* $(1)/www/gitweb/
148 endef
149
150 $(eval $(call BuildPackage,git))
151 $(eval $(call BuildPackage,git-http))
152 $(eval $(call BuildPackage,git-gitweb))