aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ruby-escape_utils/APKBUILD
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-12-05 19:34:01 +0100
committerJakub Jirutka <jakub@jirutka.cz>2017-12-05 19:34:35 +0100
commit0aa7e3a680ae4d0ebae2c649da66bbad178cc188 (patch)
treed6caed300415dc6d12b8b85d6efa37d8053bc53c /testing/ruby-escape_utils/APKBUILD
parent5c0ed8085b3e22e34775fc304fed265121de4838 (diff)
downloadaports-0aa7e3a680ae4d0ebae2c649da66bbad178cc188.tar.bz2
aports-0aa7e3a680ae4d0ebae2c649da66bbad178cc188.tar.xz
testing/ruby-escape_utils: new aport
Faster string escaping routines for your Ruby apps https://github.com/brianmario/escape_utils
Diffstat (limited to 'testing/ruby-escape_utils/APKBUILD')
-rw-r--r--testing/ruby-escape_utils/APKBUILD47
1 files changed, 47 insertions, 0 deletions
diff --git a/testing/ruby-escape_utils/APKBUILD b/testing/ruby-escape_utils/APKBUILD
new file mode 100644
index 0000000000..fcd8411265
--- /dev/null
+++ b/testing/ruby-escape_utils/APKBUILD
@@ -0,0 +1,47 @@
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
+# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
+# TODO: Fix to not compile .so lib twice (in build and test).
+pkgname=ruby-escape_utils
+_gemname=${pkgname#ruby-}
+pkgver=1.2.1
+pkgrel=0
+pkgdesc="Faster string escaping routines for your Ruby apps"
+url="https://github.com/brianmario/escape_utils"
+arch="all"
+license="MIT"
+checkdepends="ruby ruby-bundler ruby-minitest ruby-rake-compiler"
+makedepends="ruby-dev"
+source="$pkgname-$pkgver.tar.gz::https://github.com/brianmario/escape_utils/archive/$pkgver.tar.gz
+ gemspec.patch"
+builddir="$srcdir/$_gemname-$pkgver"
+
+build() {
+ cd "$builddir"
+
+ gem build $_gemname.gemspec
+ gem install --local \
+ --install-dir dist \
+ --ignore-dependencies \
+ --no-document \
+ --verbose \
+ $_gemname
+}
+
+check() {
+ cd "$builddir"
+ rake test
+}
+
+package() {
+ local gemdir="$pkgdir/$(ruby -rubygems -e 'puts Gem.default_dir')"
+ cd "$builddir"/dist
+
+ mkdir -p "$gemdir"
+ cp -r extensions gems specifications "$gemdir"/
+
+ # Remove unnecessary files.
+ rm -r "$gemdir"/gems/$_gemname-$pkgver/ext
+}
+
+sha512sums="c2af40a2a3c0cc083a55771e2ed813992391c833b6d64cb9255ec5741c2da6980ddf34331256b73f18617cf8df6b745e81bdd6c1632d63936ccd3a655758b083 ruby-escape_utils-1.2.1.tar.gz
+8cb3c26b46304899b2d200208c18650ab28da81ea42d8479a89b06802d252757df537c997fe5f640122a4521016f0676c267c691bc6be33ce066fe4be0c504d5 gemspec.patch"