diff --git a/pkg.info b/pkg.info index 9454173..13644e5 100644 --- a/pkg.info +++ b/pkg.info @@ -1,25 +1,29 @@ name: git description: A free and open source distributed version control system version: 2.51.1 -revision: 1 +revision: 2 url: https://git-scm.com/ license: GPL2-only architecture: any type: source depends: + - curl - expat + - grep + - openssl - pcre2 + - perl + - perl-error + - perl-mailtools + - shadow - zlib optional_depends: - - curl + - less - libsecret - openssh - python3 make_depends: - asciidoc - - gettext - - perl - - pkgconf - openssh - python3 - xmlto diff --git a/source.sh b/source.sh index e15897f..aa0139f 100644 --- a/source.sh +++ b/source.sh @@ -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