blob: 8ef9c993e9d4932c2eb6b415f2abbbe6c28b8e5d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
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"
|