# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=audacious-plugins
pkgver=3.9
pkgrel=0
pkgdesc="A playlist-oriented media player with multiple interfaces (plugins)"
url="http://audacious-media-player.org/"
arch="all"
license="ISC"
depends="audacious"
install_if="audacious=$pkgver"
_want_ffmpeg="ffmpeg-dev"
makedepends="libmowgli-dev
             libguess-dev
             gtk+-dev
             dbus-glib-dev
             audacious-dev>=${pkgver%.*}
             libxml2-dev

             mpg123-dev

	     libcdio-dev
	     libcdio-paranoia-dev
	     libcddb-dev

	     libxcomposite-dev
	     libsamplerate-dev
	     libcue-dev
	     libmms-dev
	     libsndfile-dev

	     libnotify-dev

	     libogg-dev
             libvorbis-dev

	     $_want_ffmpeg

             alsa-lib-dev
	     faad2-dev
             neon-dev
             curl-dev
             wavpack-dev
	     lame-dev
	     flac-dev
	     sdl-dev

	     automake
	     autoconf"
subpackages="$pkgname-lang $pkgname-dbg"
source="http://distfiles.audacious-media-player.org/$pkgname-$pkgver.tar.bz2"
builddir="$srcdir/$pkgname-$pkgver"

prepare() {
	default_prepare
	msg "Rebuilding configure..."
	aclocal -I m4 && autoheader && autoconf

	# workaround bug in busybox
	sed -e "/touch/s/0001010000/200001010000/g" \
		-i configure
}

build() {
	cd "$builddir"
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
}

sha512sums="00c8c53d69995ca1fedb91c7df609cc6c65b13e1af23b98a2fbda143c02ac554cc2c42c01f1c593af252e36bfb85b6324f2daca8632d3b672c69fb4dead2e3fa  audacious-plugins-3.9.tar.bz2"
