aboutsummaryrefslogtreecommitdiffstats
path: root/community/ruby-timecop
diff options
context:
space:
mode:
Diffstat (limited to 'community/ruby-timecop')
-rw-r--r--community/ruby-timecop/APKBUILD39
1 files changed, 39 insertions, 0 deletions
diff --git a/community/ruby-timecop/APKBUILD b/community/ruby-timecop/APKBUILD
new file mode 100644
index 0000000000..53a08c0efe
--- /dev/null
+++ b/community/ruby-timecop/APKBUILD
@@ -0,0 +1,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"