testing/ruby-hashdiff: new aport

This commit is contained in:
Will Sinatra 2025-02-24 22:52:26 -05:00 committed by omni
parent 85f4beef06
commit 8646c5f84e
2 changed files with 62 additions and 0 deletions

View File

@ -0,0 +1,51 @@
# Contributor: Will Sinatra <wpsinatra@gmail.com>
# Maintainer: Will Sinatra <wpsinatra@gmail.com>
pkgname=ruby-hashdiff
_gemname=${pkgname#ruby-}
pkgver=1.1.1
pkgrel=0
pkgdesc="compute the smallest difference between two hashes"
url="https://rubygems.org/gems/hashdiff"
arch="noarch"
license="MIT"
depends="ruby"
checkdepends="ruby-rake ruby-bundler ruby-rspec ruby-rspec-core ruby-yard"
source="$pkgname-$pkgver.tar.gz::https://github.com/liufengyun/hashdiff/archive/refs/tags/v$pkgver.tar.gz
gemspec.patch"
builddir="$srcdir/$_gemname-$pkgver"
options="!check" # depends on rubocop
subpackages="$pkgname-doc"
prepare() {
default_prepare
}
build() {
gem build $_gemname.gemspec
}
check() {
rake test
}
package() {
local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')"
gem install --local \
--install-dir "$gemdir" \
--ignore-dependencies \
--no-document \
--verbose \
$_gemname
install -Dm644 "$builddir"/LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
rm -r "$gemdir"/cache \
"$gemdir"/build_info \
"$gemdir"/doc
}
sha512sums="
f837b03ae1f0503407229361e1af37f614462551dcdce89e6bc4012dd9bda0b4d8d23bd7712e561e0a1bebe945c760e74bfc3ce4961d85b36243cae667253717 ruby-hashdiff-1.1.1.tar.gz
c91bf188616b75b516ac11d00426e8f8e74a6af50367cb81efd05192c4ceb730896927e78eca56c27a92e220cac7b5de59744e07696edb8f2fdc3d3951cd61ae gemspec.patch
"

View File

@ -0,0 +1,11 @@
--- a/hashdiff.gemspec 2025-02-24 23:01:35.019042968 -0500
+++ b/hashdiff.gemspec 2025-02-24 23:07:30.736083984 -0500
@@ -10,7 +10,7 @@
s.summary = ' Hashdiff is a diff lib to compute the smallest difference between two hashes. '
s.description = ' Hashdiff is a diff lib to compute the smallest difference between two hashes. '
- s.files = `git ls-files`.split("\n").grep_v(%r{^spec/})
+ s.files = Dir["lib/*/**"]
s.test_files = `git ls-files -- Appraisals {spec}/*`.split("\n")
s.require_paths = ['lib']