Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <abaumann@buildmaster.archlinux32.org>2022-10-06 11:10:36 +0200
committerAndreas Baumann <abaumann@buildmaster.archlinux32.org>2022-10-06 11:10:36 +0200
commit76b119b9bad41d65f5e1cdbe3c0099f7093075b9 (patch)
tree44be472afc21cf205a1dea739a336e3175472ff7
parent0c684b45945a85542028226d408dd0b5394e5739 (diff)
build-support/ruby-bootstrap: another try installing in /opt and symlink for building ruby modules
-rw-r--r--build-support/ruby-bootstrap/PKGBUILD110
1 files changed, 11 insertions, 99 deletions
diff --git a/build-support/ruby-bootstrap/PKGBUILD b/build-support/ruby-bootstrap/PKGBUILD
index 0d065625..41b72d8c 100644
--- a/build-support/ruby-bootstrap/PKGBUILD
+++ b/build-support/ruby-bootstrap/PKGBUILD
@@ -5,8 +5,10 @@
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: John Proctor <jproctor@prium.net>
# Contributor: Jeramy Rutley <jrutley@gmail.com>
+# Arch32 bootstrap
+# Contributor: Andreas Baumann <andreas.baumann@eurospider.com>
-pkgname=(ruby-bootstrap ruby-stdlib-bootstrap ruby-bundledgems-bootstrap)
+pkgname=(ruby-bootstrap)
pkgver=3.0.4
pkgrel=9
arch=(i486 i686 pentium4 x86_64)
@@ -21,11 +23,7 @@ build() {
cd ruby-${pkgver}
./configure \
- --prefix=/usr \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --sharedstatedir=/var/lib \
- --libexecdir=/usr/lib/ruby \
+ --prefix=/opt/${pkgname}-${pkgver} \
--enable-shared \
--disable-rpath \
--with-dbm-type=gdbm_compat
@@ -51,97 +49,11 @@ package_ruby-bootstrap() {
make DESTDIR="${pkgdir}" install-nodoc
- install -D -m644 COPYING "${pkgdir}/usr/share/licenses/ruby/LICENSE"
- install -D -m644 BSDL "${pkgdir}/usr/share/licenses/ruby/BSDL"
-
- rubyver=${pkgver:0:3}.0
-
- # remove rubygems as it shipped as a separate package
- rm -r "${pkgdir}"/usr/lib/ruby/${rubyver}/{rubygems,rubygems.rb}
- rm "${pkgdir}"/usr/bin/gem
-
- # remove bundler as it shipped as a separate package
- rm -r "${pkgdir}"/usr/lib/ruby/${rubyver}/{bundler,bundler.rb}
- rm "${pkgdir}"/usr/bin/{bundle,bundler}
-
- # remove bundled rdoc gem
- rm -r "${pkgdir}"/usr/lib/ruby/${rubyver}/{rdoc,rdoc.rb}
- rm "${pkgdir}"/usr/bin/{rdoc,ri}
- rm "${pkgdir}"/usr/share/man/man1/ri.1
-
- # remove irb as it is a separate package now
- rm -r "${pkgdir}"/usr/lib/ruby/${rubyver}/{irb,irb.rb}
- rm "${pkgdir}"/usr/bin/irb
- rm "${pkgdir}"/usr/share/man/man1/irb.1
-
- # remove other binaries that are shipped as separate packages
- rm "${pkgdir}"/usr/bin/{rake,rbs,typeprof,erb,racc}
- rm "${pkgdir}"/usr/share/man/man1/erb.1
-
- # remove all bundled gems to avoid conflicts with ruby-* Arch packages
- rm -r "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/gems/*
- rm "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/specifications/*.gemspec
- rm "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/cache/*.gem
-
- # remove already packaged stdlib gems (needs to be as dependency in ruby-stdlib)
- local stdlib_gems=(
- abbrev
- base64
- benchmark
- bigdecimal
- bundler
- cgi
- csv
- date
- delegate
- did_you_mean
- digest
- drb
- english
- erb
- etc
- fcntl
- fiddle
- fileutils
- find
- forwardable
- getoptlong
- io-console
- io-nonblock
- io-wait
- ipaddr
- irb
- json
- logger
- mutex_m
- net-http
- open-uri
- psych
- rdoc
- reline
- stringio
- time
- tmpdir
- uri
- )
-
- for stdlib_gem in "${stdlib_gems[@]}"; do
- rm -v "${pkgdir}"/usr/lib/ruby/gems/${rubyver}/specifications/default/${stdlib_gem}-*.gemspec
- done
-}
-
-package_ruby-stdlib-bootstrap() {
- # upstream list of gems contained in stdlib ( https://github.com/ruby/ruby/tree/master/{ext,lib} )
- pkgdesc='A vast collection of classes and modules that you can require in your code for additional features'
-
- depends=(
- )
-}
-
-package_ruby-bundledgems-bootstrap() {
- # upstream list of bundled gems ( https://github.com/ruby/ruby/blob/master/gems/bundled_gems )
- pkgdesc='Ruby Gems (third-party libraries) that are installed by default when Ruby is installed'
-
- depends=(
- )
+ install -D -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}-${pkgver}/LICENSE"
+ install -D -m644 BSDL "${pkgdir}/usr/share/licenses/${pkgname}-${pkgver}/BSDL"
+
+ # make sure we have binaries in the path
+ mkdir -p "${pkgdir}"/usr/bin
+ ln -s /opt/"${pkgname}-${pkgver}"/bin/ruby "${pkgdir}"/usr/bin/ruby
+ ln -s /opt/"${pkgname}-${pkgver}"/bin/gem "${pkgdir}"/usr/bin/gem
}