blob: d93f74bda9ae778e16c0c23fbce1fc77b3eb7512 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
# -*- mode: Shell-script; eval: (setq indent-tabs-mode 't); eval: (setq tab-width 4) -*-
# Maintainer: Dominic Meiser [git at msrd0 dot de]
_crate="lottieconv"
_cratever="0.3.1"
pkgname="lottieconv"
pkgver=0.3.1
pkgrel=2
pkgdesc='Convert lottie files to WEBP or GIF'
url='https://crates.io/crates/lottieconv'
license=('MIT')
depends=('libgcc' 'libwebp' 'rlottie')
makedepends=('cargo' 'cargo-auditable' 'clang')
conflicts=('lottie2gif' 'lottie2webp')
replaces=('lottie2gif' 'lottie2webp')
source=("$_crate-$_cratever.tar.gz::https://static.crates.io/crates/lottieconv/0.3.1/download")
sha512sums=('5e3777171f39a82013dfcedf9cf15bb2eacec4d20fbd5097d5a4a5ac1e44d0baf2af2e3ebb15e27adec6a85bf5f4840f533c0ebc65b0e0518f4e46faffdc174f')
# 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-$_cratever"
export RUSTUP_TOOLCHAIN=stable
cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
}
build() {
cd "$srcdir/$_crate-$_cratever"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
CFLAGS+=" -ffat-lto-objects"
cargo auditable build \
--frozen \
--features 'clap,gif,webp' \
--release
}
_check() {
cd "$srcdir/$_crate-$_cratever"
export RUSTUP_TOOLCHAIN=stable
export CARGO_TARGET_DIR=target
CFLAGS+=" -ffat-lto-objects"
cargo test \
--frozen \
--features 'clap,gif,webp' \
--release \
"${@}"
}
check() {
_check --bins
_check --lib
}
package() {
cd "$srcdir/$_crate-$_cratever"
install -Dm755 "target/release/lottie2gif" -t "$pkgdir/usr/bin"
install -Dm755 "target/release/lottie2webp" -t "$pkgdir/usr/bin"
install -Dm644 'LICENSE' -t "$pkgdir/usr/share/licenses/$pkgname/"
}
|