void-packages/srcpkgs/chroot-git/template
2021-10-20 20:59:40 +07:00

71 lines
1.6 KiB
Bash

# Template file for 'chroot-git'
pkgname=chroot-git
version=2.33.1
revision=1
bootstrap=yes
wrksrc="git-${version}"
makedepends="zlib-devel"
short_desc="GIT Tree History Storage Tool -- for xbps-src use"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-2.0-only"
homepage="https://git-scm.com/"
distfiles="https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz"
checksum=e054a6e6c2b088bd1bff5f61ed9ba5aa91c9a3cd509539a4b41c5ddf02201f2f
if [ "$CHROOT_READY" ]; then
checkdepends="perl gnupg"
fi
do_configure() {
cat <<-EOF >config.mak
prefix = /usr
CC = $CC
AR = $AR
TAR = $(command -v bsdtar || command -v tar)
CFLAGS = $CFLAGS
LDFLAGS = $LDFLAGS
CC_LD_DYNPATH=-L
SKIP_DASHED_BUILT_INS = Yes
NO_GETTEXT=Yes
NO_OPENSSL = Yes
USE_LIBPCRE :=
USE_LIBPCRE2 :=
NO_CURL = Yes
NO_EXPAT = Yes
NO_PERL = Yes
NO_PYTHON = Yes
NO_TCLTK = Yes
DEFAULT_TEST_TARGET = prove
GIT_PROVE_OPTS = $makejobs
# firstword (uname -m)
HOST_CPU = ${XBPS_TARGET_MACHINE%-musl}
SKIP_DASHED_BUILT_INS = Yes
gitexecdir = libexec/chroot-git
EOF
if [ "$XBPS_TARGET_LIBC" = musl ]; then
cat <<-EOF >>config.mak
ICONV_OMITS_BOM = Yes
NO_REGEX = Yes
EOF
fi
if ! [ "$CHROOT_READY" ]; then
echo "ZLIB_PATH = ${XBPS_MASTERDIR}/usr" >>config.mak
fi
}
do_build() {
make ${makejobs} git
}
do_check() {
make test
}
do_install() {
vbin git chroot-git
vmkdir usr/libexec/chroot-git
ln -s ../../bin/chroot-git $DESTDIR/usr/libexec/chroot-git/git
ln -s git $DESTDIR/usr/libexec/chroot-git/git-upload-pack
ln -s git $DESTDIR/usr/libexec/chroot-git/git-receive-pack
}