Skip to content

Commit c824812

Browse files
committed
addpkg: yes-rs
Signed-off-by: Roald Clark <roaldclark@gmail.com>
1 parent fc4bb12 commit c824812

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

archlinuxcn/yes-rs/PKGBUILD

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Maintainer: Roald Clark <roaldclark@gmail.com>
2+
3+
_name=yes-rs
4+
pkgname="${_name}"
5+
pkgver=0.1.0
6+
pkgrel=1
7+
pkgdesc="A blazingly fast, memory-safe rewrite of the classic Unix 'yes' command"
8+
arch=(
9+
'aarch64'
10+
'x86_64'
11+
)
12+
url="https://github.com/jedisct1/${_name}"
13+
license=(
14+
'Apache-2.0'
15+
'MIT'
16+
)
17+
depends=(
18+
'gcc-libs'
19+
'glibc'
20+
)
21+
makedepends=(
22+
'cargo'
23+
)
24+
source=("${_name}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
25+
b2sums=('e51509a2467ce43fa6f79dc1ab1a202f0c5e23ee252e1d14387b619c6ae5ba1ee58ad27b90071e35e6506ffdd9cee60f2f40ca4fa6564e94b6a4f74ac0656b9d')
26+
27+
prepare() {
28+
cd "${srcdir}/${_name}-${pkgver}"
29+
export RUSTUP_TOOLCHAIN=stable
30+
[[ ! -f "Cargo.lock" ]] && cargo update
31+
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
32+
}
33+
34+
build() {
35+
cd "${srcdir}/${_name}-${pkgver}"
36+
export RUSTUP_TOOLCHAIN=stable
37+
export CARGO_TARGET_DIR=target
38+
cargo build --release --frozen --all-features
39+
}
40+
41+
package() {
42+
cd "${srcdir}/${_name}-${pkgver}"
43+
install -Dm0755 "target/release/${_name}" -t "${pkgdir}/usr/bin/"
44+
}

archlinuxcn/yes-rs/lilac.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
build_prefix: extra-x86_64
2+
pre_build_script: update_pkgver_and_pkgrel(_G.newver)
3+
post_build: git_pkgbuild_commit
4+
update_on:
5+
- source: github
6+
github: jedisct1/yes-rs
7+
use_latest_release: true
8+
include_regex: '^\d+\.\d+\.\d+$'
9+
10+
maintainers:
11+
- github: roaldclark

0 commit comments

Comments
 (0)