aboutsummaryrefslogtreecommitdiffstats
path: root/community/ruby-timecop/APKBUILD
blob: 53a08c0efedab511809215d29ef0eb82db502209 (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
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=ruby-timecop
_gemname=${pkgname#ruby-}
pkgver=0.9.1
pkgrel=0
pkgdesc="A gem providing 'time travel' and 'time freezing' capabilities"
url="https://github.com/travisjeffery/timecop"
arch="noarch"
license="MIT"
depends="ruby"
options="!check"  # tests require dependencies we don't have yet
source="$pkgname-$pkgver.tar.gz::https://github.com/travisjeffery/$_gemname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_gemname-$pkgver"

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

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

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

	# Remove unnecessary files.
	cd "$gemdir"
	rm -r cache/ build_info/ doc/
	cd gems/$_gemname-$pkgver
	rm -r test/ Rakefile README* LICENSE
}

sha512sums="f50f53e2e12b6b01b6583485d0e0db7e1b678fd9c085cde18b1d2092a2194b303e8951efc35e7711ea835e4977323649a6f47f1c336d93829b56a4d26cd13453  ruby-timecop-0.9.1.tar.gz"