mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-13 03:09:51 +03:00
main/ruby-observer: new aport (needed for main/ruby)
This commit is contained in:
parent
ac702e9f11
commit
f9b9c5d98f
2 changed files with 63 additions and 0 deletions
55
main/ruby-observer/APKBUILD
Normal file
55
main/ruby-observer/APKBUILD
Normal file
|
@ -0,0 +1,55 @@
|
|||
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
||||
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
|
||||
pkgname=ruby-observer
|
||||
_gemname=observer
|
||||
# Keep version in sync with "Bundled gems" (https://stdgems.org) for the
|
||||
# packaged Ruby version.
|
||||
pkgver=0.1.2
|
||||
pkgrel=0
|
||||
pkgdesc="Implementation of the Observer object-oriented design pattern"
|
||||
url="https://github.com/ruby/observer"
|
||||
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/observer/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="
|
||||
05add384226459a637b5ec3081fc90da06a72ffa5c333e61844c6e0cc7dc0a17279008f54c2d3240123767cfde0e0e9e95e9364b77eee77c4310e0a0f675ed23 observer-0.1.2.tar.gz
|
||||
46f1844a9c38e55dbff2c18f4f9534441841210feb2752be4c4120bc19c7ef2438e050df1e25806e76a9d695e3aa5813d0f53940e89d50b512cafaf62cc8f09f gemspec.patch
|
||||
"
|
8
main/ruby-observer/gemspec.patch
Normal file
8
main/ruby-observer/gemspec.patch
Normal file
|
@ -0,0 +1,8 @@
|
|||
--- a/observer.gemspec
|
||||
+++ b/observer.gemspec
|
||||
@@ -25,4 +25 @@
|
||||
- # 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>#{IO::NULL}`.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