blob: df4552d734ce78ea68600f36560b62b1491f0d26 (
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
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ruby-ox
_gemname=${pkgname#ruby-}
pkgver=2.8.2
pkgrel=0
pkgdesc="A fast XML parser and object serializer for Ruby"
url="https://github.com/ohler55/ox"
arch="all"
license="MIT"
checkdepends="ruby ruby-test-unit"
makedepends="ruby-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/ohler55/$_gemname/archive/v$pkgver.tar.gz
gemspec.patch"
builddir="$srcdir/$_gemname-$pkgver"
build() {
cd "$builddir"
gem build $_gemname.gemspec
gem install --local \
--install-dir dist \
--ignore-dependencies \
--no-document \
--verbose \
$_gemname
# Needed for tests.
cp -l dist/extensions/*/*/$_gemname-*/*.so ext/$_gemname/
}
check() {
cd "$builddir"
./test/tests.rb
./test/sax/sax_test.rb
}
package() {
local gemdir="$pkgdir/$(ruby -rubygems -e 'puts Gem.default_dir')"
cd "$builddir"/dist
mkdir -p "$gemdir"
cp -r extensions gems specifications "$gemdir"/
# Remove unnecessary and duplicated files.
cd "$gemdir"/gems/$_gemname-$pkgver
rm -r ext/ lib/*.so || true
}
sha512sums="18a887db70962a1dd1c6ea18461eca0efbcffdb231f934c3603e63537e9911e820465ce5e4ab86cbedd65b396a9a12b0ad7e60ea7ae687c4ebe8436e0c37988c ruby-ox-2.8.2.tar.gz
37b5033258b81efea4c3883b448cc996cd3c287336e66eb6a424d1cdb6c6db0470fe7eba02325adac3dc539ce7e75afaf0a290c57df21870b1ff53cfca917756 gemspec.patch"
|