annotate debian/postinst @ 23960:0525bd0aed18

r23897: Experimental negative panscan values r23898: Set -vo gl slice-height default to 0, the current default of 4 seems r23913: punctuation, new sentences on new lines r23917: Document -rawvideo format="format string" r23924: Teletext support r23926: update man page with v4l2 a/v outputs r23944: h/w -> hardware r23962: added missing ':' for separator r23978: add possibly incorrect subfont entry
author voroshil
date Wed, 01 Aug 2007 01:15:26 +0000
parents a5bef61f49bf
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1398
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
1 #!/usr/bin/perl -w
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
2
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
3 # mplayer postinst
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
4
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
5 require ConfHelper;
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
6
4521
0737156ad1f0 Juergen Kreileder changes, fixing some lintian errors, adding correct manpath and adding
eyck
parents: 1691
diff changeset
7 use Debconf::Client::ConfModule qw(:all);
1398
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
8 use IO::Handle;
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
9 use Fcntl;
17346
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 17323
diff changeset
10 my $version = version(2.0);
1398
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
11 my $didupgrade = 0;
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
12
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
13 dealwithupgrades();
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
14
7096
6746866a94c6 Use the confdir we compiled with (/etc/mplayer/mplayer.conf instead of
diego
parents: 4521
diff changeset
15 my $mcfg = new ConfHelper('mplayer', "/etc/mplayer/mplayer.conf");
1398
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
16
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
17
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
18
17346
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 17323
diff changeset
19 my $dcarea = "" ;
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 17323
diff changeset
20 my $font = scalar(get("mplayer/ttfont")) ;
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 17323
diff changeset
21 $dcarea .= "#truetype font\nfont=" . $font . "\n" if $font;
1398
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
22 $mcfg->setconfarea($dcarea);
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
23
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
24
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
25
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
26 sub dealwithupgrades {
7096
6746866a94c6 Use the confdir we compiled with (/etc/mplayer/mplayer.conf instead of
diego
parents: 4521
diff changeset
27 open(OLDCONF, "</etc/mplayer/mplayer.conf") || return 1;
1398
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
28 close OLDCONF;
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
29
7096
6746866a94c6 Use the confdir we compiled with (/etc/mplayer/mplayer.conf instead of
diego
parents: 4521
diff changeset
30 my $mconf = new ConfHelper("mplayer", "/etc/mplayer/mplayer.conf");
1398
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
31 return 1 if ($mconf->hasconfarea());
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
32 undef $mconf;
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
33
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
34 if ((get('mplayer/replace-existing-files') eq 'true') &&
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
35 (fget('mplayer/replace-existing-files', 'isdefault') eq 'false')) {
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
36 $didupgrade = 1;
17346
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 17323
diff changeset
37 for my $file ("/etc/mplayer/mplayer.conf" ) {
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 17323
diff changeset
38 debug("Moving away $file");
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 17323
diff changeset
39 rename($file,$file . ".old");
1398
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
40 }
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
41 } else {
17346
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 17323
diff changeset
42 debug("Upgrade refused, exiting");
1398
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
43 exit 0;
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
44 }
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
45 }
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
46
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
47 sub debug {
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
48 print STDERR @_, "\n";
10e236ceac5e update to perl debconf. fixed problem with configure.
eyck
parents:
diff changeset
49 }
8909
e59659bea3e0 postinst should pass control to debconf scripts.
eyck
parents: 7096
diff changeset
50
e59659bea3e0 postinst should pass control to debconf scripts.
eyck
parents: 7096
diff changeset
51
e59659bea3e0 postinst should pass control to debconf scripts.
eyck
parents: 7096
diff changeset
52 # pass control to debhelper scripts..
e59659bea3e0 postinst should pass control to debconf scripts.
eyck
parents: 7096
diff changeset
53 #
17346
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 17323
diff changeset
54 my $temp="set -e\nset -- @ARGV\n" . << 'DEBHELPER_EOF_';
8909
e59659bea3e0 postinst should pass control to debconf scripts.
eyck
parents: 7096
diff changeset
55 #DEBHELPER#
17346
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 17323
diff changeset
56 DEBHELPER_EOF_
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 17323
diff changeset
57 system ($temp) / 256 == 0
a5bef61f49bf Improve the Debian package configuration: Remove the vo module configuration,
diego
parents: 17323
diff changeset
58 or die "Problem with debhelper scripts: $!";