Files
chromebrew/packages/hurl.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

37 lines
1000 B
Ruby

require 'package'
class Hurl < Package
description 'Hurl is a command line tool that runs HTTP requests defined in a simple plain text format.'
homepage 'https://hurl.dev/'
version '4.1.0'
license 'Apache-2.0'
compatibility 'x86_64'
source_url 'https://github.com/Orange-OpenSource/hurl.git'
git_hashtag version
binary_compression 'tar.zst'
binary_sha256({
x86_64: '59132b9e9ab44687e074a9417e8172a3e09653ac1256df9fa7dd38ecc5b341f0'
})
depends_on 'rust' => :build
depends_on 'curl'
depends_on 'libxml2'
depends_on 'openssl'
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"
Dir.chdir 'target/release' do
FileUtils.install %w[hurl hurlfmt], "#{CREW_DEST_PREFIX}/bin", mode: 0o755
end
Dir.chdir 'docs/manual' do
FileUtils.install %w[hurl.1 hurlfmt.1], "#{CREW_DEST_MAN_PREFIX}/man1", mode: 0o644
end
end
end