aboutsummaryrefslogtreecommitdiffstats
path: root/community/ruby-cap2/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/ruby-cap2/APKBUILD')
-rw-r--r--community/ruby-cap2/APKBUILD48
1 files changed, 48 insertions, 0 deletions
diff --git a/community/ruby-cap2/APKBUILD b/community/ruby-cap2/APKBUILD
new file mode 100644
index 00000000000..2e5008660ba
--- /dev/null
+++ b/community/ruby-cap2/APKBUILD
@@ -0,0 +1,48 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+pkgname=ruby-cap2
+_gemname=cap2
+pkgver=0.2.2
+pkgrel=4
+pkgdesc="Ruby library for managing Linux process and file capabilities"
+url="https://github.com/lmars/cap2"
+arch="all"
+license="MIT"
+makedepends="libcap-dev ruby-dev"
+checkdepends="ruby-rspec"
+source="https://github.com/lmars/cap2/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
+builddir="$srcdir/$_gemname-$pkgver"
+options="!check" # FIXME: some tests are broken
+
+build() {
+ gem build $_gemname.gemspec
+ gem install \
+ --local \
+ --install-dir dist \
+ --ignore-dependencies \
+ --no-document \
+ --verbose \
+ $_gemname
+}
+
+check() {
+ GEM_PATH="dist" rspec spec
+}
+
+package() {
+ local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')"
+ cd "$builddir"/dist
+
+ mkdir -p "$gemdir"
+ cp -r extensions gems specifications "$gemdir"/
+
+ # Remove unnecessary files and rubbish...
+ find "$gemdir"/extensions/ -name mkmf.log -delete
+
+ cd "$gemdir"/gems/$_gemname-$pkgver
+ rm -r LICENSE Rakefile README.md ext/ lib/*.so spec/
+}
+
+sha512sums="
+d144b8b51f3568c1307265d06bb0f08a41b96e0f600ccf7dd6f67b6aca880bdb1ebc8338aefc1fd3e8bc218d3a407936efb671c9949d8c77f4429f8cd641a8b1 ruby-cap2-0.2.2.tar.gz
+"