Update dependencies and source.sh script

This commit is contained in:
2025-10-25 15:09:56 +03:00
parent 26f1f93895
commit 7428f5191e
2 changed files with 35 additions and 10 deletions
+26 -5
View File
@@ -2,28 +2,49 @@
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
_make() {
local MAKE_OPTS=(
prefix=/usr
perllibdir=$(/usr/bin/perl -MConfig -wle 'print $Config{installvendorlib}')
CFLAGS="$CFLAGS"
LDFLAGS="$LDFLAGS"
INSTALL_SYMLINKS=1
MAN_BOLD_LITERAL=1
NO_PERL_CPAN_FALLBACKS=1
USE_LIBPCRE2=1
)
echo "${MAKE_OPTS[@]}"
make "${MAKE_OPTS[@]}" "$@"
}
# The build function is executed in the source directory
# This function is used to compile the source code
build() {
./configure --prefix=/usr --with-gitconfig=/etc/gitconfig --with-python=python3 --with-libpcre2
_make
# Compile git and its documentation
make all man
_make all man
# Compile libsecret credential helper
make -C contrib/credential/libsecret
_make -C contrib/credential/libsecret
}
# The check function is executed in the source directory
# This function is used to run tests to verify the package has been compiled correctly
check() {
SHELL=/bin/sh NO_SVN_TESTS=y DEFAULT_TEST_TARGET=prove GIT_TEST_OPTS="--root=/dev/shm/git-test" GIT_UNZIP=nonexist make test
# place the socket in /tmp to make the test succeed
sed -i '/eval/s|ssh-agent|ssh-agent -T|' t/t7528-signed-commit-ssh.sh
_make SHELL=/bin/sh NO_SVN_TESTS=y DEFAULT_TEST_TARGET=prove GIT_TEST_OPTS="--root=/dev/shm/git-test" test
}
# The package function is executed in the source directory
# This function is used to move the compiled files into the output directory
package() {
make perllibdir=$(/usr/bin/perl -MConfig -wle 'print $Config{installvendorlib}') DESTDIR="$BPM_OUTPUT" install install-man
_make DESTDIR="$BPM_OUTPUT" install install-man
# Install bash completions
install -Dm644 contrib/completion/git-completion.bash "$BPM_OUTPUT"/usr/share/bash-completion/completions/git