mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-09 15:37:56 -05:00
* 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)
43 lines
1.5 KiB
Ruby
43 lines
1.5 KiB
Ruby
require 'package'
|
|
|
|
class Fd < Package
|
|
description "A simple, fast and user-friendly alternative to 'find'."
|
|
homepage 'https://github.com/sharkdp/fd/'
|
|
@_ver = '8.3.0'
|
|
version "#{@_ver}-1"
|
|
license 'Apache-2.0 and MIT'
|
|
compatibility 'all'
|
|
source_url 'https://github.com/sharkdp/fd.git'
|
|
git_hashtag "v#{@_ver}"
|
|
binary_compression 'tpxz'
|
|
|
|
binary_sha256({
|
|
aarch64: '1325765ea06369318274a4c9432b22cff9a6714b15afd7c6d61ab833166852f3',
|
|
armv7l: '1325765ea06369318274a4c9432b22cff9a6714b15afd7c6d61ab833166852f3',
|
|
i686: '7c39bc4ee7d48d65baea2e20a5573ba48a285c00a6e1816809a04749f657a15a',
|
|
x86_64: '076f8e237125bcd488bdcf72a4f6a6f3e0786de795fb19444ec30c288f421965'
|
|
})
|
|
|
|
depends_on 'rust' => :build
|
|
|
|
def self.build
|
|
system 'cargo build --release'
|
|
end
|
|
|
|
def self.install
|
|
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/bin/"
|
|
FileUtils.mkdir_p "#{CREW_DEST_MAN_PREFIX}/man1/"
|
|
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/share/bash-completion/completions/"
|
|
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/share/zsh/site-functions/"
|
|
FileUtils.install 'target/release/fd', "#{CREW_DEST_PREFIX}/bin/fd", mode: 0o755
|
|
FileUtils.install `find . -name 'fd.bash' -type f`.to_s.chomp,
|
|
"#{CREW_DEST_PREFIX}/share/bash-completion/completions/fd"
|
|
FileUtils.install 'doc/fd.1', "#{CREW_DEST_MAN_PREFIX}/man1/fd.1"
|
|
FileUtils.install 'contrib/completion/_fd', "#{CREW_DEST_PREFIX}/share/zsh/site-functions/_fd"
|
|
end
|
|
|
|
def self.check
|
|
system 'cargo test --release'
|
|
end
|
|
end
|