#Maintainer: George Vlahavas <vlahavas~at~gmail~dot~com>

pkgname=dosbox
pkgver=0.74
pkgrel=1gv
source=("http://prdownloads.sourceforge.net/dosbox/dosbox-$pkgver.tar.gz" "dosbox.desktop" "icons.tar.gz")
docs=("readme" "install" "copying" "changelog" "authors" "news" "todo" "thanks")
url=http://www.dosbox.com

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"dosbox is a DOS-emulator"
"DOSBox is a DOS-emulator that uses the SDL-library which makes DOSBox"
"very easy to port to different platforms. DOSBox has already been"
"ported to many different platforms, such as Windows, BeOS, Linux,"
"MacOS X... DOSBox also emulates CPU:286/386 realmode/protected mode,"
"Directory FileSystem/XMS/EMS, Tandy/Hercules/CGA/EGA/VGA/VESA"
"graphics, a SoundBlaster/Gravis Ultra Sound card for excellent sound"
"compatibility with older games."
)


build() {
	cd $startdir/src/$pkgname-$pkgver
	./configure --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} --localstatedir=/var --sysconfdir=/etc --build=$arch-slackware-linux
	make || return 1
	make install DESTDIR=$startdir/pkg

	mkdir -p $startdir/pkg/usr/share/applications
	cp $startdir/src/dosbox.desktop $startdir/pkg/usr/share/applications/
	
	# Copy icons to the right place
        ICONSIZES="128 64 48 32 24 22 16"
        for i in $ICONSIZES; do
                mkdir -p $startdir/pkg/usr/share/icons/hicolor/$i\x$i/apps;
                mv $startdir/src/$pkgname-$i.png $startdir/pkg/usr/share/icons/hicolor/$i\x$i/apps/$pkgname.png;
        done;
}