# $Id: PKGBUILD 228306 2015-01-01 02:34:37Z eric $
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=moc
pkgver=2.5.0
pkgrel=2
epoch=1
pkgdesc="An ncurses console audio player designed to be powerful and easy to use"
arch=('i686' 'x86_64')
url="http://moc.daper.net/"
license=('GPL')
depends=('libmad' 'libid3tag' 'jack' 'curl' 'libltdl' 'file')
makedepends=('speex' 'ffmpeg' 'taglib' 'libmpcdec' 'wavpack' 'libmodplug' 'faad2')
optdepends=('speex: for using the speex plugin'
	    'ffmpeg: for using the ffmpeg plugin'
	    'taglib: for using the musepack plugin'
	    'libmpcdec: for using the musepack plugin'
            'wavpack: for using the wavpack plugin'
            'faad2: for using the aac plugin'
	    'libmodplug: for using the modplug plugin')
source=(http://ftp.daper.net/pub/soft/moc/stable/${pkgname}-${pkgver}.tar.bz2{,.sig})
sha1sums=('a02c10075541995771dbdccb7f2d0ecd19d70b81'
          'SKIP')
validpgpkeys=('59359B80406D9E73E80599BEF3121E4F2885A7AA')

build() {
  cd ${pkgname}-${pkgver}
  ./configure --prefix=/usr --without-rcc \
    --with-oss --with-alsa --with-jack --with-aac --with-mp3 \
    --with-musepack --with-vorbis --with-flac --with-wavpack \
    --with-sndfile --with-modplug --with-ffmpeg --with-speex \
    --with-samplerate --with-curl  --disable-cache --disable-debug
  make
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" install
}
