mirror of
https://github.com/mpv-player/mpv
synced 2025-04-10 11:41:37 +00:00
debian/: delegate handling of mplayer.conf to dpkg.
This change removes also all debconf templates and reduces package complexity. Patch by Reinhard Tartler <siretart AT tauware.de>, copied from the official Debian package.
This commit is contained in:
parent
7d64e9e219
commit
e0275d1097
52
debian/config
vendored
52
debian/config
vendored
@ -1,52 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
CONFIGFILE=/etc/mplayer/mplayer.conf
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# Source debconf library.
|
|
||||||
. /usr/share/debconf/confmodule
|
|
||||||
|
|
||||||
if test -r $CONFIGFILE && ! grep -q '### mplayer DEBCONF AREA' $CONFIGFILE
|
|
||||||
then
|
|
||||||
db_input medium 'mplayer/replace-existing-files' || true
|
|
||||||
db_go || true
|
|
||||||
if [ "$RET" != "true" ]; then
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
db_get 'mplayer/replace-existing-files' || true
|
|
||||||
fi
|
|
||||||
|
|
||||||
########################################## find fonts
|
|
||||||
#default font (if available)
|
|
||||||
BESTFONT=/usr/share/fonts/truetype/Arial.ttf
|
|
||||||
[ -r $BESTFONT ] || BESTFONT=/usr/share/fonts/truetype/freefont/FreeSans.ttf
|
|
||||||
|
|
||||||
t=$(tempfile -p fonts )
|
|
||||||
find /usr/share/fonts/ /?/?in*/?ont* -type f -iname '*.ttf' -maxdepth 3 2> /dev/null > $t || true
|
|
||||||
|
|
||||||
if test -s $t
|
|
||||||
then
|
|
||||||
fonts=$( awk '{print a $0;a=", "}' $t || true )
|
|
||||||
db_subst "mplayer/ttfont" ttfontchoices $fonts || true
|
|
||||||
## suppose the question is skipped: give a default
|
|
||||||
a=$BESTFONT
|
|
||||||
[ -r $BESTFONT ] || a=$(head -1 $t)
|
|
||||||
db_subst "mplayer/ttfont" ttfontdefault $a || true
|
|
||||||
|
|
||||||
db_input medium mplayer/ttfont || true
|
|
||||||
if [ "$?" = 30 ] ; then
|
|
||||||
db_set mplayer/ttfont $a || true
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
db_input medium "mplayer/no-ttfont" || true
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm $t
|
|
||||||
|
|
||||||
db_go || true
|
|
||||||
|
|
||||||
############################################################
|
|
||||||
|
|
||||||
|
|
||||||
exit 0
|
|
18
debian/postrm
vendored
18
debian/postrm
vendored
@ -1,18 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
if [ "$1" = "purge" ]; then
|
|
||||||
if [ -e /usr/share/debconf/confmodule ]; then
|
|
||||||
# Source debconf library.
|
|
||||||
. /usr/share/debconf/confmodule
|
|
||||||
# Remove my changes to the db.
|
|
||||||
db_purge
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d /etc/mplayer/ ]; then
|
|
||||||
rm -rf /etc/mplayer/
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
#DEBHELPER#
|
|
2
debian/rules
vendored
2
debian/rules
vendored
@ -61,7 +61,7 @@ binary-arch: build
|
|||||||
# commands to install the package into debian/<packagename>
|
# commands to install the package into debian/<packagename>
|
||||||
$(MAKE) prefix=$(prefix)/usr BINDIR=$(prefix)/usr/bin CONFDIR=$(prefix)/etc/mplayer LIBDIR=$(prefix)/usr/lib DATADIR=$(prefix)/usr/share/mplayer MANDIR=$(prefix)/usr/share/man install
|
$(MAKE) prefix=$(prefix)/usr BINDIR=$(prefix)/usr/bin CONFDIR=$(prefix)/etc/mplayer LIBDIR=$(prefix)/usr/lib DATADIR=$(prefix)/usr/share/mplayer MANDIR=$(prefix)/usr/share/man install
|
||||||
|
|
||||||
dh_installdebconf
|
install -D -m 644 etc/example.conf $(prefix)/etc/mplayer/mplayer.conf
|
||||||
dh_installdocs -X.svn -Xmplayer.1 DOCS/*
|
dh_installdocs -X.svn -Xmplayer.1 DOCS/*
|
||||||
dh_installexamples etc/example.conf etc/dvb-menu.conf etc/input.conf etc/menu.conf
|
dh_installexamples etc/example.conf etc/dvb-menu.conf etc/input.conf etc/menu.conf
|
||||||
dh_installmime
|
dh_installmime
|
||||||
|
26
debian/templates
vendored
26
debian/templates
vendored
@ -1,26 +0,0 @@
|
|||||||
Template: mplayer/replace-existing-files
|
|
||||||
Type: boolean
|
|
||||||
Default: true
|
|
||||||
Description: Upgrade existing system?
|
|
||||||
It looks like you've configured MPlayer already. If you'd like to
|
|
||||||
configure it with this program, the old configuration
|
|
||||||
/etc/mplayer/mplayer.conf will be deleted. Do you want to continue
|
|
||||||
configuration with this program? If you say "Yes", your old
|
|
||||||
configuration will be deleted and you can create it anew with this
|
|
||||||
program. If you say "No" your existing files will be kept. If you
|
|
||||||
change your mind later, you can run 'dpkg-reconfigure mplayer'.
|
|
||||||
|
|
||||||
Template: mplayer/ttfont
|
|
||||||
Type: select
|
|
||||||
Choices: ${ttfontchoices}
|
|
||||||
Default: ${ttfontdefault}
|
|
||||||
Description: MPlayer fonts
|
|
||||||
MPlayer can use TrueType fonts to render the OSD and subtitles.
|
|
||||||
Choose your favorite.
|
|
||||||
|
|
||||||
Template: mplayer/no-ttfont
|
|
||||||
Type: note
|
|
||||||
Description: MPlayer cannot find TrueType fonts
|
|
||||||
You should install a package providing TrueType fonts (such as
|
|
||||||
'ttf-freefont' or 'ttf-bitstream-vera' or 'msttcorefonts' )
|
|
||||||
and reconfigure mplayer.
|
|
Loading…
Reference in New Issue
Block a user