main/ruby-net-ftp: new aport

This aport is needed for main/ruby 3.1.1.
This commit is contained in:
Jakub Jirutka 2022-04-02 23:42:59 +02:00
parent 787df8b578
commit deb1ebd978
2 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,60 @@
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ruby-net-ftp
_gemname=net-ftp
# Keep version in sync with "Bundled gems" (https://stdgems.org) for the
# packaged Ruby version.
pkgver=0.1.3
pkgrel=0
pkgdesc="Support for the File Transfer Protocol"
url="https://github.com/ruby/net-ftp"
arch="noarch"
license="BSD-2-Clause AND Ruby"
depends="ruby"
checkdepends="ruby-rake ruby-test-unit"
makedepends="ruby-rdoc"
subpackages="$pkgname-doc"
source="https://github.com/ruby/net-ftp/archive/v$pkgver/$_gemname-$pkgver.tar.gz
gemspec.patch
"
builddir="$srcdir/$_gemname-$pkgver"
prepare() {
default_prepare
sed -i '/require .bundler/d' Rakefile
}
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 \
--document ri \
--verbose \
$_gemname
# Remove unnessecary files
cd "$gemdir"
rm -rf build_info cache extensions plugins
}
doc() {
pkgdesc="$pkgdesc (ri docs)"
amove "$(ruby -e 'puts Gem.default_dir')"/doc
}
sha512sums="
73159513947e1574d15b4d73c87c6b7506e1ee8defc01fd5dfbd4dc7e9f4aa9e8a2a62ae397b3471d0276707d806c6f3252540e60d9b224d30a8cc23fe60b4d3 net-ftp-0.1.3.tar.gz
0ea5e32697eed985a45ee0b6da44013a226e4abd4a8b053ac4e7cacabe72e93b0bde54f2aec87d026b47a06301e06d301bad1347ce1746c5c1526959f624ea69 gemspec.patch
"

View File

@ -0,0 +1,8 @@
--- a/net-ftp.gemspec
+++ b/net-ftp.gemspec
@@ -26,4 +26 @@
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
- `git ls-files -z 2>/dev/null`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
- end
+ spec.files = Dir["lib/**/*.rb"]