# $Id: PKGBUILD 96084 2013-08-20 06:32:24Z lcarlier $
# Maintainer: Felix Yan <felixonmars@gmail.com>
# Contributor: Karol "Kenji Takahashi" Woźniak <kenji.sx>
# Contributor: Mantas Mikulėnas <grawity@gmail.com>

pkgname=morituri
pkgver=0.2.2
pkgrel=2
pkgdesc="a CD ripper aiming for accuracy over speed, modelled after Exact Audio Copy"
arch=('any')
url="https://github.com/thomasvs/morituri"
license=("GPL3")
depends=(
    "cdparanoia"
    "cdrdao"
    "gstreamer0.10-base"
    "gstreamer0.10-base-plugins"
    "gstreamer0.10-python"
    "python2-musicbrainz2"
    "cddb-py"
    "python2-setuptools"
)
optdepends=(
    "python2-pycdio: for 'rip drive list'"
    "gstreamer0.10-good-plugins"
    "gstreamer0.10-bad-plugins"
    "gstreamer0.10-ugly-plugins"
)
makedepends=('git')
source=("git+https://github.com/thomasvs/${pkgname}.git#tag=v$pkgver"
        "git://github.com/thomasvs/python-musicbrainz-ngs.git"
        "git://github.com/thomasvs/python-command.git"
        "git://github.com/Flumotion/flog"
        "git://github.com/thomasvs/python-deps")

prepare() {
    cd "$srcdir/$pkgname"
    git submodule init
    git config submodule."morituri/extern/python-musicbrainz-ngs".url "$srcdir/python-musicbrainz-ngs"
    git config submodule."morituri/extern/python-command".url "$srcdir/python-command"
    git config submodule."morituri/extern/flog".url "$srcdir/flog"
    git config submodule."morituri/extern/python-deps".url "$srcdir/python-deps"
    git submodule update
}

build() {
    cd "$srcdir/$pkgname"
    export PYTHON="python2"
    autoreconf -i -f
    ./configure --prefix=/usr --sysconfdir=/etc
    make
}

package() {
    cd "$srcdir/$pkgname"
    make DESTDIR="$pkgdir" install
    install -Dm 0644 "README" "$pkgdir/usr/share/doc/morituri/README"
}

# vim: ft=sh:ts=4:sw=4:et
sha512sums=('SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP')
