# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
setvar pkgname = 'mp3splt'
setvar pkgver = '2.6.2'
setvar pkgrel = '0'
setvar pkgdesc = ""A command-line, AlbumWrap and mp3wrap file exctractor""
setvar url = ""http://mp3splt.sourceforge.net/""
setvar arch = ""all""
setvar license = ""GPL2+""
setvar depends = """"
setvar makedepends = ""libmp3splt-dev""
setvar install = """"
setvar subpackages = ""$pkgname-doc""
setvar source = ""http://prdownloads.sourceforge.net/mp3splt/$pkgname-$pkgver.tar.gz""

setvar _builddir = ""$srcdir"/$pkgname-$pkgver"
proc prepare {
	local i
	cd $_builddir
	update_config_sub || return 1
	for i in $source {
		case (i) {
		*.patch { msg $i; patch -p1 -i "$srcdir"/$i || return 1}
		}
	}
}

proc build {
	cd $_builddir
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--with-mp3splt-includes=/usr/include/libmp3splt \
		--enable-oggsplt_symlink \
		|| return 1
	make || return 1
}

proc package {
	cd $_builddir
	make DESTDIR="$pkgdir" install || return 1
}

setvar md5sums = ""6f25341bdadb54d51c3c5d0644e6307a  mp3splt-2.6.2.tar.gz""
setvar sha256sums = ""3ec32b10ddd8bb11af987b8cd1c76382c48d265d0ffda53041d9aceb1f103baa  mp3splt-2.6.2.tar.gz""
setvar sha512sums = ""c1cbdc905d4f19e8e20afeadf02a2967049d86e69613312c8855e03afc5b190a569ac63f970171384853961cbe6bf248fae47e5116c4fe9deb7a0787f299918b  mp3splt-2.6.2.tar.gz""