Files
chromebrew/packages/uutils_coreutils.rb
Satadru Pramanik, DO, MPH, MEng 31d27c27ef uutils_coreutils => 0.0.26 (#9731)
Signed-off-by: Satadru Pramanik <satadru@gmail.com>
2024-04-27 15:45:40 -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.26'
license 'MIT'
compatibility 'all'
source_url 'https://github.com/uutils/coreutils.git'
git_hashtag version
binary_compression 'tar.zst'
binary_sha256({
aarch64: '2c8ea8a36890ded8d53bd89f43bdd1271eb05ee063af4f735974fea50e758e6a',
armv7l: '2c8ea8a36890ded8d53bd89f43bdd1271eb05ee063af4f735974fea50e758e6a',
i686: 'c0d5006e8e6943673fecb7a2afa7d98839ab00019e51e6590728a18f7714ce18',
x86_64: '7338dea58b174490a88287dc306b929fd17f91c314f758006fcdb48875d8390f'
})
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