annotate debian/config @ 17346:a5bef61f49bf

Improve the Debian package configuration: Remove the vo module configuration, add a debconf TrueType font configuration. Based on the Debian package by Andrea Menucci.
author diego
date Sun, 08 Jan 2006 18:33:54 +0000
parents 6746866a94c6
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17346
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
1 #!/bin/sh
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
2
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
3 CONFIGFILE=/etc/mplayer/mplayer.conf
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
4
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
5 set -e
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
6
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
7 # Source debconf library.
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
8 . /usr/share/debconf/confmodule
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
9
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
10 if test -r $CONFIGFILE && ! grep -q '### mplayer DEBCONF AREA' $CONFIGFILE
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
11 then
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
12 db_input medium 'mplayer/replace-existing-files' || true
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
13 db_go || true
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
14 if [ "$RET" != "true" ]; then
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
15 exit 0
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
16 fi
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
17 db_get 'mplayer/replace-existing-files' || true
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
18 fi
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
19
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
20 ########################################## find fonts
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
21 #default font (if available)
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
22 BESTFONT=/usr/share/fonts/truetype/Arial.ttf
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
23 [ -r $BESTFONT ] || BESTFONT=/usr/share/fonts/truetype/freefont/FreeSans.ttf
1398
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
24
17346
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
25 t=$(tempfile -p fonts )
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
26 find /usr/share/fonts/ /?/?in*/?ont* -type f -iname '*.ttf' -maxdepth 3 2> /dev/null > $t || true
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
27
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
28 if test -s $t
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
29 then
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
30 fonts=$( awk '{print a $0;a=", "}' $t || true )
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
31 db_subst "mplayer/ttfont" ttfontchoices $fonts || true
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
32 ## suppose the question is skipped: give a default
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
33 a=$BESTFONT
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
34 [ -r $BESTFONT ] || a=$(head -1 $t)
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
35 db_subst "mplayer/ttfont" ttfontdefault $a || true
1398
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
36
17346
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
37 db_input medium mplayer/ttfont || true
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
38 if [ "$?" = 30 ] ; then
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
39 db_set mplayer/ttfont $a || true
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
40 fi
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
41 else
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
42 db_input medium "mplayer/no-ttfont" || true
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
43 fi
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
44
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
45 rm $t
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
46
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
47 db_go || true
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
48
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
49 ############################################################
4521
0737156ad1f0 Juergen Kreileder changes, fixing some lintian errors, adding correct manpath and adding
eyck
parents: 1398
diff changeset
50
1398
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
51
17346
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 7096
diff changeset
52 exit 0