#!/bin/sh -e

PACKAGE="@PACKAGE@"
FILENAME="@FILENAME@"

case "$1" in
	configure)
		if [ -x /usr/sbin/update-mime ]; then
			/usr/sbin/update-mime
		fi

		update-alternatives --install \
			/usr/bin/mpg123 mpg123 "/usr/bin/$FILENAME" \
			"@PRIORITY@" \
			--slave /usr/share/man/man1/mpg123.1.gz mpg123.1.gz \
			"/usr/share/man/man1/$FILENAME.1.gz"
	
		update-alternatives --install \
			/usr/bin/mp3-decoder mp3-decoder "/usr/bin/$FILENAME" \
			"@PRIORITY@" \
			--slave /usr/share/man/man1/mp3-decoder.1.gz \
			mp3-decoder.1.gz \
			"/usr/share/man/man1/$FILENAME.1.gz"
		;;
	abort-upgrade|abort-remove|abort-deconfigure)
		;;
	*)
		echo "postinst called with unknown argument \'$1\'" >&2
		exit 0
esac

exit 0

