comparison debian/postinst @ 853:4f5a6c252703

/etc/mplayer.conf created on install-time based on user responses.
author eyck
date Wed, 23 May 2001 09:19:58 +0000
parents
children 604a32fcb501
comparison
equal deleted inserted replaced
852:8da65f529a10 853:4f5a6c252703
1 #!/bin/sh -e
2 # postinst script for mplayer
3 #
4 # see: dh_installdeb(1)
5
6 set -e
7
8 # summary of how this script can be called:
9 # * <postinst> `configure' <most-recently-configured-version>
10 # * <old-postinst> `abort-upgrade' <new version>
11 # * <conflictor's-postinst> `abort-remove' `in-favour' <package>
12 # <new-version>
13 # * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
14 # <failed-install-package> <version> `removing'
15 # <conflicting-package> <version>
16 # for details, see /usr/share/doc/packaging-manual/
17 #
18 # quoting from the policy:
19 # Any necessary prompting should almost always be confined to the
20 # post-installation script, and should be protected with a conditional
21 # so that unnecessary prompting doesn't happen if a package's
22 # installation fails and the `postinst' is called with `abort-upgrade',
23 # `abort-remove' or `abort-deconfigure'.
24
25 case "$1" in
26 configure)
27 #TODO: creating /etc/mplayer.conf,
28
29
30 # Source debconf library.
31 . /usr/share/debconf/confmodule
32
33 db_subst mplayer/output vo xv, xmga, mga, x11, gl, sdl
34
35 db_input high mplayer/output || true
36 db_go
37
38 if [ -f /etc/mplayer.conf ]; then
39
40 db_input high mplayer/overwrite || true
41 db_go
42 db_get mplayer/overwrite
43 else
44 $RET="true"
45 fi
46
47 if [ "$RET" = "true" ]; then
48 db_get mplayer/output
49
50 cat <<EOCFG > /etc/mplayer.conf
51 ##
52 ## MPlayer config file
53 ##
54 ## This file can be copied to /etc/mplayer.conf and/or ~/.mplayer/config .
55 ## If both exist, the ~/.mplayer/config's settings override the
56 ## /etc/mplayer.conf ones. And, of course command line overrides all.
57 ## The options are the same as in the command line, but they can be specified
58 ## more flexibly here. See below.
59 ##
60
61 vo=$RET # To specify your default video output see -vo help for
62 # valid settings
63
64 fs=yes # Enlarges movie window to your desktop's size.
65 # Used by drivers: all
66
67 vm=no # Tries to change to a different videomode
68 # Used by drivers: dga2, x11, sdl
69
70 #bpp=0 # Force changing display depth.
71 # Valid settings are: 0, 15, 16, 24, 32
72 # may need 'vm=yes' too.
73 # Used by drivers: fbdev, dga2, svga
74
75 zoom=no # Enable software scaling (powerful CPU needed)
76 # Used by drivers: svga
77
78 # x=800 # scale movie to <x> pixels width
79 # y=600 # scale movie to <y> pixels height
80
81 ##
82 ## Multiple languages are available :)
83 ##
84 ## Hungarian igen nem
85 ## English yes no
86 ## German ja nein
87 ## Spanish si no
88 ## Binary 1 0
89 ##
90 ## You can also use spaces and/or tabs.
91 ##
92
93 sound = 1
94 mixer = /dev/mixer
95 master = no # no : set PCM volume yes : set MASTER volume
96
97 ##
98 ## resample the fonts' alphamap
99 ## 0 plain white fonts
100 ## 0.75 very narrow black outline (default)
101 ## 1 narrow black outline
102 ## 10 bold black outline
103 ##
104
105 ffactor = 1
106
107 ##
108 ## FBdev driver: specify your monitor's timings, so resolutions
109 ## can be autodetected.
110 ## (see for example /etc/X11/XF86Config for timings!)
111 ## ** CAUTION! IF YOUR DISPLAY DOESN'T SUPPORT AUTOMATICALLY TURNING OFF WHEN
112 ## OVERDRIVED (AND EVEN IF IT DOES), THIS MAY CAUSE DAMAGE TO YOUR DISPLAY!
113 ## WE AREN'T RESPONSIBLE, IT'S YOUR DECISION! **
114 ##
115 ## k, K : means multiply by 1000
116 ## m, M : means multiply by 1.000.000
117 ##
118
119 # fb = /dev/fb0 # framebuffer device to use
120 # fbmode = 640x480-120 # use this mode (read from fb.modes!)
121 # fbmodeconfig = /etc/fb.modes # the fb.modes file
122 # monitor_hfreq = 31.5k-50k,70k # horizontal frequency range
123 # monitor_vfreq = 50-90 # vertical frequency range
124 # monitor_dotclock = 30M-300M # dotclock (or pixelclock) range
125
126 ##
127 ## SDL driver
128 ##
129
130 # sdl = aalib # specify driver to use (for ex.: aalib, dga, fbdev...)
131 # noxv = yes # do not use XVideo hardware acceleration
132 # forcexv = yes # force XVideo even if not detected
133
134
135 # nodshow = 1 # disable usage of DirectShow video codecs
136
137 ##
138 ## You can also include other configfiles
139 ## Specify full path!
140 ##
141
142 #include = /home/gabucino/.mplayer/savage4.conf
143
144
145 EOCFG
146
147 fi
148
149
150 #db_purge
151 db_input medium mplayer/cfgnote || true
152 db_go
153
154
155
156 # store info in debconf database
157 ;;
158
159 abort-upgrade|abort-remove|abort-deconfigure)
160
161 ;;
162
163 *)
164 echo "postinst called with unknown argument \`$1'" >&2
165 exit 0
166 ;;
167 esac
168
169 # dh_installdeb will replace this with shell code automatically
170 # generated by other debhelper scripts.
171
172 #DEBHELPER#
173
174 exit 0
175
176