# $Id: PKGBUILD 128691 2015-03-04 05:52:12Z bpiotrowski $
# Maintainer:  Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: graysky <graysky AT archlinux DOT us>
# Contributor: Mateusz Herych <heniekk@gmail.com>
# Contributor: Army <uli[dot]armbruster[at]gmail[dot]com>

pkgname=ncmpcpp
pkgver=0.6.3
pkgrel=1
pkgdesc='Almost exact clone of ncmpc with some new features'
arch=('i686' 'x86_64')
url='http://ncmpcpp.rybczak.net/'
license=('GPL')
depends=('curl' 'libmpdclient' 'taglib' 'ncurses' 'fftw' 'boost-libs')
makedepends=('boost')
source=(http://ncmpcpp.rybczak.net/stable/ncmpcpp-$pkgver.tar.bz2
        missing-include.patch)
md5sums=('b4af4c7405ce12033757c1cd1f9900c5'
         '14fa33349661c8e6c2a323970ef1e98c')

prepare() {
  cd $pkgname-$pkgver
  patch -p1 -i ../missing-include.patch
}

build() {
  cd $pkgname-$pkgver
  BOOST_LIB_SUFFIX='' ./configure --prefix=/usr \
    --enable-clock \
    --enable-outputs \
    --enable-unicode \
    --enable-visualizer \
    --with-curl \
    --with-fftw \
    --with-taglib
  make
}

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

  make -C extras
  install -Dm755 extras/artist_to_albumartist "$pkgdir"/usr/bin/
}
