You are not logged in.

#1 2014-06-16 17:05:07

darenw
Member
From: Trego Montana
Registered: 2008-07-04
Posts: 112
Website

ruby-audio from AUR fails to build [SOLVED]

I'm attempting to install ruby-audio from AUR.  Got the PKGBUILD file.  Running makepkg results in a complaint about options for an install directory.   I'm not expert enough at the ruby ecosystem and gem to see any obvious problem.  What is the fix? 

=> makepkg
==> Making package: ruby-audio 1.6.1-1 (Mon Jun 16 09:51:10 PDT 2014)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found ruby-audio-1.6.1.gem
==> Validating source files with md5sums...
    ruby-audio-1.6.1.gem ... Passed
==> Extracting sources...
==> Removing existing pkg/ directory...
==> Entering fakeroot environment...
==> Starting package()...
ERROR:  Use --install-dir or --user-install but not both
==> ERROR: A failure occurred in package().
    Aborting...

Apparently the error is in the package() routine in PKGBUILD:

package() {
  cd "$srcdir"
  # _gemdir is defined inside package() because if ruby[gems] is not installed on
  # the system, makepkg will exit with an error when sourcing the PKGBUILD.
  local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')"

  gem install --ignore-dependencies -i "$pkgdir$_gemdir" -n "$pkgdir/usr/bin" \
    "$_gemname-$pkgver.gem"
}

A search here in the Arch forums turned up nothing.

Last edited by darenw (2014-06-19 03:43:00)


Artist/Physicist, Herder of Pixels, Photons and Electrons

Offline

#2 2014-06-19 01:08:49

Joel
Member
From: Tijuana, BC, México
Registered: 2011-12-21
Posts: 122

Re: ruby-audio from AUR fails to build [SOLVED]

Tell me if this works for you:

# Maintainer: Josh Klar <j@iv597.com>
# Contributor: Joel Almeida <aullidolunar at gmail dot c0m>

pkgname=ruby-audio
pkgver=1.6.1
pkgrel=2
pkgdesc="Wrapper around libsndfile to provide simplified sound reading and writing support for Ruby"
arch=("any")
url="http://rubygems.org/gems/ruby-audio"
license=('GPL')
depends=("ruby" "libsndfile")
source=("https://rubygems.org/downloads/$pkgname-$pkgver.gem")
noextract=('$pkgname-$pkgver.gem')
md5sums=('d4f5cea4c14190ca67231a0349b6e141')

package() {
	cd "$srcdir"
	local _gemdir="$(ruby -e'puts Gem.default_dir')"
	gem install --ignore-dependencies --no-user-install -i "$pkgdir/$_gemdir" -n "$pkgdir/usr/bin" $pkgname-$pkgver.gem
	rm "$pkgdir/$_gemdir/cache/$pkgname-$pkgver.gem"
	install -Dm644 "$pkgdir$_gemdir/gems/$pkgname-$pkgver/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/MIT-LICENSE"
}

build() {
	cd "$srcdir"
}

Last edited by Joel (2014-06-19 01:22:00)


* PC: Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM: Archlinux-i686 with xfce4.
* Laptop: Intel Core 2 DUO T6600 @ 2.20 GHz with 4 GB RAM: Archlinux-x86-64 with xfce4.
* AUR contributor.

Offline

#3 2014-06-19 03:42:23

darenw
Member
From: Trego Montana
Registered: 2008-07-04
Posts: 112
Website

Re: ruby-audio from AUR fails to build [SOLVED]

Yes, that works fine.  Problem solved!   

Now, I forget why I wanted to use audio in ruby... but that's another problem smile


Artist/Physicist, Herder of Pixels, Photons and Electrons

Offline

Board footer

Powered by FluxBB