2 # Copyright (C) 2009-2018 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR
)/rules.mk
14 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.xz
15 PKG_SOURCE_URL
:=@KERNEL
/software
/scm
/git
/
16 PKG_HASH
:=f612c1abc63557d50ad3849863fc9109670139fc9901e574460ec76e0511adb9
18 PKG_LICENSE
:=GPL-2.0
-or-later
19 PKG_LICENSE_FILES
:=COPYING
20 PKG_CPE_ID
:=cpe
:/a
:git-scm
:git
26 include $(INCLUDE_DIR
)/package.mk
28 define Package
/git
/Default
31 SUBMENU
:=Version Control Systems
32 DEPENDS
:=+libopenssl
+libpthread
+librt
+zlib
33 URL
:=https
://git-scm.com
34 MAINTAINER
:=Peter Wagner
<tripolar@gmx.at
>
38 $(call Package
/git
/Default
)
39 TITLE
:=The fast version control system
42 define Package
/git
/description
43 Git is a free
& open source
, distributed version control system
44 designed to handle everything from small to very large projects
45 with speed and efficiency.
48 define Package
/git-http
49 $(call Package
/git
/Default
)
50 DEPENDS
+= +git
+libcurl
51 TITLE
:=Git HTTP commands
54 define Package
/git-http
/description
55 $(call Package
/git
/description
)
57 This package allows git push
/fetch over http
(s
) and ftp
(s
)
60 define Package
/git-gitweb
61 $(call Package
/git
/Default
)
62 TITLE
:=Git repository web interface
75 define Package
/git-gitweb
/description
76 $(call Package
/git
/description
)
77 This package builds the gitweb web interface for git repositories
80 define Package
/git-gitweb
/conffiles
86 CFLAGS
="$(TARGET_CFLAGS)" \
87 CPPFLAGS
="$(TARGET_CPPFLAGS)" \
88 LDFLAGS
="$(TARGET_LDFLAGS)" \
89 NO_EXPAT
="YesPlease" \
90 NO_MKSTEMPS
="YesPlease" \
91 NO_GETTEXT
="YesPlease" \
92 NO_UNIX_SOCKETS
="YesPlease" \
93 NO_ICONV
="YesPlease" \
96 NO_PYTHON
="YesPlease" \
97 NO_TCLTK
="YesPlease" \
98 NO_INSTALL_HARDLINKS
="yes" \
99 gitwebdir
="/www/cgi-bin" \
105 define Build
/Configure
106 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
109 $(call Build
/Configure
/Default
,)
113 mkdir
-p
$(PKG_INSTALL_DIR
)/www
/cgi-bin
$(PKG_INSTALL_DIR
)/www
/gitweb
114 $(call Build
/Compile
/Default
,DESTDIR
=$(PKG_INSTALL_DIR
) all install gitweb install-gitweb
)
117 define Package
/git
/install
118 $(RM
) $(PKG_INSTALL_DIR
)/usr
/bin
/git-cvsserver
119 $(RM
) $(PKG_INSTALL_DIR
)/usr
/bin
/git-shell
120 $(INSTALL_DIR
) $(1)/usr
/bin
121 $(CP
) $(PKG_INSTALL_DIR
)/usr
/bin
/git-
* $(1)/usr
/bin
122 $(INSTALL_DIR
) $(1)/usr
/lib
/git-core
123 $(INSTALL_DIR
) $(1)/usr
/share
/git-core
/templates
124 ( cd
$(PKG_INSTALL_DIR
); $(TAR
) \
125 --exclude
=usr
/lib
/git-core
/git-http-backend \
126 --exclude
=usr
/lib
/git-core
/git-http-fetch \
127 --exclude
=usr
/lib
/git-core
/git-remote-ftp \
128 --exclude
=usr
/lib
/git-core
/git-remote-ftps \
129 --exclude
=usr
/lib
/git-core
/git-remote-http \
130 --exclude
=usr
/lib
/git-core
/git-remote-https \
133 usr
/share
/git-core
/templates \
134 ) |
( cd
$(1); $(TAR
) -xf
- )
135 ln
$(1)/usr
/lib
/git-core
/git
$(1)/usr
/bin
/git
136 ln
$(1)/usr
/lib
/git-core
/git-shell
$(1)/usr
/bin
/git-shell
139 define Package
/git-http
/install
140 $(INSTALL_DIR
) $(1)/usr
/lib
/git-core
141 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/git-core
/git-http-backend
$(1)/usr
/lib
/git-core
142 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/git-core
/git-http-fetch
$(1)/usr
/lib
/git-core
143 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/git-core
/git-remote-ftp
$(1)/usr
/lib
/git-core
144 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/git-core
/git-remote-ftps
$(1)/usr
/lib
/git-core
145 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/git-core
/git-remote-http
$(1)/usr
/lib
/git-core
146 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/git-core
/git-remote-https
$(1)/usr
/lib
/git-core
149 define Package
/git-gitweb
/install
150 $(INSTALL_DIR
) $(1)/www
/cgi-bin
$(1)/www
/gitweb
151 $(INSTALL_BIN
) $(PKG_INSTALL_DIR
)/www
/cgi-bin
/gitweb.cgi
$(1)/www
/cgi-bin
/
152 # work around https://lore.kernel.org/git/80eb3972-4960-5727-ce86-acc3a4425fd4@nic.cz/T/#u
153 $(SED
) 's,^our @stylesheets .*,our @stylesheets = ("/gitweb/gitweb.css");,' $(1)/www
/cgi-bin
/gitweb.cgi
154 $(SED
) 's,^our $$$$logo .*,our $$$$logo = "/gitweb/git-logo.png";,' $(1)/www
/cgi-bin
/gitweb.cgi
155 $(SED
) 's,^our $$$$favicon .*,our $$$$favicon = "/gitweb/git-favicon.png";,' $(1)/www
/cgi-bin
/gitweb.cgi
156 $(SED
) 's,^our $$$$javascript .*,our $$$$javascript = "/gitweb/gitweb.js";,' $(1)/www
/cgi-bin
/gitweb.cgi
157 $(CP
) $(PKG_INSTALL_DIR
)/www
/cgi-bin
/static
/* $(1)/www
/gitweb
/
160 $(eval
$(call BuildPackage
,git
))
161 $(eval
$(call BuildPackage
,git-http
))
162 $(eval
$(call BuildPackage
,git-gitweb
))