pkgname=git pkgver=2.48.1 pkgrel=1 pkgdesc="the fast distributed version control system" arch=('x86_64') url="https://git-scm.com/" license=('GPL-2.0-only') depends=( 'curl' 'expat' 'grep' 'openssl' 'pcre2' 'perl' 'perl-error' 'perl-mailtools' 'shadow' 'zlib' ) makedepends=('python' 'python-asciidoc' 'xmlto') install=${pkgname}.install source=(https://www.kernel.org/pub/software/scm/${pkgname}/${pkgname}-${pkgver}.tar.xz git-daemon@.service git-daemon.socket git-sysusers.conf) sha256sums=(1c5d545f5dc1eb51e95d2c50d98fdf88b1a36ba1fa30e9ae5d5385c6024f82ad e2eb9f9ec9a4b6ec370eeee9be49030ae9557c92d18fcaffcaf9223a02362207 ac4c90d62c44926e6d30d18d97767efc901076d4e0283ed812a349aece72f203 7630e8245526ad80f703fac9900a1328588c503ce32b37b9f8811674fcda4a45) build() { cd ${pkgname}-${pkgver} export CFLAGS="$C{FLAGS}" export LDFLAGS="${LDFLAGS}" export INSTALL_SYMLINKS=1 export MAN_BOLD_LITERAL=1 export NO_PERL_CPAN_FALLBACKS=1 export USE_LIBPCRE2=1 local configure_args=( --with-gitconfig=/etc/gitconfig --with-python=python3 --with-libpcre2 --with-expat --with-curl --with-editor=/usr/bin/vim ${configure_options} ) ./configure ${configure_args[@]} make make html make man } package() { cd ${pkgname}-${pkgver} make DESTDIR=${pkgdir} perllibdir=/usr/lib64/perl5/5.40/site_perl install make DESTDIR=${pkgdir} install-man make DESTDIR=${pkgdir} htmldir=/usr/share/doc/${pkgname}-${pkgver} install-html install -vdm755 ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/man-pages/{html,text} mv ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/{git*.txt,man-pages/text} mv ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/{git*.,index.,man-pages/}html install -vdm755 ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/technical/{html,text} mv ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/technical/{*.txt,text} mv ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/technical/{*.,}html install -vdm755 ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/howto/{html,text} mv ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/howto/{*.txt,text} mv ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/howto/{*.,}html sed -i '/^