aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2020-06-09 17:18:53 +0200
committerJakub Jirutka <jakub@jirutka.cz>2020-06-09 17:19:24 +0200
commit2a35c36d8a16551ca2c11a8fcdde28cb5e676bd7 (patch)
tree8576f204ce4a4db7a6eeac88dd1257cd6539ed0d
parent4428a841f269aec14d6bbd804f1366312d8d4954 (diff)
downloadaports-2a35c36d8a16551ca2c11a8fcdde28cb5e676bd7.tar.gz
aports-2a35c36d8a16551ca2c11a8fcdde28cb5e676bd7.tar.bz2
aports-2a35c36d8a16551ca2c11a8fcdde28cb5e676bd7.tar.xz
testing/choose: new aport
-rw-r--r--testing/choose/APKBUILD41
1 files changed, 41 insertions, 0 deletions
diff --git a/testing/choose/APKBUILD b/testing/choose/APKBUILD
new file mode 100644
index 0000000000..2578a60843
--- /dev/null
+++ b/testing/choose/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=choose
+pkgver=1.2.0
+pkgrel=0
+pkgdesc="A human-friendly and fast alternative to cut and (sometimes) awk"
+url="https://github.com/theryangeary/choose"
+arch="x86_64 armv7 armhf aarch64 x86 ppc64le" # limited by rust/cargo
+license="GPL-3.0-or-later"
+makedepends="cargo"
+source="https://github.com/theryangeary/choose/archive/v$pkgver/choose-$pkgver.tar.gz"
+builddir="$srcdir/choose-$pkgver"
+
+prepare() {
+ default_prepare
+
+ # Optimize binary for size.
+ cat >> Cargo.toml <<-EOF
+
+ [profile.release]
+ codegen-units = 1
+ lto = true
+ opt-level = "z"
+ panic = "abort"
+ EOF
+}
+
+build() {
+ cargo build --release --locked
+}
+
+check() {
+ cargo test --release
+}
+
+package() {
+ cargo install --path . --root="$pkgdir/usr"
+ rm "$pkgdir"/usr/.crates.*
+}
+
+sha512sums="8d7f04850f2856b7291337156f3e3a4401a8e3bae90bbac666d245a2224899ec5e2365430cb6dd49b7b561d97f15b90182b03eaef753fc26575a2529c890dc1b choose-1.2.0.tar.gz"