85 lines
1.9 KiB
Bash
85 lines
1.9 KiB
Bash
# Template file for 'chroot-git'
|
|
pkgname=chroot-git
|
|
version=2.40.1
|
|
revision=1
|
|
bootstrap=yes
|
|
makedepends="zlib-devel"
|
|
short_desc="GIT Tree History Storage Tool -- for xbps-src use"
|
|
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
|
|
license="GPL-2.0-only"
|
|
homepage="https://git-scm.com/"
|
|
distfiles="https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz"
|
|
checksum=4893b8b98eefc9fdc4b0e7ca249e340004faa7804a433d17429e311e1fef21d2
|
|
repository=bootstrap
|
|
|
|
if [ "$CHROOT_READY" ]; then
|
|
checkdepends="perl gnupg"
|
|
makedepends+=" libcurl-devel"
|
|
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
|
|
NO_GETTEXT=Yes
|
|
NO_OPENSSL = Yes
|
|
USE_LIBPCRE :=
|
|
USE_LIBPCRE2 :=
|
|
NO_EXPAT = Yes
|
|
NO_PERL = Yes
|
|
NO_PYTHON = Yes
|
|
NO_TCLTK = Yes
|
|
# 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
|
|
cat <<-EOF >>config.mak
|
|
ZLIB_PATH = ${XBPS_MASTERDIR}/usr
|
|
NO_CURL = Yes
|
|
EOF
|
|
fi
|
|
}
|
|
|
|
do_build() {
|
|
make ${makejobs} git
|
|
if [ "$CHROOT_READY" ]; then
|
|
make ${makejobs} git-http-fetch git-remote-http
|
|
fi
|
|
}
|
|
|
|
do_check() {
|
|
if [ "$CHROOT_READY" ] && [ "$XBPS_ALLOW_CHROOT_BREAKOUT" ]; then
|
|
export IKNOWWHATIAMDOING=YES
|
|
fi
|
|
make test ${makejobs}
|
|
}
|
|
|
|
do_install() {
|
|
vmkdir usr/bin
|
|
vmkdir usr/libexec/chroot-git
|
|
vbin git chroot-git
|
|
vinstall git 755 usr/libexec/chroot-git
|
|
ln -s git $DESTDIR/usr/libexec/chroot-git/git-upload-pack
|
|
ln -s git $DESTDIR/usr/libexec/chroot-git/git-receive-pack
|
|
if [ "$CHROOT_READY" ]; then
|
|
vinstall git-http-fetch 755 usr/libexec/chroot-git
|
|
vinstall git-remote-http 755 usr/libexec/chroot-git
|
|
ln -s git-remote-http \
|
|
$DESTDIR/usr/libexec/chroot-git/git-remote-https
|
|
fi
|
|
}
|