libjasper: Update from 2.0.10 to 2.0.12
[termux-packages] / packages / git / build.sh
CommitLineData
41c3c03a 1TERMUX_PKG_HOMEPAGE=https://git-scm.com/
59f0d218 2TERMUX_PKG_DESCRIPTION="Distributed version control system designed to handle everything from small to very large projects with speed and efficiency"
de255e9c
FF
3# less is required as a pager for git log, and the busybox less does not handle used escape sequences.
4TERMUX_PKG_DEPENDS="libcurl, less"
8c732a35 5TERMUX_PKG_VERSION=2.12.0
59f0d218 6TERMUX_PKG_SRCURL=https://www.kernel.org/pub/software/scm/git/git-${TERMUX_PKG_VERSION}.tar.xz
8c732a35 7TERMUX_PKG_SHA256=1821766479062d052cc1897d0ded95212e81e5c7f1039786bc4aec2225a32027
5822f920 8## This requires a working $TERMUX_PREFIX/bin/sh on the host building:
41c3c03a
FF
9TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
10ac_cv_fread_reads_directories=yes
11ac_cv_header_libintl_h=no
12ac_cv_snprintf_returns_bogus=no
13--with-curl
14--without-tcltk
15--with-shell=$TERMUX_PREFIX/bin/sh
16"
59f0d218 17# expat is only used by git-http-push for remote lock management over DAV, so disable:
19ce3d74 18# NO_INSTALL_HARDLINKS to use symlinks instead of hardlinks (which does not work on Android M):
2a86d5d9 19TERMUX_PKG_EXTRA_MAKE_ARGS="NO_NSEC=1 NO_GETTEXT=1 NO_EXPAT=1 NO_INSTALL_HARDLINKS=1 PERL_PATH=$TERMUX_PREFIX/bin/perl"
59f0d218
FF
20TERMUX_PKG_BUILD_IN_SRC="yes"
21
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
41c3c03a
FF
25TERMUX_PKG_RM_AFTER_INSTALL="
26bin/git-cvsserver
27bin/git-shell
28libexec/git-core/git-shell
29libexec/git-core/git-cvsserver
30share/man/man1/git-cvsserver.1
31share/man/man1/git-shell.1
32"
2a86d5d9
FF
33
34termux_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
38
39 # Force fresh perl files (otherwise files from earlier builds
40 # remains without bumped modification times, so are not picked
41 # up by the package):
42 rm -Rf $TERMUX_PREFIX/share/git-perl
43}
59f0d218
FF
44
45termux_step_post_make_install () {
46 # Installing man requires asciidoc and xmlto, so git uses separate make targets for man pages
47 make install-man
e8c88e69
FF
48
49 mkdir -p $TERMUX_PREFIX/etc/bash_completion.d/
50 cp $TERMUX_PKG_SRCDIR/contrib/completion/git-completion.bash \
51 $TERMUX_PREFIX/etc/bash_completion.d/
2a86d5d9
FF
52
53 # Remove the build machine perl setup in termux_step_pre_configure to avoid it being packaged:
54 rm $TERMUX_PREFIX/bin/perl
55
56 # Remove clutter:
57 rm -Rf $TERMUX_PREFIX/lib/*-linux*/perl
41c3c03a
FF
58
59 # Remove duplicated binaries in bin/ with symlink to the one in libexec/git-core:
60 (cd $TERMUX_PREFIX/bin; ln -s -f ../libexec/git-core/git git)
61 (cd $TERMUX_PREFIX/bin; ln -s -f ../libexec/git-core/git-upload-pack git-upload-pack)
59f0d218 62}
de255e9c
FF
63
64termux_step_post_massage () {
65 if [ ! -f libexec/git-core/git-remote-https ]; then
66 echo "ERROR: Built without https support"
67 exit 1
68 fi
69}