diff options
Diffstat (limited to 'community/git-branchless/APKBUILD')
-rw-r--r-- | community/git-branchless/APKBUILD | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/community/git-branchless/APKBUILD b/community/git-branchless/APKBUILD new file mode 100644 index 00000000000..1c900397820 --- /dev/null +++ b/community/git-branchless/APKBUILD @@ -0,0 +1,72 @@ +# Contributor: Jakub Jirutka <jakub@jirutka.cz> +# Maintainer: Jakub Jirutka <jakub@jirutka.cz> +pkgname=git-branchless +pkgver=0.8.0 +pkgrel=0 +pkgdesc="Suite of tools to help you visualize, navigate, manipulate, and repair your commit graph" +url="https://github.com/arxanas/git-branchless" +# riscv64: test fails +# s390x: nix crate fails to build +arch="all !riscv64 !s390x" +license="GPL-2.0-only" +makedepends=" + cargo + cargo-auditable + libgit2-dev + libssh2-dev + openssl-dev>3 + sqlite-dev + " +checkdepends=" + bash + git + " +source="https://github.com/arxanas/git-branchless/archive/v$pkgver/git-branchless-$pkgver.tar.gz + unbundle-sqlite.patch + " +options="net" + +export LIBSSH2_SYS_USE_PKG_CONFIG=1 # use system libssh2 + +prepare() { + default_prepare + + # Rust target triple. + local target=$(rustc -vV | sed -n 's/host: //p') + + # Build against system-provided libs + mkdir -p .cargo + cat >> .cargo/config.toml <<-EOF + [target.$target] + git2 = { rustc-link-lib = ["git2"] } + EOF + + cargo fetch --target="$CTARGET" --locked +} + +build() { + cargo auditable build --frozen --release +} + +check() { + # NOTE: The first two skipped tests hang on CI, see + # https://github.com/arxanas/git-branchless/pull/159 for more info. + # The other two are probably broken. + TEST_GIT_EXEC_PATH=$(git --exec-path) \ + TEST_GIT=$(which git) \ + RUST_BACKTRACE=1 \ + cargo test --workspace --frozen -- \ + --skip=test_checkout_pty \ + --skip=test_next_ambiguous_interactive \ + --skip=command::test_test::test_test_config_strategy \ + --skip=command::test_test::test_test_verbosity +} + +package() { + install -D -m755 target/release/git-branchless -t "$pkgdir"/usr/bin/ +} + +sha512sums=" +ad3435948ffabe256fff2f7b0fe654818fc280049fea0df845ce593ccd713faf5988c843062cfae28c10641c84ed15abaeb0ae774d21e88364f83c0c82852964 git-branchless-0.8.0.tar.gz +a6edb671e188bb53cbe43c760c922233ed9e2e7cfdc3d2a32a020dfb847cff413a0c30333d03e76acf920459c438672cd2b975d515b57bfddd1ecc1bbceb1de4 unbundle-sqlite.patch +" |