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')
28 validpgpkeys=('96E07AF25771955980DAD10020D04E5A713660A7') # Junio C Hamano
29 source=("https://www.kernel.org/pub/software/scm/git/git-$pkgver.tar."{xz,sign}
33 sha256sums=('4893b8b98eefc9fdc4b0e7ca249e340004faa7804a433d17429e311e1fef21d2'
35 '14c0b67cfe116b430645c19d8c4759419657e6809dfa28f438c33a005245ad91'
36 'ac4c90d62c44926e6d30d18d97767efc901076d4e0283ed812a349aece72f203'
37 '7630e8245526ad80f703fac9900a1328588c503ce32b37b9f8811674fcda4a45')
41 gitexecdir='/usr/lib/git-core'
42 perllibdir="$(/usr/bin/perl -MConfig -wle 'print $Config{installvendorlib}')"
50 NO_PERL_CPAN_FALLBACKS=1
55 cd "$srcdir/$pkgname-$pkgver"
59 "${_make_options[@]}" \
62 make -C contrib/credential/gnome-keyring
63 make -C contrib/credential/libsecret
64 make -C contrib/subtree "${_make_paths[@]}" all man
65 make -C contrib/mw-to-git "${_make_paths[@]}" all
66 make -C contrib/diff-highlight "${_make_paths[@]}"
70 cd "$srcdir/$pkgname-$pkgver"
73 jobs=$(expr "$MAKEFLAGS" : '.*\(-j[0-9]*\).*') || true
74 mkdir -p /dev/shm/git-test
75 # explicitly specify SHELL to avoid a test failure in t/t9903-bash-prompt.sh
76 # which is caused by 'git rebase' trying to use builduser's SHELL inside the
77 # build chroot (i.e.: /usr/bin/nologin)
81 "${_make_options[@]}" \
83 DEFAULT_TEST_TARGET=prove \
84 GIT_PROVE_OPTS="$jobs -Q" \
85 GIT_TEST_OPTS="--root=/dev/shm/git-test" \
90 cd "$srcdir/$pkgname-$pkgver"
94 "${_make_options[@]}" \
99 mkdir -p "$pkgdir"/usr/share/bash-completion/completions/
100 install -m 0644 ./contrib/completion/git-completion.bash "$pkgdir"/usr/share/bash-completion/completions/git
102 mkdir -p "$pkgdir"/usr/share/git/
103 install -m 0644 ./contrib/completion/git-prompt.sh "$pkgdir"/usr/share/git/git-prompt.sh
104 # gnome credentials helper (deprecated, but we will keep it as long there is no extra cost)
105 # https://gitlab.gnome.org/GNOME/libgnome-keyring/commit/6a5adea4aec93
106 install -m 0755 contrib/credential/gnome-keyring/git-credential-gnome-keyring \
107 "$pkgdir"/usr/lib/git-core/git-credential-gnome-keyring
108 make -C contrib/credential/gnome-keyring clean
109 # libsecret credentials helper
110 install -m 0755 contrib/credential/libsecret/git-credential-libsecret \
111 "$pkgdir"/usr/lib/git-core/git-credential-libsecret
112 make -C contrib/credential/libsecret clean
113 # subtree installation
114 make -C contrib/subtree "${_make_paths[@]}" DESTDIR="$pkgdir" install install-man
115 # mediawiki installation
116 make -C contrib/mw-to-git "${_make_paths[@]}" DESTDIR="$pkgdir" install
117 # the rest of the contrib stuff
118 find contrib/ -name '.gitignore' -delete
119 cp -a ./contrib/* "$pkgdir"/usr/share/git/
121 # git-daemon via systemd socket activation
122 install -D -m 0644 "$srcdir"/git-daemon@.service "$pkgdir"/usr/lib/systemd/system/git-daemon@.service
123 install -D -m 0644 "$srcdir"/git-daemon.socket "$pkgdir"/usr/lib/systemd/system/git-daemon.socket
126 install -D -m 0644 "$srcdir"/git-sysusers.conf "$pkgdir"/usr/lib/sysusers.d/git.conf