From d509ac9685f4ab9eda997553a8cf4131befab417 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 19 Oct 2013 01:18:21 -0700 Subject: Sat Oct 19 01:17:18 PDT 2013 --- community/rubinius/PKGBUILD | 105 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 community/rubinius/PKGBUILD (limited to 'community/rubinius/PKGBUILD') diff --git a/community/rubinius/PKGBUILD b/community/rubinius/PKGBUILD new file mode 100644 index 000000000..e51cf9e29 --- /dev/null +++ b/community/rubinius/PKGBUILD @@ -0,0 +1,105 @@ +# $Id: PKGBUILD 98780 2013-10-18 13:13:13Z heftig $ +# Maintainer: Jan Alexander Steffens (heftig) + +pkgbase=rubinius +pkgname=(rubinius rubinius-ruby) +pkgver=2.1.0 +pkgrel=1 +pkgdesc="Ruby runtime written in Ruby, designed for concurrency" +arch=(i686 x86_64) +url="http://rubini.us" +license=(custom) +depends=(llvm-libs libffi openssl libyaml) +makedepends=(llvm ruby chrpath) +options=(!emptydirs) + +_gems=(bundler-1.3.5.gem + daedalus-core-0.0.1.gem + gems-0.8.3.gem + redcard-1.1.0.gem + rubinius-bridge-1.0.3.gem) + +source=(http://releases.rubini.us/${pkgbase}-${pkgver}.tar.bz2 + gemrc) + +for _i in "${_gems[@]}"; do + source+=( http://rubygems.org/downloads/${_i} ) +done + +sha256sums=('78d7c2af7ebdf9b477a682cf4793e56e4139abed3cd752282e422d56e63b65b6' + '4bb7eb2fe66e396ed16b589cdb656831407b39ad4e138d88536754c0448ac614' + '08b89047f7b829f3e197a28fb1bde74c3f5cfea1552f99dfba237fee30eaffe4' + 'baa2a27713fac17ca21bc2515a227cde4b10aa1a01e1365e1ee5372c72816ff0' + '2bcf69bb8fb90dd1f926fb7d8f2d8c9857540e04385ac742999a05c74fe24a05' + '60c73d440f29fc3577eec86de00d55ee5351647d2d450ea48bc6d2ae5a62b8fc' + '246ba09a6506e1c380acccc0e3058e83fec89904572d3214f797ccb604453981') + +prepare() { + export GEM_HOME="$srcdir/gemdir" + + mkdir -p "$GEM_HOME" + gem install --no-user-install -N bundler-1.3.5.gem + cp -n "${_gems[@]}" $pkgbase-$pkgver/vendor/cache + + cd $pkgbase-$pkgver + "$GEM_HOME/bin/bundle" install --local +} + +build() { + export GEM_HOME="$srcdir/gemdir" + cd $pkgbase-$pkgver + + ./configure --prefix=/usr \ + --mandir=/usr/share/man \ + --includedir=/usr/include/rubinius \ + --appdir=/usr/lib/rubinius \ + --gemsdir=/usr/lib/rubinius/gems \ + --preserve-prefix \ + --llvm-shared + rake build +} + +check() { + export GEM_HOME="$srcdir/gemdir" + cd $pkgbase-$pkgver + + rake vm:test || : +} + +package_rubinius() { + optdepends=('rubinius-docs: Rubinius documentation' + 'ruby-docs: Ruby documentation') + + export GEM_HOME="$srcdir/gemdir" + cd $pkgbase-$pkgver + + DESTDIR="$pkgdir" rake install + + find "$pkgdir" -name "*.so" -exec chrpath -d {} + + chrpath -d "$pkgdir/usr/bin/rbx" + + mkdir -p "$pkgdir/usr/share/ri" + ln -s 2.0.0 "$pkgdir/usr/share/ri/2.1" + + install -Dm644 LICENSE "$pkgdir/usr/share/licenses/rubinius/LICENSE" + +### Split rubinius-ruby + mkdir -p "$srcdir/ruby/usr/bin" + for _f in "$pkgdir"/usr/bin/*; do + [[ $_f == */rbx ]] && continue + mv $_f "$srcdir/ruby/usr/bin" + done +} + +package_rubinius-ruby() { + pkgdesc="Ruby compat for Rubinius" + depends=(rubinius) + provides=(ruby) + conflicts=(ruby) + backup=(etc/gemrc) + + mv ruby/* "$pkgdir" + install -Dm644 gemrc "$pkgdir/etc/gemrc" + install -d "$pkgdir/usr/share/licenses/rubinius-ruby" + ln -s ../rubinius/LICENSE "$pkgdir/usr/share/licenses/rubinius-ruby/LICENSE" +} -- cgit v1.2.3-54-g00ecf