aboutsummaryrefslogtreecommitdiffstats
path: root/community/ruby-rake-compiler/APKBUILD
blob: 805b43a14a0676b6ef39cc4d1a1f62f0a0b7c4d2 (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-rake-compiler
_gemname=${pkgname#ruby-}
pkgver=1.0.5
pkgrel=0
pkgdesc="Provide a standard and simplified way to build and package Ruby extensions"
url="https://github.com/rake-compiler/rake-compiler"
arch="noarch"
license="MIT"
depends="ruby ruby-rake"
checkdepends="ruby-rspec"
source="$pkgname-$pkgver.tar.gz::https://github.com/rake-compiler/$_gemname/archive/v$pkgver.tar.gz
	gemfile-remove-unwanted-files.patch"
builddir="$srcdir/$_gemname-$pkgver"

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

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

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

	cd "$builddir"

	gem install --local \
		--install-dir "$gemdir" \
		--bindir "$pkgdir/usr/bin" \
		--ignore-dependencies \
		--no-document \
		--verbose \
		$_gemname

	# Remove unnecessary files and empty directories.
	cd "$gemdir"
	rm -r cache build_info doc
}

sha512sums="e1d7016600d2acf0203891c52d836b85b835ddd5eff58b4b6679440d467a100f2d9ea35dc58bde0bcd03852790d439d3c8e44111a66640e85b11ae95c896e6b9  ruby-rake-compiler-1.0.5.tar.gz
e68672541d62898bc72fb7e40f16bc75ed1d46eabedd18da60a6f0673d67bf63d990e191fb41d6034e3f6361662807030cbd8f0c817223a5d03c46a3a664f855  gemfile-remove-unwanted-files.patch"