1 TERMUX_PKG_HOMEPAGE
=https
://git-scm.com
/
2 TERMUX_PKG_DESCRIPTION
="Fast, scalable, distributed revision control system"
3 # less is required as a pager for git log, and the busybox less does not handle used escape sequences.
4 TERMUX_PKG_DEPENDS
="libcurl, less, openssl"
5 TERMUX_PKG_VERSION
=2.15.0
6 TERMUX_PKG_SHA256
=107116489f10b758b51af1c5dbdb9a274917b0fb67dc8eaefcdabc7bc3eb3e6a
7 TERMUX_PKG_SRCURL
=https
://www.kernel.org
/pub
/software
/scm
/git
/git-
${TERMUX_PKG_VERSION}.
tar.xz
8 ## This requires a working $TERMUX_PREFIX/bin/sh on the host building:
9 TERMUX_PKG_EXTRA_CONFIGURE_ARGS
="
10 ac_cv_fread_reads_directories=yes
11 ac_cv_header_libintl_h=no
12 ac_cv_snprintf_returns_bogus=no
15 --with-shell=$TERMUX_PREFIX/bin/sh
17 # expat is only used by git-http-push for remote lock management over DAV, so disable:
18 # NO_INSTALL_HARDLINKS to use symlinks instead of hardlinks (which does not work on Android M):
19 TERMUX_PKG_EXTRA_MAKE_ARGS
="NO_NSEC=1 NO_GETTEXT=1 NO_EXPAT=1 NO_INSTALL_HARDLINKS=1 PERL_PATH=$TERMUX_PREFIX/bin/perl"
20 TERMUX_PKG_BUILD_IN_SRC
="yes"
22 # Things to remove to save space:
23 # bin/git-cvsserver - server emulating CVS
24 # bin/git-shell - restricted login shell for Git-only SSH access
25 TERMUX_PKG_RM_AFTER_INSTALL
="
28 libexec/git-core/git-shell
29 libexec/git-core/git-cvsserver
30 share/man/man1/git-cvsserver.1
31 share/man/man1/git-shell.1
34 termux_step_pre_configure
() {
35 # Setup perl so that the build process can execute it:
36 rm -f
$TERMUX_PREFIX/bin
/perl
37 ln -s
`which perl` $TERMUX_PREFIX/bin
/perl
39 # Force fresh perl files (otherwise files from earlier builds
40 # remains without bumped modification times, so are not picked
42 rm -Rf
$TERMUX_PREFIX/share
/git-perl
44 # Fixes build if utfcpp is installed:
45 CPPFLAGS
="-I$TERMUX_PKG_SRCDIR $CPPFLAGS"
48 termux_step_post_make_install
() {
49 # Installing man requires asciidoc and xmlto, so git uses separate make targets for man pages
52 mkdir
-p
$TERMUX_PREFIX/etc
/bash_completion.d
/
53 cp $TERMUX_PKG_SRCDIR/contrib
/completion
/git-completion.bash \
54 $TERMUX_PREFIX/etc
/bash_completion.d
/
56 # Remove the build machine perl setup in termux_step_pre_configure to avoid it being packaged:
57 rm $TERMUX_PREFIX/bin
/perl
60 rm -Rf
$TERMUX_PREFIX/lib
/*-linux
*/perl
62 # Remove duplicated binaries in bin/ with symlink to the one in libexec/git-core:
63 (cd $TERMUX_PREFIX/bin
; ln -s
-f ..
/libexec
/git-core
/git git
)
64 (cd $TERMUX_PREFIX/bin
; ln -s
-f ..
/libexec
/git-core
/git-upload-pack git-upload-pack
)
67 termux_step_post_massage
() {
68 if [ ! -f libexec
/git-core
/git-remote-https
]; then
69 termux_error_exit
"Git built without https support"