mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-05-09 00:14:23 +02:00
testing/tiny: new aport
https://github.com/osa1/tiny Terminal IRC client written in Rust
This commit is contained in:
parent
28e311d837
commit
52cb8ea93d
3 changed files with 115 additions and 0 deletions
67
testing/tiny/APKBUILD
Normal file
67
testing/tiny/APKBUILD
Normal file
|
@ -0,0 +1,67 @@
|
|||
# Maintainer: Celeste <cielesti@protonmail.com>
|
||||
maintainer="Celeste <cielesti@protonmail.com>"
|
||||
pkgname=tiny
|
||||
pkgver=0.12.0
|
||||
pkgrel=0
|
||||
pkgdesc="Terminal IRC client written in Rust"
|
||||
url="https://github.com/osa1/tiny"
|
||||
# s390x: fails to build due to nix crate
|
||||
arch="all !s390x"
|
||||
license="MIT"
|
||||
makedepends="
|
||||
cargo
|
||||
cargo-auditable
|
||||
openssl-dev
|
||||
"
|
||||
subpackages="$pkgname-doc"
|
||||
source="https://github.com/osa1/tiny/archive/v$pkgver/tiny-$pkgver.tar.gz
|
||||
update-cargo-lock.patch
|
||||
nix-crate-loongarch64_patch
|
||||
"
|
||||
|
||||
_cargo_opts="--frozen --no-default-features --features=tls-native"
|
||||
|
||||
# taken from main/rust/APKBUILD
|
||||
_clear_vendor_checksums() {
|
||||
sed -i 's/\("files":{\)[^}]*/\1/' vendor/$1/.cargo-checksum.json
|
||||
}
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
cargo vendor --locked
|
||||
|
||||
_clear_vendor_checksums nix
|
||||
patch vendor/nix/src/sys/ioctl/linux.rs \
|
||||
"$srcdir"/nix-crate-loongarch64_patch
|
||||
|
||||
mkdir -p .cargo
|
||||
cat >> .cargo/config.toml <<-EOF
|
||||
[source.crates-io]
|
||||
replace-with = "vendored-sources"
|
||||
|
||||
[source.vendored-sources]
|
||||
directory = "vendor"
|
||||
EOF
|
||||
}
|
||||
|
||||
build() {
|
||||
cargo auditable build $_cargo_opts --release
|
||||
}
|
||||
|
||||
check() {
|
||||
cargo test $_cargo_opts
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dvm755 target/release/tiny -t "$pkgdir"/usr/bin/
|
||||
|
||||
install -Dvm644 README.md -t "$pkgdir"/usr/share/doc/$pkgname/
|
||||
install -Dvm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
59822399408760a5120203f3d8e82a0144cbed462a93b915bf812f943acaaab6ead988fd016c9e20e095d0b4338ad226c3bad31b4533dcb18591996b7fe4b404 tiny-0.12.0.tar.gz
|
||||
9c27793f1bf594ab2d5c2be77ffb901307eed4c09b2c0beff9058760a1217faa206e91fecbc9229aadd0e1b46c2ef1ce9964d85d9b6ec58754716b6f577df1d8 update-cargo-lock.patch
|
||||
14ffe9ec16139856f428c52d19c3b03fbcc1e10c23aff2bf33679f46552d089f6ee1fae968ceeeb691cff757d55ac631d9d6040780bd8c2a99cdff75df8f3a67 nix-crate-loongarch64_patch
|
||||
"
|
25
testing/tiny/nix-crate-loongarch64_patch
Normal file
25
testing/tiny/nix-crate-loongarch64_patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
Patch-Source: https://github.com/nix-rust/nix/commit/981dc1c02d878870dd19699c15f9bb99a98a9bab.patch
|
||||
--
|
||||
From 2589f437f288ff756cc66f987a62c01a0bf1110e Mon Sep 17 00:00:00 2001
|
||||
From: WANG Rui <wangrui@loongson.cn>
|
||||
Date: Mon, 29 May 2023 21:46:47 +0800
|
||||
Subject: [PATCH] Add support for LoongArch
|
||||
|
||||
---
|
||||
src/sys/ioctl/linux.rs | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/sys/ioctl/linux.rs b/src/sys/ioctl/linux.rs
|
||||
index 0c0a209053..669d517906 100644
|
||||
--- a/src/sys/ioctl/linux.rs
|
||||
+++ b/src/sys/ioctl/linux.rs
|
||||
@@ -42,7 +42,8 @@ mod consts {
|
||||
target_arch = "x86_64",
|
||||
target_arch = "aarch64",
|
||||
target_arch = "riscv32",
|
||||
- target_arch = "riscv64"
|
||||
+ target_arch = "riscv64",
|
||||
+ target_arch = "loongarch64"
|
||||
))]
|
||||
mod consts {
|
||||
#[doc(hidden)]
|
23
testing/tiny/update-cargo-lock.patch
Normal file
23
testing/tiny/update-cargo-lock.patch
Normal file
|
@ -0,0 +1,23 @@
|
|||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -668,9 +668,9 @@
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
-version = "0.2.149"
|
||||
+version = "0.2.161"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b"
|
||||
+checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1"
|
||||
|
||||
[[package]]
|
||||
name = "libtiny_client"
|
||||
@@ -1542,7 +1542,7 @@
|
||||
|
||||
[[package]]
|
||||
name = "tiny"
|
||||
-version = "0.11.0"
|
||||
+version = "0.12.0"
|
||||
dependencies = [
|
||||
"dirs",
|
||||
"env_logger",
|
Loading…
Add table
Add a link
Reference in a new issue