mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-05 12:26:52 +02:00
testing/dum: new aport
This commit is contained in:
parent
c8b3177e82
commit
6ccd4e72ba
47
testing/dum/APKBUILD
Normal file
47
testing/dum/APKBUILD
Normal file
@ -0,0 +1,47 @@
|
||||
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
||||
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
|
||||
pkgname=dum
|
||||
pkgver=0.1.19
|
||||
pkgrel=0
|
||||
pkgdesc="An npm scripts runner written in Rust"
|
||||
url="https://github.com/egoist/dum"
|
||||
arch="aarch64 armhf armv7 ppc64le x86 x86_64" # blocked by rust/cargo
|
||||
license="MIT"
|
||||
makedepends="cargo"
|
||||
source="https://github.com/egoist/dum/archive/v$pkgver/dum-$pkgver.tar.gz
|
||||
strip-env_logger-features.patch
|
||||
"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
# Optimize binary for size.
|
||||
cat >> Cargo.toml <<-EOF
|
||||
|
||||
[profile.release]
|
||||
codegen-units = 1
|
||||
lto = true
|
||||
opt-level = "s"
|
||||
panic = "abort"
|
||||
EOF
|
||||
|
||||
# No --locked, we have to update lockfile after patching Cargo.toml.
|
||||
cargo fetch
|
||||
}
|
||||
|
||||
build() {
|
||||
cargo build --frozen --release
|
||||
}
|
||||
|
||||
check() {
|
||||
cargo test --frozen
|
||||
}
|
||||
|
||||
package() {
|
||||
install -D -m755 target/release/dum -t "$pkgdir"/usr/bin/
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
ea86635c77a9cc369c3f0d8aa1c3bba3227f2a3132accccaaba4ccadaba9d2231ac149921bb70ba657878e2f6873a78b2cfaf5b4fb1476ebde5ad5b3b8264a3f dum-0.1.19.tar.gz
|
||||
d1834967fc1763723ced5d6ac9c158330daea610780feb91f4d50527040407dedff65f469f7906868172a9e877ae4ad3f2eb547c2f1cd0b305e35c3c36c118f6 strip-env_logger-features.patch
|
||||
"
|
||||
8
testing/dum/strip-env_logger-features.patch
Normal file
8
testing/dum/strip-env_logger-features.patch
Normal file
@ -0,0 +1,8 @@
|
||||
Build env_logger without unnecessary features to reduce the binary size by
|
||||
a factor of two.
|
||||
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -18,1 +18,1 @@
|
||||
-env_logger = "0.9.0"
|
||||
+env_logger = { version = "0.9.0", default-features = false, features = ["humantime"] }
|
||||
Loading…
x
Reference in New Issue
Block a user