1 # Maintainer: Christian Hesse <mail@eworm.de>
2 # Maintainer: Dan McGee <dan@archlinux.org>
7 pkgdesc='the fast distributed version control system'
9 url='https://git-scm.com/'
11 depends=('curl' 'expat' 'perl' 'perl-error' 'perl-mailtools'
12 'openssl' 'pcre2' 'grep' 'shadow' 'zlib')
13 makedepends=('python' 'libgnome-keyring' 'xmlto' 'asciidoc')
14 optdepends=('tk: gitk and git gui'
15 'perl-libwww: git svn'
16 'perl-term-readkey: git svn and interactive.singlekey setting'
17 'perl-io-socket-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 'python: git svn & git p4'
25 'org.freedesktop.secrets: keyring credential helper'
26 'libsecret: libsecret credential helper')
29 validpgpkeys=('96E07AF25771955980DAD10020D04E5A713660A7') # Junio C Hamano
30 source=("https://www.kernel.org/pub/software/scm/git/git-$pkgver.tar."{xz,sign}
34 sha256sums=('97ddf8ea58a2b9e0fbc2508e245028ca75911bd38d1551616b148c1aa5740ad9'
36 '14c0b67cfe116b430645c19d8c4759419657e6809dfa28f438c33a005245ad91'
37 'ac4c90d62c44926e6d30d18d97767efc901076d4e0283ed812a349aece72f203'
38 '7630e8245526ad80f703fac9900a1328588c503ce32b37b9f8811674fcda4a45')
42 gitexecdir='/usr/lib/git-core'
43 perllibdir="$(/usr/bin/perl -MConfig -wle 'print $Config{installvendorlib}')"
51 NO_PERL_CPAN_FALLBACKS=1
56 cd "$srcdir/$pkgname-$pkgver"
60 "${_make_options[@]}" \
63 make -C contrib/credential/gnome-keyring
64 make -C contrib/credential/libsecret
65 make -C contrib/subtree "${_make_paths[@]}" all man
66 make -C contrib/mw-to-git "${_make_paths[@]}" all
67 make -C contrib/diff-highlight "${_make_paths[@]}"
71 cd "$srcdir/$pkgname-$pkgver"
74 jobs=$(expr "$MAKEFLAGS" : '.*\(-j[0-9]*\).*') || true
75 mkdir -p /dev/shm/git-test
76 # explicitly specify SHELL to avoid a test failure in t/t9903-bash-prompt.sh
77 # which is caused by 'git rebase' trying to use builduser's SHELL inside the
78 # build chroot (i.e.: /usr/bin/nologin)
82 "${_make_options[@]}" \
84 DEFAULT_TEST_TARGET=prove \
85 GIT_PROVE_OPTS="$jobs -Q" \
86 GIT_TEST_OPTS="--root=/dev/shm/git-test" \
91 cd "$srcdir/$pkgname-$pkgver"
95 "${_make_options[@]}" \
100 mkdir -p "$pkgdir"/usr/share/bash-completion/completions/
101 install -m 0644 ./contrib/completion/git-completion.bash "$pkgdir"/usr/share/bash-completion/completions/git
103 mkdir -p "$pkgdir"/usr/share/git/
104 install -m 0644 ./contrib/completion/git-prompt.sh "$pkgdir"/usr/share/git/git-prompt.sh
105 # gnome credentials helper (deprecated, but we will keep it as long there is no extra cost)
106 # https://gitlab.gnome.org/GNOME/libgnome-keyring/commit/6a5adea4aec93
107 install -m 0755 contrib/credential/gnome-keyring/git-credential-gnome-keyring \
108 "$pkgdir"/usr/lib/git-core/git-credential-gnome-keyring
109 make -C contrib/credential/gnome-keyring clean
110 # libsecret credentials helper
111 install -m 0755 contrib/credential/libsecret/git-credential-libsecret \
112 "$pkgdir"/usr/lib/git-core/git-credential-libsecret
113 make -C contrib/credential/libsecret clean
114 # subtree installation
115 make -C contrib/subtree "${_make_paths[@]}" DESTDIR="$pkgdir" install install-man
116 # mediawiki installation
117 make -C contrib/mw-to-git "${_make_paths[@]}" DESTDIR="$pkgdir" install
118 # the rest of the contrib stuff
119 find contrib/ -name '.gitignore' -delete
120 cp -a ./contrib/* "$pkgdir"/usr/share/git/
122 # git-daemon via systemd socket activation
123 install -D -m 0644 "$srcdir"/git-daemon@.service "$pkgdir"/usr/lib/systemd/system/git-daemon@.service
124 install -D -m 0644 "$srcdir"/git-daemon.socket "$pkgdir"/usr/lib/systemd/system/git-daemon.socket
127 install -D -m 0644 "$srcdir"/git-sysusers.conf "$pkgdir"/usr/lib/sysusers.d/git.conf