blob: ad6267205f99d971550d321b2f5716069da30087 (
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
|
# Maintainer: Mario Finelli <mario at finel dot li>
_gemname=racc
pkgname=ruby-$_gemname
pkgver=1.6.0
pkgrel=1
pkgdesc='LALR parser generator written in Ruby itself and generates ruby programs'
arch=(x86_64)
url=https://github.com/ruby/racc
license=(BSD)
depends=(ruby)
checkdepends=(ruby-test-unit)
makedepends=(rubygems ruby-rake ruby-rdoc ruby-bundler ruby-rake-compiler)
options=(!emptydirs)
source=(https://github.com/ruby/racc/archive/v${pkgver}.tar.gz)
sha256sums=('a1a2d8eb4167e7d907064e64a20c663fdea754c727d97b5772b3dfa92012a386')
build() {
cd "$_gemname-$pkgver"
rake compile
rake build
}
check() {
cd "$_gemname-$pkgver"
rake test
}
package() {
cd "$_gemname-$pkgver"
local _gemdir="$(ruby -e'puts Gem.default_dir')"
# N.B. we don't install the bin to /usr/bin because it conflicts with
# "racc" provided by ruby
gem install \
--ignore-dependencies \
--no-user-install \
-i "$pkgdir/$_gemdir" \
pkg/$_gemname-$pkgver.gem
rm -rf "$pkgdir/$_gemdir/cache"
install -Dm0644 COPYING "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -Dm0644 README.rdoc "$pkgdir/usr/share/doc/$pkgname/README.rdoc"
install -Dm0644 ChangeLog "$pkgdir/usr/share/doc/$pkgname/CHANGELOG"
}
|