1 # Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com>
2 # Contributor: Hannes Graeuler <hgraeule @ uos dot de>
4 # this is needed only for building the imagequant-sys crate
10 pkgdesc="Command-line utility to quantize PNGs down to 8-bit paletted PNGs"
12 url="https://pngquant.org/"
14 depends=('libpng' 'lcms2' 'libimagequant')
16 source=("https://github.com/kornelski/$pkgname/archive/$pkgver/$pkgname-$pkgver.tar.gz"
17 "https://github.com/ImageOptim/libimagequant/archive/$_libver/libimagequant-$_libver.tar.gz")
18 sha256sums=('488e4587c27c7515427b231530cc070a6b123727137b32c501658cff3f8a3451'
19 '726ce0bf2a8175a32d1ef303c3e8971a1fda354e760f1327c08656268bb019c2')
22 cd "$srcdir/$pkgname-$pkgver"
24 ln -s ../libimagequant-$_libver lib
25 cargo fetch --target "$CARCH-unknown-linux-gnu"
29 cd "$srcdir/$pkgname-$pkgver"
30 export RUSTUP_TOOLCHAIN=stable
31 export CARGO_TARGET_DIR=target
36 cd "$srcdir/$pkgname-$pkgver"
37 export RUSTUP_TOOLCHAIN=stable
42 cd "$srcdir/$pkgname-$pkgver"
43 install -Dm755 target/release/pngquant "$pkgdir/usr/bin/pngquant"
44 install -Dm644 pngquant.1 "$pkgdir/usr/share/man/man1/pngquant.1"
45 install -Dm644 COPYRIGHT "$pkgdir/usr/share/licenses/$pkgname/LICENSE"