aboutsummaryrefslogtreecommitdiffstats
path: root/community/ruby-enum
diff options
context:
space:
mode:
Diffstat (limited to 'community/ruby-enum')
-rw-r--r--community/ruby-enum/APKBUILD41
1 files changed, 41 insertions, 0 deletions
diff --git a/community/ruby-enum/APKBUILD b/community/ruby-enum/APKBUILD
new file mode 100644
index 0000000000..3f78059074
--- /dev/null
+++ b/community/ruby-enum/APKBUILD
@@ -0,0 +1,41 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=ruby-enum
+_gemname=$pkgname
+pkgver=0.7.2
+pkgrel=0
+pkgdesc="A handy way to define enums in Ruby"
+url="https://github.com/dblock/ruby-enum"
+arch="noarch"
+license="MIT"
+depends="ruby"
+source="$pkgname-$pkgver.tar.gz::https://github.com/dblock/$pkgname/archive/v$pkgver.tar.gz"
+builddir="$srcdir/$pkgname-$pkgver"
+options="!check"
+
+build() {
+ cd "$builddir"
+ gem build $_gemname.gemspec
+}
+
+package() {
+ local gemdir="$pkgdir/$(ruby -rubygems -e 'puts Gem.default_dir')"
+ local geminstdir="$gemdir/gems/$_gemname-$pkgver"
+
+ cd "$builddir"
+
+ gem install --local \
+ --install-dir "$gemdir" \
+ --ignore-dependencies \
+ --no-document \
+ --verbose \
+ $_gemname
+
+ rm -r "$gemdir"/cache \
+ "$gemdir"/build_info \
+ "$gemdir"/doc \
+ "$geminstdir"/spec \
+ "$geminstdir"/*.md
+}
+
+sha512sums="6dd8383bd6fb8d32f24c28da35bf19d1e67695968b42b908bbf0cb8b06152c38b604e07ab216e632e818f3b1f52d1dbbda6f8a209d85d51a4c6ae04c218180bf ruby-enum-0.7.2.tar.gz"