# -*- mode: Shell-script; eval: (setq indent-tabs-mode 't); eval: (setq tab-width 4) -*- # Maintainer: LuckyTurtleDev [aur at lukas1818 dot de] # Contributor: Dominic Meiser [git at msrd0 dot de] _crate="mstickereditor" pkgname="mstickereditor" pkgver=0.3.6 pkgrel=1 pkgdesc='import sticker packs from telegram, to be used at the Maunium sticker picker ...' url='https://crates.io/crates/mstickereditor' license=('Apache-2.0') depends=('gcc-libs' 'ffmpeg' 'libwebp' 'rlottie') makedepends=('cargo' 'clang' 'lld') source=("$_crate-0.3.6.tar.gz::https://crates.io/api/v1/crates/mstickereditor/0.3.6/download") sha512sums=('b477e464835c752a60fff3c3eede476dc6f3a314f219bcbcb7f229ff3cda0b6b110a6d45a2de493a288807f3b49fff8acb49ab88d8458b0b6612adaa1f76eabd') # Tier 1 architectures supported by Rust (https://doc.rust-lang.org/nightly/rustc/platform-support.html#tier-1) arch=('aarch64' 'i686' 'x86_64') prepare() { cd "$srcdir/$_crate-0.3.6" export RUSTUP_TOOLCHAIN=stable cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" } build() { cd "$srcdir/$_crate-0.3.6" export RUSTUP_TOOLCHAIN=stable export CARGO_TARGET_DIR=target CFLAGS+=" -ffat-lto-objects" cargo build \ --offline \ --locked \ --release ./target/release/mstickereditor shell-completion bash >bashcompletion } package() { cd "$srcdir/$_crate-0.3.6" install -Dm755 "target/release/mstickereditor" -t "$pkgdir/usr/bin" install -Dm644 bashcompletion "$pkgdir/usr/share/bash-completion/completions/$pkgname" install -Dm644 'LICENSE' -t "$pkgdir/usr/share/licenses/$pkgname/" }