aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2022-05-08 23:29:09 +0200
committerJakub Jirutka <jakub@jirutka.cz>2022-05-08 23:38:38 +0200
commit446d4e0ce1a219c33a8aee83a704ab9c9d7dc812 (patch)
tree41b1d10bc4b05729d94c1e055641a1b55f9c2fa1
parent74bda8e23bafd485570d0b144f3cfdd7aac7f631 (diff)
community/cargo-edit: build with system libgit2 and libssh2
-rw-r--r--community/cargo-edit/APKBUILD21
1 files changed, 14 insertions, 7 deletions
diff --git a/community/cargo-edit/APKBUILD b/community/cargo-edit/APKBUILD
index 423cc57bd81..02ce5ab19ec 100644
--- a/community/cargo-edit/APKBUILD
+++ b/community/cargo-edit/APKBUILD
@@ -9,13 +9,22 @@ url="https://github.com/killercup/cargo-edit"
# ppc64le blocked by ring crate
arch="all !s390x !ppc64le !riscv64"
license="MIT OR Apache-2.0"
-makedepends="cargo libgit2-dev"
+makedepends="
+ cargo
+ libgit2-dev
+ libssh2-dev
+ "
subpackages="$pkgname-doc"
options="net"
source="$pkgname-$pkgver.tar.gz::https://github.com/killercup/cargo-edit/archive/v$pkgver.tar.gz
$pkgname-39c1d03-fix-test.patch::https://github.com/killercup/cargo-edit/commit/39c1d0381f81c8b35afbec7cd5daae9d2896c7da.patch
"
+export LIBSSH2_SYS_USE_PKG_CONFIG=1 # use system libssh2
+
+# Exclude vendored-libgit2 feature.
+_cargo_opts="--frozen --no-default-features --features add,rm,upgrade,set-version"
+
prepare() {
default_prepare
@@ -23,20 +32,18 @@ prepare() {
}
build() {
- cargo build --release --frozen
+ cargo build $_cargo_opts --release
}
check() {
- cargo test --frozen
+ cargo test $_cargo_opts
}
package() {
- cargo install --locked --root "$pkgdir/usr" --path .
+ cargo install $_cargo_opts --offline --path . --root "$pkgdir/usr"
+ rm "$pkgdir"/usr/.crates*
install -Dm 644 -t "$pkgdir/usr/share/doc/cargo-edit" README.md
-
- rm "$pkgdir"/usr/.crates.toml
- rm "$pkgdir"/usr/.crates2.json
}
sha512sums="