You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

132 lines
4.6KB

  1. # Maintainer: Christian Hesse <mail@eworm.de>
  2. # Maintainer: Dan McGee <dan@archlinux.org>
  3. pkgname=git
  4. pkgver=2.22.0
  5. pkgrel=1
  6. pkgdesc='the fast distributed version control system'
  7. arch=(x86_64)
  8. url='https://git-scm.com/'
  9. license=('GPL2')
  10. depends=('curl' 'expat' 'perl' 'perl-error' 'perl-mailtools'
  11. 'openssl' 'pcre2' 'grep' 'shadow')
  12. makedepends=('python2' 'libgnome-keyring' 'xmlto' 'asciidoc')
  13. optdepends=('tk: gitk and git gui'
  14. 'perl-libwww: git svn'
  15. 'perl-term-readkey: git svn and interactive.singlekey setting'
  16. 'perl-mime-tools: git send-email'
  17. 'perl-net-smtp-ssl: git send-email TLS support'
  18. 'perl-authen-sasl: git send-email TLS support'
  19. 'perl-mediawiki-api: git mediawiki support'
  20. 'perl-datetime-format-iso8601: git mediawiki support'
  21. 'perl-lwp-protocol-https: git mediawiki https support'
  22. 'perl-cgi: gitweb (web interface) support'
  23. 'python2: various helper scripts'
  24. 'subversion: git svn'
  25. 'gnome-keyring: GNOME keyring credential helper'
  26. 'libsecret: libsecret credential helper')
  27. install=git.install
  28. validpgpkeys=('96E07AF25771955980DAD10020D04E5A713660A7') # Junio C Hamano
  29. source=("https://www.kernel.org/pub/software/scm/git/git-$pkgver.tar."{xz,sign}
  30. 'git-sysusers.conf')
  31. sha256sums=('159e4b599f8af4612e70b666600a3139541f8bacc18124daf2cbe8d1b934f29f'
  32. 'SKIP'
  33. '7630e8245526ad80f703fac9900a1328588c503ce32b37b9f8811674fcda4a45')
  34. _make_paths=(
  35. prefix='/usr'
  36. gitexecdir='/usr/lib/git-core'
  37. perllibdir="$(/usr/bin/perl -MConfig -wle 'print $Config{installvendorlib}')"
  38. )
  39. _make_options=(
  40. CFLAGS="$CFLAGS"
  41. LDFLAGS="$LDFLAGS"
  42. USE_LIBPCRE2=1
  43. NO_CROSS_DIRECTORY_HARDLINKS=1
  44. NO_PERL_CPAN_FALLBACKS=1
  45. MAN_BOLD_LITERAL=1
  46. )
  47. build() {
  48. export PYTHON_PATH='/usr/bin/python2'
  49. cd "$srcdir/$pkgname-$pkgver"
  50. make \
  51. "${_make_paths[@]}" \
  52. "${_make_options[@]}" \
  53. all man
  54. make -C contrib/credential/gnome-keyring
  55. make -C contrib/credential/libsecret
  56. make -C contrib/subtree "${_make_paths[@]}" all man
  57. make -C contrib/mw-to-git "${_make_paths[@]}" all
  58. make -C contrib/diff-highlight "${_make_paths[@]}"
  59. }
  60. check() {
  61. export PYTHON_PATH='/usr/bin/python2'
  62. cd "$srcdir/$pkgname-$pkgver"
  63. local jobs
  64. jobs=$(expr "$MAKEFLAGS" : '.*\(-j[0-9]*\).*') || true
  65. mkdir -p /dev/shm/git-test
  66. # explicitly specify SHELL to avoid a test failure in t/t9903-bash-prompt.sh
  67. # which is caused by 'git rebase' trying to use builduser's SHELL inside the
  68. # build chroot (i.e.: /usr/bin/nologin)
  69. SHELL=/bin/sh \
  70. make \
  71. "${_make_paths[@]}" \
  72. "${_make_options[@]}" \
  73. NO_SVN_TESTS=y \
  74. DEFAULT_TEST_TARGET=prove \
  75. GIT_PROVE_OPTS="$jobs -Q" \
  76. GIT_TEST_OPTS="--root=/dev/shm/git-test" \
  77. test
  78. }
  79. package() {
  80. export PYTHON_PATH='/usr/bin/python2'
  81. cd "$srcdir/$pkgname-$pkgver"
  82. make \
  83. "${_make_paths[@]}" \
  84. "${_make_options[@]}" \
  85. DESTDIR="$pkgdir" \
  86. install install-man
  87. # bash completion
  88. mkdir -p "$pkgdir"/usr/share/bash-completion/completions/
  89. install -m 0644 ./contrib/completion/git-completion.bash "$pkgdir"/usr/share/bash-completion/completions/git
  90. # fancy git prompt
  91. mkdir -p "$pkgdir"/usr/share/git/
  92. install -m 0644 ./contrib/completion/git-prompt.sh "$pkgdir"/usr/share/git/git-prompt.sh
  93. # gnome credentials helper (deprecated, but we will keep it as long there is no extra cost)
  94. # https://gitlab.gnome.org/GNOME/libgnome-keyring/commit/6a5adea4aec93
  95. install -m 0755 contrib/credential/gnome-keyring/git-credential-gnome-keyring \
  96. "$pkgdir"/usr/lib/git-core/git-credential-gnome-keyring
  97. make -C contrib/credential/gnome-keyring clean
  98. # libsecret credentials helper
  99. install -m 0755 contrib/credential/libsecret/git-credential-libsecret \
  100. "$pkgdir"/usr/lib/git-core/git-credential-libsecret
  101. make -C contrib/credential/libsecret clean
  102. # subtree installation
  103. make -C contrib/subtree "${_make_paths[@]}" DESTDIR="$pkgdir" install install-man
  104. # mediawiki installation
  105. make -C contrib/mw-to-git "${_make_paths[@]}" DESTDIR="$pkgdir" install
  106. # the rest of the contrib stuff
  107. find contrib/ -name '.gitignore' -delete
  108. cp -a ./contrib/* $pkgdir/usr/share/git/
  109. # scripts are for python 2.x
  110. sed -i 's|#![ ]*/usr/bin/env python$|#!/usr/bin/env python2|' \
  111. $(find "$pkgdir" -name '*.py') \
  112. "$pkgdir"/usr/share/git/remote-helpers/git-remote-bzr \
  113. "$pkgdir"/usr/share/git/remote-helpers/git-remote-hg
  114. sed -i 's|#![ ]*/usr/bin/python$|#!/usr/bin/python2|' \
  115. "$pkgdir"/usr/share/git/svn-fe/svnrdump_sim.py
  116. # sysusers file
  117. install -D -m 0644 "$srcdir"/git-sysusers.conf "$pkgdir"/usr/lib/sysusers.d/git.conf
  118. }