# $Id: PKGBUILD 150715 2012-02-21 01:22:44Z angvp $
# Maintainer: Angel Velasquez <angvp@archlinux.org> 
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: damir <damir@archlinux.org>
# Contributor: Daniel Bainton <dpb [at] backarrow.org>

pkgname=ncmpc
pkgver=0.20
pkgrel=1
pkgdesc="A ncurses (command line) interface for MPD"
arch=("i686" "x86_64")
url="http://mpd.wikia.com/wiki/Client:Ncmpc"
license=('GPL')
depends=('ncurses' 'glib2' 'libmpdclient')
optdepends=('python2: to enable lyrics plugin'
	'ruby: to enable lyrics plugin')
source=("http://downloads.sourceforge.net/musicpd/${pkgname}-${pkgver}.tar.bz2")
md5sums=('62b9df0263d9567babf7446c258acc5d')

build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  sed -i 's#python#python2#' lyrics/30-leoslyrics.py
  ./configure --prefix=/usr \
    --sysconfdir=/etc \
    --enable-lyrics-screen \
    --with-lyrics-plugin-dir=/usr/share/ncmpc/lyrics
  make
}

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

  install -d ${pkgdir}/usr/share/ncmpc/lyrics
  install -m755 lyrics/{10-hd.sh,15-leoslyrics.sh,20-lyricwiki.rb,30-leoslyrics.py} \
    ${pkgdir}/usr/share/ncmpc/lyrics
}
