aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2021-10-17 20:51:57 +0200
committerJakub Jirutka <jakub@jirutka.cz>2021-10-18 18:44:44 +0200
commit10afa85f120f9c24496398ed01e04755991e2297 (patch)
tree23dedf5475aab2c195e5ac7b28f2a4a8bd55e630 /main
parentfa4d6b507115188e8207747e38221aaa4d4f6c92 (diff)
downloadaports-10afa85f120f9c24496398ed01e04755991e2297.tar.gz
aports-10afa85f120f9c24496398ed01e04755991e2297.tar.bz2
aports-10afa85f120f9c24496398ed01e04755991e2297.tar.xz
main/ruby-augeas: improve abuild and rebuild against ruby 3.0.2
Diffstat (limited to 'main')
-rw-r--r--main/ruby-augeas/APKBUILD74
1 files changed, 52 insertions, 22 deletions
diff --git a/main/ruby-augeas/APKBUILD b/main/ruby-augeas/APKBUILD
index 858dcf94ab..f5b8adbd56 100644
--- a/main/ruby-augeas/APKBUILD
+++ b/main/ruby-augeas/APKBUILD
@@ -1,33 +1,63 @@
# Contributor: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
+# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>
-_gemname=ruby-augeas
-pkgname=$_gemname
+pkgname=ruby-augeas
+_gemname=$pkgname
pkgver=0.5.0
-pkgrel=8
-pkgdesc="Augeas bindings for Ruby"
-url=http://rubygems.org/gems/$_gemname
-arch=all
+pkgrel=9
+pkgdesc="Ruby bindings for Augeas"
+url="https://augeas.net/"
+arch="all"
license="LGPL-2.1-or-later"
-depends=ruby
-makedepends="augeas-dev ruby-dev"
-source=https://rubygems.org/downloads/$_gemname-$pkgver.gem
+depends="ruby"
+checkdepends="ruby-test-unit"
+makedepends="augeas-dev ruby-dev ruby-rake"
+subpackages="$pkgname-doc"
+source="https://github.com/hercules-team/ruby-augeas/archive/release-$pkgver/$_gemname-$pkgver.tar.gz"
+builddir="$srcdir/$_gemname-release-$pkgver"
-builddir=$srcdir/$_realname-$pkgver
build() {
- return 0
+ rake gem
+
+ gem install \
+ --local \
+ --install-dir dist \
+ --ignore-dependencies \
+ --document ri \
+ --verbose \
+ pkg/$_gemname-$pkgver.gem
+
+ # Remove duplicated files (sdbm.so is loaded from extensions directory).
+ rm -f dist/gems/$_gemname-*/lib/*.so
+ rm -rf dist/gems/$_gemname-*/ext
+}
+
+check() {
+ GEM_PATH='./dist' rake test
}
package() {
- local _gemdir="$(ruby -e 'puts Gem.default_dir')"
- local _geminstdir=$_gemdir/gems/$_gemname-$pkgver
- mkdir -p "$pkgdir"
-
- gem install --local --install-dir "$pkgdir"/$_gemdir \
- --ignore-dependencies --verbose \
- "$srcdir"/$_gemname-$pkgver.gem
- rm -rf "$pkgdir"/$_gemdir/cache \
- "$pkgdir"/$_geminstdir/ext \
- "$pkgdir"/$_geminstdir/.require_paths
+ local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')"
+ local geminstdir="$gemdir/gems/$_gemname-$pkgver"
+
+ cd "$builddir"/dist
+
+ mkdir -p "$gemdir"
+ cp -r doc extensions gems specifications "$gemdir"/
+
+ # Remove unnecessary files.
+ find "$gemdir"/extensions/ -name mkmf.log -delete
+
+ cd "$geminstdir"
+ rm -rf COPYING NEWS README.* Rakefile tests
+}
+
+doc() {
+ pkgdesc="$pkgdesc (ri docs)"
+
+ amove "$(ruby -e 'puts Gem.default_dir')"/doc
}
-sha512sums="523742368543c617baa2b393e4682451d7fe20aecbcf9ab50fed0f5575119b3fbc06f79f0894cca728d2fee7d441cdd9f075dbcf81628835ba870930c3d2ac8d ruby-augeas-0.5.0.gem"
+sha512sums="
+6d1b152214d77bdc32a053627388398dcd01f1d9901f267e50a01edcf6aa64d2480275bdd8f4b13e4de48034af67ed02ba0f5c03cecc155bb528ad96ff1db8f0 ruby-augeas-0.5.0.tar.gz
+"