# $Id: PKGBUILD 64565 2012-02-16 16:25:26Z tdziedzic $
# Maintainer: Dave Reisner <dreisner@archlinux.org>
# Contributor: Alexander Fehr <pizzapunk gmail com>

pkgname=rubyripper
pkgver=0.6.2
pkgrel=2
pkgdesc="Secure audiodisc ripper"
arch=('any')
url="http://code.google.com/p/rubyripper/"
license=('GPL3')
depends=('ruby' 'cdparanoia' 'gtk2' 'hicolor-icon-theme')
optdepends=('ruby-gtk2: GTK+ GUI'
            'cd-discid: Freedb support'
            'eject: Eject support'
            'lame: MP3 encoding support'
            'vorbis-tools: Ogg Vorbis encoding support'
            'flac: FLAC encoding support'
            'wavegain: WAV ReplayGain support'
            'mp3gain: MP3 ReplayGain support'
            'vorbisgain: Ogg Vorbis ReplayGain support'
            'normalize: Normalization support'
            'cdrdao: Advanced TOC analysis')
install=rubyripper.install
source=(http://rubyripper.googlecode.com/files/rubyripper-$pkgver.tar.bz2)
md5sums=('04ee16c117ef8d839c3681b62839e8af')

build() {
  cd $srcdir/rubyripper-$pkgver

  ./configure \
    --prefix=/usr \
    --enable-gtk2 \
    --enable-cli \
    --ruby=$(ruby -e 'v = RbConfig::CONFIG["vendorlibdir"] ; v["/usr"] = ""; puts v')
}

package() {
  cd $srcdir/rubyripper-$pkgver

  make DESTDIR=$pkgdir install
}
