aboutsummaryrefslogtreecommitdiffstats
path: root/community/ruby-rb-inotify/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/ruby-rb-inotify/APKBUILD')
-rw-r--r--community/ruby-rb-inotify/APKBUILD54
1 files changed, 54 insertions, 0 deletions
diff --git a/community/ruby-rb-inotify/APKBUILD b/community/ruby-rb-inotify/APKBUILD
new file mode 100644
index 00000000000..5a67dfd0434
--- /dev/null
+++ b/community/ruby-rb-inotify/APKBUILD
@@ -0,0 +1,54 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=ruby-rb-inotify
+_gemname=rb-inotify
+pkgver=0.10.1
+pkgrel=4
+pkgdesc="A Ruby wrapper for Linux inotify, using FFI"
+url="https://github.com/guard/rb-inotify"
+arch="noarch"
+license="MIT"
+depends="ruby ruby-ffi"
+checkdepends="ruby-concurrent-ruby ruby-rspec"
+source="https://github.com/guard/rb-inotify/archive/v$pkgver/$pkgname-$pkgver.tar.gz
+ gemspec.patch
+ "
+builddir="$srcdir/$_gemname-$pkgver"
+
+prepare() {
+ default_prepare
+
+ # Bundler is not necessary.
+ sed -i '/require .bundler\/setup/d' spec/spec_helper.rb
+}
+
+build() {
+ gem build $_gemname.gemspec
+}
+
+check() {
+ # Bunler needs "Pathname" for its functionality, but we are not using Bundler,
+ # therefore we need to load it explicitly.
+ rspec -rpathname .
+}
+
+package() {
+ local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')"
+
+ gem install \
+ --local \
+ --install-dir "$gemdir" \
+ --ignore-dependencies \
+ --no-document \
+ --verbose \
+ $_gemname
+
+ # Remove unnecessary files and rubbish...
+ cd "$gemdir"
+ rm -r cache build_info doc
+}
+
+sha512sums="
+fb8484b3c019ff471dbea57ad305c32a9d03377f8bbcb4d1631ef498b3207bc83da08889f7d43fe3a9ba54df2d9164e3a83d001797f8113ddc2e3a7f2ad9a83b ruby-rb-inotify-0.10.1.tar.gz
+2d9896ee5a81bc74d8921c4773771cf966dd5b164f6949857671afd2152a791377a18dd3c71cad7aefcd1d1d2f2b70fd366873f80269c672e750618e8e90e727 gemspec.patch
+"