aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ruby-unf_ext/APKBUILD
diff options
context:
space:
mode:
authorKeith Maxwell <keith.maxwell@gmail.com>2019-05-20 17:49:05 +0100
committerKevin Daudt <kdaudt@alpinelinux.org>2019-05-21 13:38:37 +0000
commitdad002e808bbc06da294cdf0a4a279d30374b08d (patch)
tree7dbf7a8d6d90f8fef2c2d1ffbf5f9d6fe8cb3260 /testing/ruby-unf_ext/APKBUILD
parent9b98e2e03da4d14e0fe14d97e9f93201cf9669a6 (diff)
downloadaports-dad002e808bbc06da294cdf0a4a279d30374b08d.tar.bz2
aports-dad002e808bbc06da294cdf0a4a279d30374b08d.tar.xz
testing/ruby-unf_ext: new package
Diffstat (limited to 'testing/ruby-unf_ext/APKBUILD')
-rw-r--r--testing/ruby-unf_ext/APKBUILD57
1 files changed, 57 insertions, 0 deletions
diff --git a/testing/ruby-unf_ext/APKBUILD b/testing/ruby-unf_ext/APKBUILD
new file mode 100644
index 0000000000..02c9cafdb9
--- /dev/null
+++ b/testing/ruby-unf_ext/APKBUILD
@@ -0,0 +1,57 @@
+# Contributor: Keith Maxwell <keith.maxwell@gmail.com>
+# Maintainer: Keith Maxwell <keith.maxwell@gmail.com>
+pkgname=ruby-unf_ext
+_gemname=unf_ext
+pkgver=0.0.7.6
+pkgrel=0
+pkgdesc="Unicode Normalization Form support library for CRuby"
+url="https://github.com/knu/ruby-unf_ext/"
+arch="all"
+license="MIT"
+makedepends="ruby-dev"
+checkdepends="ruby-test-unit"
+source="https://rubygems.org/gems/$_gemname-$pkgver.gem
+ gemspec.patch
+ test-helper.patch
+ "
+
+builddir="$srcdir/$_gemname-$pkgver"
+
+unpack() {
+ default_unpack
+
+ cd "$srcdir"
+ gem unpack "$_gemname-$pkgver.gem"
+}
+
+build() {
+ cd "$builddir/ext/unf_ext"
+ ruby extconf.rb
+ make
+
+ cd "$builddir"
+ cp ext/unf_ext/unf_ext.so lib/unf_ext.so
+ gem build ./unf_ext.gemspec
+}
+
+check() {
+ ruby -Ilib:test:. test/test_unf_ext.rb
+}
+
+package() {
+ local _gemdir
+ _gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')"
+ gem install --local \
+ --install-dir "$_gemdir" \
+ --ignore-dependencies \
+ --no-document \
+ --verbose \
+ "$builddir/$_gemname-$pkgver.gem"
+ cd "$_gemdir"
+ rm -r cache
+ rmdir build_info doc extensions
+}
+
+sha512sums="c6b6bc797015875b0a3422dc1e9656eae6c42d2263fd6e73ba41a1789ac1ffe927f81d5d9874973fd8d9bd9486494efa725b081e553954121588818d454db7f2 unf_ext-0.0.7.6.gem
+4a8ce282f732d3236d63494bac20d0a566b74b6d20b5ecc3df08a960cded2f72978795cb05c3fea6269867faf8b371b38d84a2228981d0b139a77566413eaa6b gemspec.patch
+fe494139d2d0d4fe183ac2079db90dfffab04736568a8d24e484f6ce0e71326a955e936d516a9f10362dc53706c6a98c408b4afce46fea4325b127f371a6d0c5 test-helper.patch"