This file is indexed.

postinst is in mpg123 1.12.1-3.2ubuntu1.

This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/sh -e

remove_alternative()
{
	test -n "$1" || continue

	FILENAME="$1"

	update-alternatives --remove mpg123 "/usr/bin/$FILENAME"
	update-alternatives --remove mp3-decoder "/usr/bin/$FILENAME"
}

install_alternative()
{
	test -n "$1" || continue
	test -n "$2" || continue

	FILENAME="$1"
	PRIORITY="$2"

	test -e "/usr/bin/$FILENAME" || continue

	# Not a typo: For mpg123, we effectively add 100 to the
	# priority used for mp3-decoder to get us atop of mpg321.
	# We /are/ mpg123, after all, and we are no longer non-free.
	# This hack can be dropped if mpg321 chooses to lower its
	# mpg123 priority.
	update-alternatives --install \
		/usr/bin/mpg123 mpg123 "/usr/bin/$FILENAME" \
		"1$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"
}

case "$1" in
	configure)
		# Specific alternatives are no longer required with
		# output auto-detection.
		OBSOLETES="mpg123-oss mpg123-alsa mpg123-esd mpg123-nas mpg123-oss-i486"
		for i in $OBSOLETES; do
			remove_alternative "$i"
		done

		# Install generic binary as the only alternative.
		install_alternative mpg123.bin 20
		;;
	abort-upgrade|abort-remove|abort-deconfigure)
		;;
	*)
		echo "postinst called with unknown argument \'$1\'" >&2
		exit 0
esac

# Automatically added by dh_installmime
if [ "$1" = "configure" ] && [ -x "`which update-mime 2>/dev/null`" ]; then
	update-mime
fi
# End automatically added section


exit 0