# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka pkgname=ruby-concurrent-ruby _gemname=${pkgname#ruby-} pkgver=1.0.5 pkgrel=0 pkgdesc="Modern concurrency tools for Ruby" url="http://www.concurrent-ruby.com" arch="all" license="MIT" depends="ruby" makedepends="ruby-dev" checkdepends="ruby-rake ruby-rake-compiler ruby-rspec ruby-timecop" subpackages="$pkgname-ext" source="$pkgname-$pkgver.tar.gz::https://github.com/ruby-concurrency/$_gemname/archive/v$pkgver.tar.gz ungit-gemspec.patch" builddir="$srcdir/$_gemname-$pkgver" case "$CARCH" in # XXX: Two test fail, see https://github.com/ruby-concurrency/concurrent-ruby/issues/689 armhf) options="!check";; esac build() { cd "$builddir" gem build $_gemname.gemspec gem build $_gemname-ext.gemspec RUBYLIB="$(pwd)/lib" gem install --local \ --install-dir dist \ --ignore-dependencies \ --no-document \ --verbose \ $_gemname-ext } check() { cd "$builddir" rake compile rspec --tag ~unfinished --tag ~buggy --tag ~edge spec } package() { local gemdir="$pkgdir/$(ruby -rubygems -e 'puts Gem.default_dir')" cd "$builddir" gem install --local \ --install-dir "$gemdir" \ --ignore-dependencies \ --no-document \ --verbose \ $_gemname # Remove unnecessary files. rm -r "$gemdir"/cache \ "$gemdir"/build_info \ "$gemdir"/doc cd "$gemdir"/gems/$_gemname-$pkgver rm *.md *.txt } ext() { pkgdesc="$pkgdesc (C extension)" depends="$pkgname=$pkgver-r$pkgrel" local gemdir="$subpkgdir/$(ruby -rubygems -e 'puts Gem.default_dir')" cd "$builddir"/dist mkdir -p "$gemdir" cp -r extensions gems specifications "$gemdir"/ # Remove unnecessary files and rubbish... find "$gemdir"/extensions/ -name mkmf.log -delete cd "$gemdir"/gems/$_gemname-ext-$pkgver rm -r ext/ lib/concurrent/*.so *.md *.txt } sha512sums="fdf7324b56bb37b4a79dc89882354e452ee838a097f522fb906c20a06856303cfbbae16f2500255cbfb4bba33ee1b3b3ee8facf3d0156e976add64209e349da6 ruby-concurrent-ruby-1.0.5.tar.gz 3138b42e004efa6e270aa0153125ee65a73691c981eae6484d86919539b811b8190b8b67a51c4df8bb7a94100070f045a3fcaffaccefc2bdd6c5458e26f972b1 ungit-gemspec.patch"