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

49 lines
1.6 KiB
Ruby

# Adapted from Arch Linux uutils-coreutils PKGBUILD at:
# https://github.com/archlinux/svntogit-community/raw/packages/uutils-coreutils/trunk/PKGBUILD
require 'package'
class Uutils_coreutils < Package
description 'Cross-platform Rust rewrite of the GNU coreutils'
homepage 'https://github.com/uutils/coreutils'
version '0.0.23'
license 'MIT'
compatibility 'all'
source_url 'https://github.com/uutils/coreutils.git'
git_hashtag version
binary_compression 'tar.zst'
binary_sha256({
aarch64: '06be1802c7cf4725b824ae6872a875c84b605a03101ab6fa68df93a8eba3e5c2',
armv7l: '06be1802c7cf4725b824ae6872a875c84b605a03101ab6fa68df93a8eba3e5c2',
i686: '01ba93e28719d0587ea73b7d9e7e926b0c9850a31c9634d3dce6cc5ab85d7954',
x86_64: '75f1b5c7f4a66e689df88e29a4703c69fdca3dca7191bc23e79aa461c827341d'
})
depends_on 'rust' => :build
depends_on 'sphinx' => :build
depends_on 'gcc_lib' # R
depends_on 'glibc' # R
conflicts_ok # conflicts with coreutils
def self.preflight
%w[coreutils].each do |cutils|
next unless File.exist? "#{CREW_PREFIX}/etc/crew/meta/#{cutils}.filelist"
puts "#{cutils} installed and conflicts with this version.".orange
puts 'To install this version, execute the following:'.lightblue
abort "crew remove #{cutils} && crew install uutils_coreutils".lightblue
end
end
def self.build
system 'make PROFILE=release MULTICALL=y'
end
def self.install
system "make install DESTDIR=#{CREW_DEST_DIR} PREFIX=#{CREW_PREFIX} MANDIR=#{CREW_MAN_PREFIX} \
PROFILE=release MULTICALL=y"
end
end