# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=ices
pkgver=2.0.3
pkgrel=6
pkgdesc="Source client for broadcasting in MP3 format to an icecast2 server"
url="https://icecast.org/ices/"
arch="all"
license="GPL-2.0-or-later"
makedepends="libogg-dev libxml2-dev libvorbis-dev libshout-dev alsa-lib-dev
	lame-dev perl-dev linux-headers"
subpackages="$pkgname-doc"
source="https://downloads.xiph.org/releases/ices/ices-$pkgver.tar.bz2"
replaces="ices2"

prepare() {
	default_prepare

	update_config_sub
	update_config_guess
}

build() {
	./configure \
		--prefix=/usr \
		--datadir=/usr/share/doc/ \
		--with-alsa \
		--with-lame \
		--with-vorbis \
		--with-python \
		--with-perl
	make
}

package() {
	make DESTDIR="$pkgdir" install
	make -C conf DESTDIR="$pkgdir" install
}

sha512sums="e17cd43cea621dbb9223377630eef4478e205f8c16d3b87b391c798ed1e47c7b5906546034f244eae1487c137fa371c5f40f6c80cbaf822aa875cb61ece38d1e  ices-2.0.3.tar.bz2"
