#Maintainer: Thorsten Muehlfelder <thenktor@gmx.de>

pkgname=mp3val
pkgver=0.1.8
pkgrel=1tm
arch=i486
source=("http://downloads.sourceforge.net/mp3val/mp3val-$pkgver-src.tar.gz")
sourcetemplate=http://thenktor.dyndns.org/packages/$pkgname/
url="http://mp3val.sourceforge.net/"
docs=(COPYING changelog.txt manual.html)

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"$pkgname (small, high-speed tool for MPEG audio files validation)"
"MP3val is a small, high-speed tool for MPEG audio files validation"
"and optionally fixing problems. It was primarily designed for veri-"
"fication of MPEG 1 Layer III (MP3) files, but supports also other"
"MPEG versions and layers. It can be useful for finding corrupted"
"files, e.g. incompletely downloaded."
""
"MP3val supports: MPEG-1, 2, 2.5; Layers I, II, III"
"ID3v1 tags (must be at the very end of the file)"
"ID3v2 tags (must be at the very beginning of the file), APEv2 tags"
)

build() {
	cd $startdir/src/${pkgname}-${pkgver}-src
	# configure
	sed -i "s/CXXFLAGS=/CXXFLAGS=-march=i486 -mtune=i686 /g" Makefile.linux

	# make
	make -f Makefile.linux || return 1

	# make install
	mkdir -p $startdir/pkg/usr/bin
	install -m755 mp3val $startdir/pkg/usr/bin/
}