aboutsummaryrefslogtreecommitdiffstats
path: root/community/ruby-unf_ext/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'community/ruby-unf_ext/APKBUILD')
-rw-r--r--community/ruby-unf_ext/APKBUILD60
1 files changed, 27 insertions, 33 deletions
diff --git a/community/ruby-unf_ext/APKBUILD b/community/ruby-unf_ext/APKBUILD
index 498561f08cc..cb1614d5c54 100644
--- a/community/ruby-unf_ext/APKBUILD
+++ b/community/ruby-unf_ext/APKBUILD
@@ -2,56 +2,50 @@
# Maintainer: Keith Maxwell <keith.maxwell@gmail.com>
pkgname=ruby-unf_ext
_gemname=unf_ext
-pkgver=0.0.7.6
-pkgrel=3
+pkgver=0.0.9.1
+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
+source="https://github.com/knu/ruby-unf_ext/archive/v$pkgver/ruby-unf_ext-$pkgver.tar.gz
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
+ gem build $_gemname.gemspec
+
+ gem install \
+ --local \
+ --install-dir dist \
+ --ignore-dependencies \
+ --no-document \
+ --verbose \
+ $_gemname
- cd "$builddir"
- cp ext/unf_ext/unf_ext.so lib/unf_ext.so
- gem build ./unf_ext.gemspec
+ # Remove unnecessary and duplicated files.
+ rm -f dist/extensions/*/*/$_gemname-*/mkmf.log
+ cd dist/gems/$_gemname-$pkgver
+ rm -rf ext/ lib/*.so README.*
}
check() {
- ruby -Ilib:test:. test/test_unf_ext.rb
+ GEM_PATH='./dist' 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
+ local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')"
+ cd "$builddir"/dist
+
+ mkdir -p "$gemdir"
+ cp -r extensions gems specifications "$gemdir"/
}
-sha512sums="c6b6bc797015875b0a3422dc1e9656eae6c42d2263fd6e73ba41a1789ac1ffe927f81d5d9874973fd8d9bd9486494efa725b081e553954121588818d454db7f2 unf_ext-0.0.7.6.gem
-4a8ce282f732d3236d63494bac20d0a566b74b6d20b5ecc3df08a960cded2f72978795cb05c3fea6269867faf8b371b38d84a2228981d0b139a77566413eaa6b gemspec.patch
-fe494139d2d0d4fe183ac2079db90dfffab04736568a8d24e484f6ce0e71326a955e936d516a9f10362dc53706c6a98c408b4afce46fea4325b127f371a6d0c5 test-helper.patch"
+sha512sums="
+ed3bbff1145f8234c88205f00c608d66fabd4986cb328d44526a9e68e925f8534c6eff6b7a002e76b9d6d5092f83622c7bb7bc642df82b629b618fe1008f20c4 ruby-unf_ext-0.0.9.1.tar.gz
+54a2b6b9fe507eda737016eda821dbe303ea9178f6c8b0f9c0ec4964eb78ff478a1e9f4289874dc930d49b4dc8faca292f247c7513c481ada669198d08bc24c8 gemspec.patch
+fe494139d2d0d4fe183ac2079db90dfffab04736568a8d24e484f6ce0e71326a955e936d516a9f10362dc53706c6a98c408b4afce46fea4325b127f371a6d0c5 test-helper.patch
+"