# Contributor: Carlo Landmeter # Maintainer: André Klitzing pkgname=pngquant pkgver=3.0.1 pkgrel=2 _libimagequant=9f15d1c53938a441a6bbfb2de866492797f69e22 pkgdesc="Lossy PNG compressor" url="https://pngquant.org/" arch="all" license="GPL-3.0-or-later" makedepends=" cargo cargo-auditable lcms2-dev libpng-dev " subpackages="$pkgname-doc" source="https://github.com/kornelski/pngquant/archive/$pkgver/pngquant-$pkgver.tar.gz libimagequant-$_libimagequant.tar.gz::https://github.com/ImageOptim/libimagequant/archive/$_libimagequant.tar.gz Cargo.lock " options="!check" # seems to not have any runnable anymore prepare() { default_prepare rmdir lib ln -sfv "$srcdir"/libimagequant-$_libimagequant lib ln -sfv "$srcdir"/Cargo.lock Cargo.lock cargo fetch --target="$CTARGET" --locked } build() { # 20% faster than =s/=2 export CARGO_PROFILE_RELEASE_OPT_LEVEL=3 cargo auditable build --release --frozen } check() { cargo test --frozen } package() { install -Dm755 target/release/pngquant -t "$pkgdir"/usr/bin/ install -Dm644 pngquant.1 -t "$pkgdir"/usr/share/man/man1/ } sha512sums=" 334e7dd92398cfa39f1e01ba6e94801edf2a46ee618fd69a63cbb1d05e435d1d01dde11ff84daf0bd5a1c152558bf13d1e248a547634e524dd28217833ca6aaf pngquant-3.0.1.tar.gz 3df512ad3743d1c8f4ef491c042ccd288e78f99001cafb03c09425d629541ff0fae16e15f300571b62842f539d7c2a645db4069d3dd9c79e260de305fa672e54 libimagequant-9f15d1c53938a441a6bbfb2de866492797f69e22.tar.gz 187c5c9d011f8c056f8b14179babc3cc6f750aaa7cdfb74c6ab6faf33f50ae991feefe897cd3eea1718423cecbce92b526a3acc1f32b51dc709826107654e0cd Cargo.lock "