aboutsummaryrefslogtreecommitdiffstats
path: root/community/ruby-enum/APKBUILD
blob: 99c6ff664df30f5686544b99b30eb6dc23720dda (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
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ruby-enum
_gemname=$pkgname
pkgver=0.7.2
pkgrel=1
pkgdesc="A handy way to define enums in Ruby"
url="https://github.com/dblock/ruby-enum"
arch="noarch"
license="MIT"
depends="ruby ruby-i18n"
checkdepends="ruby-rspec"
source="$pkgname-$pkgver.tar.gz::https://github.com/dblock/$pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	gem build $_gemname.gemspec
}

check() {
	cd "$builddir"
	rspec spec
}

package() {
	local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')"
	local geminstdir="$gemdir/gems/$_gemname-$pkgver"

	cd "$builddir"

	gem install --local \
		--install-dir "$gemdir" \
		--ignore-dependencies \
		--no-document \
		--verbose \
		$_gemname

	rm -r "$gemdir"/cache \
		"$gemdir"/build_info \
		"$gemdir"/doc \
		"$geminstdir"/spec \
		"$geminstdir"/*.md
}

sha512sums="6dd8383bd6fb8d32f24c28da35bf19d1e67695968b42b908bbf0cb8b06152c38b604e07ab216e632e818f3b1f52d1dbbda6f8a209d85d51a4c6ae04c218180bf  ruby-enum-0.7.2.tar.gz"