# $Id: PKGBUILD 94973 2013-08-01 22:38:12Z alucryd $
# Maintainer: Maxime Gauduin <alucryd@gmail.com>
# Contributor: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: BlackEagle <ike.devolder@gmail.com>
# Contributor: Dany Martineau <dany.luc.martineau@gmail.com>

pkgname=clementine
pkgver=1.1.1
pkgrel=9
pkgdesc="A music player and library organizer"
url="http://www.clementine-player.org/"
license=('GPL')
arch=('i686' 'x86_64')
depends=('chromaprint' 'gstreamer0.10-base' 'libcdio' 'libgpod' 'liblastfm' 'libmtp' 'projectm' 'protobuf' 'qca-ossl' 'qjson' 'taglib')
makedepends=('cmake' 'boost' 'mesa' 'sparsehash')
optdepends=('gstreamer0.10-base-plugins: "Base" plugin libraries'
            'gstreamer0.10-good-plugins: "Good" plugin libraries'
            'gstreamer0.10-bad-plugins: "Bad" plugin libraries'
            'gstreamer0.10-ugly-plugins: "Ugly" plugin libraries'
            'gvfs: Various devices support')
install=clementine.install
source=("http://clementine-player.googlecode.com/files/${pkgname}-${pkgver}.tar.gz"
        'clementine-1.1.1-libimobiledevice-fix.patch')
md5sums=('28e4afb822388bd337a761db8f86febf'
         '736df6cd828a3172701f63c8dc978cb9')

prepare() {
  cd ${pkgname}-${pkgver}

  patch -Np1 -i ../clementine-1.1.1-libimobiledevice-fix.patch
}

build() {
  cd ${pkgname}-${pkgver}

  if [[ -d build ]]; then
    rm -rf build
  fi
  mkdir build && cd build

  cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DUSE_SYSTEM_PROJECTM=1 -DBUILD_WERROR=0
  make
}

package() {
  cd ${pkgname}-${pkgver}/build

  make DESTDIR="${pkgdir}" install
}

# vim: ts=2 sw=2 et:
