Package Details: bash-pinyin-completion-rs 0.2.3-3

Git Clone URL: https://aur.archlinux.org/bash-pinyin-completion-rs.git (read-only, click to copy)
Package Base: bash-pinyin-completion-rs
Description: Simple completion script for pinyin, written in rust.
Upstream URL: https://github.com/AOSC-Dev/bash-pinyin-completion-rs
Keywords: bash bash-completion pinyin
Licenses: GPL-3.0-only
Submitter: Glucy2
Maintainer: Glucy2 (Misaka13514)
Last Packager: Misaka13514
Votes: 1
Popularity: 0.57
First Submitted: 2025-06-12 03:24 (UTC)
Last Updated: 2025-06-12 05:30 (UTC)

Latest Comments

Misaka13514 commented on 2025-06-12 05:35 (UTC)

Thank you @Glucy2! post_install() should be placed in the install file, so I updated the package. I will update this package if there is a new version. Please let me know if anything should be fixed.

Glucy2 commented on 2025-06-12 04:45 (UTC) (edited on 2025-06-12 04:45 (UTC) by Glucy2)

Hi @Misaka13514, I've add you as a co-maintainer.

Misaka13514 commented on 2025-06-12 03:42 (UTC)

Hi, can you add me as a co-maintainer? I also packaged this, and found I am a few minutes late to push.

  1. I made _tagname for tag like 0.2.2-beta, pkgver would be 0.2.2beta
  2. I followed blesh to not pollute user's /etc directory. (Arch Wiki)
  3. I followed Rust package guidelines.
  4. I can update this package automatically.
pkgname=bash-pinyin-completion-rs
_tagname=0.2.3
pkgver=0.2.3
pkgrel=1
pkgdesc="Simple completion script for pinyin, written in rust."
arch=(
  'x86_64'
  'aarch64'
  'loongarch64'
  'mips64'
  'mips64el'
  'riscv64'
)
url="https://github.com/AOSC-Dev/bash-pinyin-completion-rs"
license=('GPL-3.0-only')
depends=('bash' 'bash-completion' 'glibc' 'gcc-libs')
makedepends=('cargo')
install="$pkgname.install"
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$_tagname.tar.gz")
sha256sums=('53cb5dc97fe13fefe0d3c8d165e4167e60639a0cd1f7dae81cf70b075b1e9829')

prepare() {
  cd "$pkgname-$_tagname"
  export RUSTUP_TOOLCHAIN=stable
  cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}

build() {
  cd "$pkgname-$_tagname"
  export RUSTUP_TOOLCHAIN=stable
  export CARGO_TARGET_DIR=target
  cargo build --frozen --release --all-features
}

check() {
  cd "$pkgname-$_tagname"
  export RUSTUP_TOOLCHAIN=stable
  cargo test --frozen --all-features
}

package() {
  cd "$pkgname-$_tagname"
  install -Dm755 -t "$pkgdir/usr/bin" target/release/bash-pinyin-completion-rs
  install -Dm644 -t "$pkgdir/usr/share/$pkgname" scripts/bash_pinyin_completion
  install -Dm644 -t "$pkgdir/usr/share/$pkgname" scripts/bash_pinyin_completion_debug
}
post_install() {
  printf '\033[1;36m==> Remember to enable bash-pinyin-completion-rs in your .bashrc\033[m\n'
  printf '\033[1;36m==> (add the following line):\033[m\n'
  printf '\033[1;35msource /usr/share/bash-pinyin-completion-rs/bash_pinyin_completion\033[m\n'
}