NAME="git"
DESC="Free and open source, distributed version control system"
VERSION="2.41.0"
FILES=(
  "https://www.kernel.org/pub/software/scm/git/git-$VERSION.tar.xz"
  "https://www.kernel.org/pub/software/scm/git/git-manpages-$VERSION.tar.xz"
)
HASHES=(
  "c1f58a12b891ad73927b8e4a3aa29c7b"
  "bc7a4c944492c76fc3cd766ce22e826d0241e43792c611d4fdc068e0df545877"
)
DEPENDS=("curl")

PACKAGE() {
  tar xf $NAME-$VERSION.tar.xz
  cd $NAME-$VERSION

  ./configure --prefix=/usr \
            --with-gitconfig=/etc/gitconfig \
            --with-python=python3 
  make && make DESTDIR=$ROOTDIR perllibdir=/usr/lib/perl5/5.38/site_perl install 

  mkdir -pv $ROOTDIR/usr/share/man
  tar -xf ../git-manpages-$VERSION.tar.xz \
    -C $ROOTDIR/usr/share/man --no-same-owner --no-overwrite-dir

  cd .. && rm -rf $NAME-$VERSION
}
