Files
chromebrew/packages/pngquant.rb
Maximilian Downey Twiss f6dc1d8d4e Derive binary_url in package.rb (#7082)
* Add binary_compression value to each package

* Remove binary_url values and arrays

* Handle packages with empty binary_sha256 arrays (either missing binaries or not compiled by us)
2024-01-25 11:03:31 -05:00

32 lines
985 B
Ruby

require 'package'
class Pngquant < Package
description 'Command-line utility and a library for lossy compression of PNG images.'
homepage 'https://pngquant.org/'
version '2.17.0'
license 'GPL-3.0'
compatibility 'all'
source_url 'https://github.com/kornelski/pngquant.git'
git_hashtag version
binary_compression 'tar.zst'
binary_sha256({
aarch64: 'fdddb92cbb12abd1e267330768c58a0d31e8c743831dc2eff820d3b214af9e94',
armv7l: 'fdddb92cbb12abd1e267330768c58a0d31e8c743831dc2eff820d3b214af9e94',
i686: '38b281e502240992f6b27455d70211b08dfc5fa47f1b2d0a8fe2be687cca569a',
x86_64: 'ed9748591b5eb81fc5565a003ee55549136d5d87052ad1b41ed9c0adf2e99457'
})
depends_on 'lcms'
depends_on 'rust' => :build
def self.build
system 'cargo build --release --features=lcms2'
end
def self.install
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/bin"
FileUtils.install 'target/release/pngquant', "#{CREW_DEST_PREFIX}/bin/pngquant", mode: 0o755
end
end