blob: bf3078232f2d3d56abfa93f2f963240e28bd5712 (
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
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ruby-prime
_gemname=prime
# Keep version in sync with "Bundled gems" (https://stdgems.org) for the
# packaged Ruby version.
pkgver=0.1.2
pkgrel=0
pkgdesc="Prime numbers and factorization library"
url="https://github.com/ruby/prime"
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/prime/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="
a766426884d6b3cd7a586676799db146974ec9a4a7c30ca53b5f279ad55ee9960c9b5bb26988cb66253b4fe974f9b5087f48ef5b216772464d03b8ed78a817d6 prime-0.1.2.tar.gz
ea60d064edd9247a0a1450d9e43385cd8fc84dfcb610bd4ab174fd104727eb8066b4ad8439b9b33a715aa93890a2b0a06127d58912752919aecbc2950e419a3e gemspec.patch
"
|