Files
chromebrew/packages/rdfind.rb
Maximilian Downey Twiss f6b6cab229 Rename autotools constants to fall in line with the rest of crew (#10442)
* Rename CREW_OPTIONS to CREW_CONFIGURE_OPTIONS

* Rename build_extras and install_extras to configure_build_extras and configure_install_extras
2024-09-09 18:21:58 -05:00

43 lines
1.3 KiB
Ruby

# Adapted from Arch Linux rdfind PKGBUILD at:
# https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=rdfind
require 'package'
class Rdfind < Package
description 'Redundant data find - a program that finds duplicate files.'
homepage 'https://rdfind.pauldreik.se/'
version '1.6.0'
license 'GPL2'
compatibility 'all'
source_url 'https://github.com/pauldreik/rdfind.git'
git_hashtag "releases/#{version}"
binary_compression 'tar.zst'
binary_sha256({
aarch64: '4ca9417e258b5ff07bf3a102278e9b963656c443478b2aeec1eb8cba3361d5e1',
armv7l: '4ca9417e258b5ff07bf3a102278e9b963656c443478b2aeec1eb8cba3361d5e1',
i686: '6c6af3b3f4628b9a7aa8c427d2673ef7b3122343f555646895337727437a126f',
x86_64: '741d44e5fe82ac4a791f09fe7fa019c8398cea277c764221d8f178d33f897eb3'
})
depends_on 'autoconf_archive' => :build
depends_on 'gcc_lib' # R
depends_on 'glibc' # R
depends_on 'nettle' # R
def self.patch
system "sed -i '/<vector>/a #include <limits>' rdfind.cc"
system "sed -i '/<cstdio>/a #include <stdexcept>' Checksum.cc"
end
def self.build
system '[ -x configure ] || autoreconf -fvi'
system "./configure #{CREW_CONFIGURE_OPTIONS} #{CREW_ENV_OPTIONS}"
system 'make -s'
end
def self.install
system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install'
end
end