# Maintainer: orhun # https://github.com/orhun/pkgbuilds pkgname=sic-image-cli _pkgname=sic pkgver=0.21.1 pkgrel=1 pkgdesc="Accessible image processing and conversion from the terminal" arch=('x86_64') url="https://github.com/foresterre/sic" license=('MIT') conflicts=("$_pkgname") depends=('gcc-libs') makedepends=('cargo' 'nasm') source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz") sha512sums=('048a90aadde032476a210628bb0c48c5813fb453313bc16e5ba925703f71b4f4ded20db4a3bfc9781f4b577c5ccb5afef0fe7bd9347cea826628a9a6e3b9e2fc') options=('!lto') prepare() { cd "$_pkgname-$pkgver" cargo fetch --locked --target "$CARCH-unknown-linux-gnu" } build() { cd "$_pkgname-$pkgver" cargo build --release --frozen --all-features cargo run --example gen_completions } check() { cd "$_pkgname-$pkgver" cargo test --frozen } package() { cd "$_pkgname-$pkgver" install -Dm 755 "target/release/$_pkgname" -t "$pkgdir/usr/bin" install -Dm 644 README.md -t "$pkgdir/usr/share/doc/$pkgname" install -Dm 644 LICENSE-MIT -t "$pkgdir/usr/share/licenses/$pkgname" install -Dm 644 "$_pkgname.bash" "${pkgdir}/usr/share/bash-completion/completions/$_pkgname" install -Dm 644 "$_pkgname.fish" -t "${pkgdir}/usr/share/fish/completions" install -Dm 644 "_$_pkgname" -t "${pkgdir}/usr/share/zsh/site-functions" }