aboutsummaryrefslogtreecommitdiffstats
path: root/community/ruby-timecop
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-12-26 01:28:42 +0100
committerJakub Jirutka <jakub@jirutka.cz>2017-12-26 01:28:42 +0100
commitf45c2cffc7d8bad71c9a4134e9a22329a2248fc5 (patch)
treed04fdb3abc5127499a3555d0b9cbf4422e8d9aa6 /community/ruby-timecop
parent06cd4887b446f82682c6a6ed562ffe39d3b99050 (diff)
downloadaports-f45c2cffc7d8bad71c9a4134e9a22329a2248fc5.tar.bz2
aports-f45c2cffc7d8bad71c9a4134e9a22329a2248fc5.tar.xz
community/ruby-timecomp: move from testing
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"