mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-13 03:09:51 +03:00
main/ruby-abbrev: new aport (needed for main/ruby)
This commit is contained in:
parent
b376e16181
commit
e04a5d769f
2 changed files with 62 additions and 0 deletions
55
main/ruby-abbrev/APKBUILD
Normal file
55
main/ruby-abbrev/APKBUILD
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
||||||
|
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
|
||||||
|
pkgname=ruby-abbrev
|
||||||
|
_gemname=abbrev
|
||||||
|
# Keep version in sync with "Bundled gems" (https://stdgems.org) for the
|
||||||
|
# packaged Ruby version.
|
||||||
|
pkgver=0.1.2
|
||||||
|
pkgrel=0
|
||||||
|
pkgdesc="Finds the shortest unique abbreviation amongst many strings"
|
||||||
|
url="https://github.com/ruby/abbrev"
|
||||||
|
arch="noarch"
|
||||||
|
license="BSD-2-Clause AND Ruby"
|
||||||
|
depends="ruby"
|
||||||
|
makedepends="ruby-rdoc"
|
||||||
|
checkdepends="ruby-test-unit"
|
||||||
|
subpackages="$pkgname-doc"
|
||||||
|
source="https://github.com/ruby/abbrev/archive/v$pkgver/$_gemname-$pkgver.tar.gz
|
||||||
|
gemspec.patch
|
||||||
|
"
|
||||||
|
builddir="$srcdir/$_gemname-$pkgver"
|
||||||
|
|
||||||
|
build() {
|
||||||
|
gem build $_gemname.gemspec
|
||||||
|
}
|
||||||
|
|
||||||
|
check() {
|
||||||
|
ruby -I lib -e "Dir.glob('./test/**/test_*.rb', &method(:require))" -- --verbose
|
||||||
|
}
|
||||||
|
|
||||||
|
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="
|
||||||
|
892d2addc0456cd040d2aca5624e526a5e0a0efa199aff7156df5d1eb488a74387baffdad3ee91787fe0b2c138471b457a1b4e3b706fcae4bbee0916dcf50d57 abbrev-0.1.2.tar.gz
|
||||||
|
03e1f59fd742ba82233c602ba2b615792da6e9e73b8f66a4b889d36541530153330464f93ab3eb19c36a70366ae5e32c528a90c7d6b258011d82ba322e3875de gemspec.patch
|
||||||
|
"
|
7
main/ruby-abbrev/gemspec.patch
Normal file
7
main/ruby-abbrev/gemspec.patch
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
--- a/abbrev.gemspec
|
||||||
|
+++ b/abbrev.gemspec
|
||||||
|
@@ -23,3 +23 @@
|
||||||
|
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
||||||
|
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
||||||
|
- end
|
||||||
|
+ spec.files = Dir["lib/**/*.rb"]
|
Loading…
Add table
Add a link
Reference in a new issue