aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-12-25 22:22:57 +0100
committerJakub Jirutka <jakub@jirutka.cz>2017-12-26 18:41:52 +0100
commit0da839a9643b694ce57840562b7e217d047b9312 (patch)
tree03f745ea7c9f6023896c49218963f44d953b0b83 /main
parent12a9b503b473101f1594e97bc88d4ee85a15538f (diff)
downloadaports-0da839a9643b694ce57840562b7e217d047b9312.tar.bz2
aports-0da839a9643b694ce57840562b7e217d047b9312.tar.xz
main/ruby: add subpackage -full
Diffstat (limited to 'main')
-rw-r--r--main/ruby/APKBUILD17
-rw-r--r--main/ruby/ruby.post-upgrade17
2 files changed, 34 insertions, 0 deletions
diff --git a/main/ruby/APKBUILD b/main/ruby/APKBUILD
index 4c3947d76b..5d43b376dd 100644
--- a/main/ruby/APKBUILD
+++ b/main/ruby/APKBUILD
@@ -27,6 +27,7 @@ depends="ca-certificates"
depends_dev="gmp-dev"
makedepends="$depends_dev zlib-dev libressl-dev gdbm-dev db-dev readline-dev
libffi-dev coreutils yaml-dev linux-headers autoconf"
+install="$pkgname.post-upgrade"
subpackages="$pkgname-doc $pkgname-dev
$pkgname-bigdecimal
$pkgname-dbm
@@ -47,6 +48,7 @@ subpackages="$pkgname-doc $pkgname-dev
$pkgname-webrick::noarch
$pkgname-xmlrpc::noarch
$pkgname-libs
+ $pkgname-full::noarch
"
source="ftp://ftp.ruby-lang.org/pub/ruby/${pkgver%.*}/$pkgname-$pkgver.tar.bz2
rubygems-avoid-platform-specific-gems.patch
@@ -63,6 +65,14 @@ case "$CARCH" in
*) _arch="$CARCH";;
esac
+_bundled_gems=""
+for _i in $subpackages; do
+ case "$_i" in
+ *-dev | *-doc | *-libs | *-full:*) continue;;
+ *) _bundled_gems="$_bundled_gems ${_i%%:*}";;
+ esac
+done
+
prepare() {
default_prepare
@@ -285,6 +295,13 @@ libs() {
mv "$pkgdir"/usr/lib "$subpkgdir"/usr/
}
+full() {
+ pkgdesc="Ruby with all bundled gems"
+ depends="ruby $_bundled_gems"
+
+ mkdir -p "$subpkgdir"
+}
+
_mv() {
local i; for i in "$@"; do
mkdir -p "$subpkgdir"/${i%/*}
diff --git a/main/ruby/ruby.post-upgrade b/main/ruby/ruby.post-upgrade
new file mode 100644
index 0000000000..6cba787e69
--- /dev/null
+++ b/main/ruby/ruby.post-upgrade
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+ver_new="$1"
+ver_old="$2"
+
+if [ "$(apk version -t "$ver_old" "2.5.0-r0")" = "<" ]; then
+ cat >&2 <<-EOF
+ *
+ * In Ruby 2.5 more parts of the stdlib has been splitted into standalone
+ * gems, yet still installed with Ruby by default. We have moved some of
+ * them into separate subpackages. If you don't know which subpackages you
+ * need, you may install meta-package "ruby-full".
+ *
+ EOF
+fi
+
+exit 0