summaryrefslogtreecommitdiff
path: root/user/ruby-rspec-mocks/APKBUILD
blob: 6766925b7b3e3ce6384321720564d521e6c9c83c (plain) (blame)
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
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=ruby-rspec-mocks
_gemname=${pkgname#ruby-}
pkgver=3.10.2
pkgrel=0
pkgdesc="RSpec's 'test double' framework, with support for stubbing and mocking"
url="https://relishapp.com/rspec/rspec-mocks/"
arch="noarch"
options="!check"  # rspec's tests are written in rspec
license="MIT"
depends="ruby ruby-diff-lcs ruby-rspec-support~=${pkgver%.*}"
makedepends=""
source="$pkgname-$pkgver.tar.gz::https://github.com/rspec/$_gemname/archive/v$pkgver.tar.gz
	gemspec.patch
	"
builddir="$srcdir/$_gemname-$pkgver"

build() {
	gem build $_gemname.gemspec
}

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

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

	# Clean-up...
	rm -r "$gemdir"/cache \
		"$gemdir"/build_info \
		"$gemdir"/doc
}

sha512sums="ab11fa77c5f9e3bec2003dc8825d9582dcbffa08a36818bd9cdbe2dfd357113de3712c818deafc165530f9e4d2683ec06e54d37c37aeb820ae3cd592f76cf2cb  ruby-rspec-mocks-3.10.2.tar.gz
6fd7ab08b20a93f806a8d3c42da5da0a99162793079ecb1695341a04dff2a7cefdb12592d1798fb844dfbdf8ead6ad0b8729e461d3cd5af46d853b182d15228d  gemspec.patch"