mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-10 11:11:40 +01:00
82 lines
2.0 KiB
Plaintext
82 lines
2.0 KiB
Plaintext
# Contributor: Celeste <cielesti@protonmail.com>
|
|
# Maintainer: Celeste <cielesti@protonmail.com>
|
|
pkgname=jujutsu
|
|
pkgver=0.11.0
|
|
pkgrel=0
|
|
pkgdesc="Git-compatible distributed version control system"
|
|
url="https://github.com/martinvonz/jj"
|
|
# armhf, armv7, x86: tests fail
|
|
arch="all !armhf !armv7 !x86"
|
|
license="Apache-2.0"
|
|
makedepends="
|
|
cargo
|
|
cargo-auditable
|
|
libgit2-dev
|
|
libssh-dev
|
|
openssl-dev
|
|
zstd-dev
|
|
"
|
|
subpackages="
|
|
$pkgname-doc
|
|
$pkgname-bash-completion
|
|
$pkgname-fish-completion
|
|
$pkgname-zsh-completion
|
|
"
|
|
source="https://github.com/martinvonz/jj/archive/v$pkgver/jujutsu-$pkgver.tar.gz
|
|
libgit2-1.7-expected-error.patch
|
|
"
|
|
builddir="$srcdir/jj-$pkgver"
|
|
|
|
export LIBSSH2_SYS_USE_PKG_CONFIG=1
|
|
export ZSTD_SYS_USE_PKG_CONFIG=1
|
|
|
|
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 --bin jj
|
|
|
|
for shell in bash fish zsh; do
|
|
./target/release/jj util completion --$shell > jj.$shell
|
|
done
|
|
|
|
./target/release/jj util mangen > jj.1
|
|
}
|
|
|
|
check() {
|
|
cargo test --frozen
|
|
}
|
|
|
|
package() {
|
|
install -Dvm755 target/release/jj -t "$pkgdir"/usr/bin/
|
|
|
|
install -Dvm644 jj.bash \
|
|
"$pkgdir"/usr/share/bash-completion/completions/jj
|
|
install -Dvm644 jj.fish \
|
|
"$pkgdir"/usr/share/fish/vendor_completions.d/jj.fish
|
|
install -Dvm644 jj.zsh \
|
|
"$pkgdir"/usr/share/zsh/site-functions/_jj
|
|
|
|
install -Dvm644 jj.1 -t "$pkgdir"/usr/share/man/man1/
|
|
install -dvm755 "$pkgdir"/usr/share/doc
|
|
cp -av docs "$pkgdir"/usr/share/doc/$pkgname
|
|
}
|
|
|
|
sha512sums="
|
|
7d05f8ed1370a42ef07aa764063e7f7426d60c459bac036ebe500687854a6e3909bd4b6e4e40b9389d31f31270a6944163faf9485001c6ce46200c0f19900a86 jujutsu-0.11.0.tar.gz
|
|
ea7d35effcec09745ff73637855cf23c867f70ef63c849a4aa07bc4a0943ea0395dd2d72f4e2180bfe70e7c96aaed1f43da7b456da1a2ab3dfa7e18b1b61aee2 libgit2-1.7-expected-error.patch
|
|
"
|