Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2022-10-08 14:22:41 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2022-10-08 14:22:41 +0200
commit411f9c979dbea7778cddfbf81e204b8628f07e39 (patch)
treea5634ca72fec18d1b4b7cd516a4df165459a286e
parent426b293f55a6e3cf4c58db8d3553a330e861a42c (diff)
build-supprot/ruby-rake*-bootstrap: installing rake versions to /opt
-rw-r--r--build-support/ruby-rake-bootstrap/PKGBUILD36
-rw-r--r--build-support/ruby-rake-compiler-bootstrap/PKGBUILD55
2 files changed, 91 insertions, 0 deletions
diff --git a/build-support/ruby-rake-bootstrap/PKGBUILD b/build-support/ruby-rake-bootstrap/PKGBUILD
new file mode 100644
index 00000000..ab695547
--- /dev/null
+++ b/build-support/ruby-rake-bootstrap/PKGBUILD
@@ -0,0 +1,36 @@
+# Maintainer: Anatol Pomozov <anatol.pomozov@gmail.com>
+
+_gemname=rake
+pkgname=ruby-$_gemname-bootstrap
+pkgver=13.0.6
+pkgrel=1
+pkgdesc='Make-like build tool implemented in Ruby'
+provides=(rake)
+arch=(any)
+url='https://ruby.github.io/rake/'
+license=(MIT)
+depends=(ruby)
+options=(!emptydirs)
+source=(https://rubygems.org/downloads/$_gemname-$pkgver.gem)
+noextract=($_gemname-$pkgver.gem)
+sha512sums=('9dbcd1ef4d93f4853b3da40b29890509bb260e13e5500f5a0502645ce762d6e50ee7dd6bd59d08d135868dab579e10344920ba246079cde7048e3510bd473ea2')
+
+package() {
+ local _gemdir="$(ruby -e'puts Gem.default_dir')"
+ gem install --ignore-dependencies --no-user-install --no-document -i "$pkgdir/$_gemdir" -n "$pkgdir/usr/bin" $_gemname-$pkgver.gem
+ rm "$pkgdir/$_gemdir/cache/$_gemname-$pkgver.gem"
+}
+
+# building with ruby-bootstrap in /opt/ruby-xxx, but install into /usr
+# and depend on 'ruby'
+makedepends+=(ruby-bootstrap)
+
+# install to bootstrap locatio /opt/ruby-xxx
+eval "$(
+ declare -f package | \
+ sed '
+ /_gemdir/ a mkdir -p "${pkgdir}"/opt/ruby-bootstrap-3.0.4/bin
+ '
+)"
+
+unset check
diff --git a/build-support/ruby-rake-compiler-bootstrap/PKGBUILD b/build-support/ruby-rake-compiler-bootstrap/PKGBUILD
new file mode 100644
index 00000000..af7a1e9e
--- /dev/null
+++ b/build-support/ruby-rake-compiler-bootstrap/PKGBUILD
@@ -0,0 +1,55 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+
+_gemname=rake-compiler
+pkgname=ruby-${_gemname}-bootstrap
+pkgver=1.2.0
+pkgrel=1
+pkgdesc='Rake-based Ruby Extension (C, Java) task generator'
+url='https://github.com/rake-compiler/rake-compiler'
+arch=('any')
+license=('MIT')
+depends=('ruby' 'rubygems' 'ruby-rake-bootstrap')
+makedepends=('ruby-rdoc')
+options=('!emptydirs')
+source=(https://github.com/rake-compiler/rake-compiler/archive/v${pkgver}/${pkgname}-v${pkgver}.tar.gz)
+sha512sums=('77b6dd8b976039484ec7d6bb9e0b2432d40153f218ce2e1d242246711d40dc3ed9be7ba6ec99ee8fd89192ab04d5d1a97b4d1c089c86c7d20b163eb8d4ae68d5')
+b2sums=('56394a2a8d6761f0f36bbc9fa63b2c36e57a33ba6c0bc660f31ef671e9fa90c581d65acb218ba8699dda7793fe6b8eac03e988c9a6dd486df422fd1228bc8b72')
+
+prepare() {
+ cd ${_gemname}-${pkgver}
+ sed -r 's|~>|>=|g' -i ${_gemname}.gemspec
+}
+
+build() {
+ cd ${_gemname}-${pkgver}
+ gem build ${_gemname}.gemspec
+}
+
+package() {
+ cd ${_gemname}-${pkgver}
+ local _gemdir="$(gem env gemdir)"
+ gem install --ignore-dependencies --no-user-install -i "${pkgdir}${_gemdir}" \
+ -n "${pkgdir}/usr/bin" ${_gemname}-${pkgver}.gem
+ install -Dm 644 LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm 644 README.md History.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+
+ cd "${pkgdir}/${_gemdir}"
+ rm -rf cache gems/${_gemname}-${pkgver}/{ext,lib/*/*.so} \
+ extensions/*/*/${_gemname}-${pkgver}/{mkmf.log,gem_make.out}
+}
+
+# vim: ts=2 sw=2 et:
+
+# building with ruby-bootstrap in /opt/ruby-xxx, but install into /usr
+# and depend on 'ruby'
+makedepends+=(ruby-bootstrap)
+
+# install to bootstrap locatio /opt/ruby-xxx
+eval "$(
+ declare -f package | \
+ sed '
+ /_gemdir/ a mkdir -p "${pkgdir}"/opt/ruby-bootstrap-3.0.4/bin
+ '
+)"
+
+unset check