[Mplayer-users] some mplayer debian/* fixes

Josip Rodin joy at cibalia.gkvk.hr
Wed Aug 22 19:51:59 CEST 2001


Hi,

Here is a patch to fix/update the Debian package creation scripts for
mplayer. It's still far from perfect but it's certainly an improvement.

Please apply it. TIA.

-- 
joy at debian dot org
-------------- next part --------------
diff -ruN MPlayer-0.18pre5.prev/debian/README.Debian MPlayer-0.18pre5/debian/README.Debian
--- MPlayer-0.18pre5.prev/debian/README.Debian	Thu Jan  1 01:00:00 1970
+++ MPlayer-0.18pre5/debian/README.Debian	Wed Aug 22 09:52:04 2001
@@ -0,0 +1,10 @@
+mplayer for Debian
+------------------
+
+  Due to machine-specific things, users are supposed to build this package
+  themselves.
+
+  Recommended method is running "fakeroot debian/rules binary" in the top
+  directory.
+
+ -- Dariush Pietrzak <eyck at incubus.ar.lublin.pl>  Thu, 17 May 2001 13:25:12 +0200
diff -ruN MPlayer-0.18pre5.prev/debian/README.debian MPlayer-0.18pre5/debian/README.debian
--- MPlayer-0.18pre5.prev/debian/README.debian	Mon May 21 10:32:00 2001
+++ MPlayer-0.18pre5/debian/README.debian	Thu Jan  1 01:00:00 1970
@@ -1,11 +0,0 @@
-mplayer for Debian
-----------------------
-  This package is meant for users to build themselves.
-  Recommended method is running "fakeroot debian/rules binary" in "main" directory
-
-Dariush Pietrzak <eyck at incubus.ar.lublin.pl>  Thu, 17 May 2001 13:25:12 +0200
-
-
-Comments regarding the Package
-
-* TeLeNiEkO * <telenieko at telenieko.com>, Mon, 26 Feb 2001 12:24:04 +0100
diff -ruN MPlayer-0.18pre5.prev/debian/control MPlayer-0.18pre5/debian/control
--- MPlayer-0.18pre5.prev/debian/control	Tue Jun 26 10:50:39 2001
+++ MPlayer-0.18pre5/debian/control	Wed Aug 22 19:36:15 2001
@@ -1,19 +1,23 @@
 Source: mplayer
-Section: unknown
+Section: misc
 Priority: optional
-Maintainer: * TeLeNiEkO * <telenieko at telenieko.com>
-Standards-Version: 3.2.1
+Maintainer: MPlayer <mplayer at sf.net>
+Standards-Version: 3.5.6
+Build-Depends: xlibs-dev, libpng2-dev, libz-dev, debhelper (>= 2), nasm
 
 Package: mplayer
 Architecture: any
-Depends: ${shlibs:Depends},debconf
+Depends: ${shlibs:Depends}, debconf
 Description: The Ultimate Movie Player For Linux
-  MPlayer is a movie player for LINUX. It plays most MPEG, AVI and ASF files,
-  supported by many native and Win32 DLL codecs. You can watch VCD, DVD and even
-  DivX movies too. The another big feature of mplayer is the wide range of
-  supported output drivers. It works with X11, Xv, DGA, OpenGL, SVGAlib, fbdev,
-  but you can use SDL (and this way all drivers of SDL, for example AAlib) and
-  some lowlevel card-specific drivers (for Matrox) too! Most of them supports
-  software or hardware scaling, so you can enjoy movies in fullscreen. And what
-  about the nice big antialiased shaded subtitles (7 supported types!!!) with
-  hungarian, english, cyrillic, czech, korean fonts, and OSD?
+ MPlayer is a movie player for Linux. It plays most MPEG, AVI and ASF files,
+ supported by many native and Win32 DLL codecs. You can watch VCD, DVD and
+ DivX;-) movies with MPlayer.
+ .
+ MPlayer supports a wide range of output drivers: X11, Xv, DGA, OpenGL,
+ SVGAlib, fbdev. You can use SDL and thus all the SDL drivers (e.g. AAlib)
+ and some low-level card-specific drivers (e.g. Matrox).  Most of the
+ drivers support either software or hardware scaling, so you can enjoy
+ movies in full screen mode.
+ .
+ MPlayer has nice, big antialiased shaded subtitles (7 supported types!)
+ with Hungarian, English, Cyrillic, Czech and Korean fonts, and OSD.
diff -ruN MPlayer-0.18pre5.prev/debian/copyright MPlayer-0.18pre5/debian/copyright
--- MPlayer-0.18pre5.prev/debian/copyright	Thu May 17 13:47:00 2001
+++ MPlayer-0.18pre5/debian/copyright	Wed Aug 22 09:53:48 2001
@@ -1,8 +1,7 @@
 This package was debianized by * TeLeNiEkO * telenieko at telenieko.com on
 Mon, 26 Feb 2001 12:24:04 +0100.
 
-It was downloaded from http://mplayer.sourceforge.net
+Original source can be found at: http://mplayer.sourceforge.net/
 
-Copyright:
-
- GPL! (partly)
+Copyrighted by various authors. Licensed partly under the terms of GNU GPL.
+See /usr/share/common-licenses/GPL for details.
diff -ruN MPlayer-0.18pre5.prev/debian/dirs MPlayer-0.18pre5/debian/dirs
--- MPlayer-0.18pre5.prev/debian/dirs	Tue Feb 27 03:04:09 2001
+++ MPlayer-0.18pre5/debian/dirs	Thu Jan  1 01:00:00 1970
@@ -1,3 +0,0 @@
-usr/bin
-usr/sbin
-usr/man/man1/
diff -ruN MPlayer-0.18pre5.prev/debian/docs MPlayer-0.18pre5/debian/docs
--- MPlayer-0.18pre5.prev/debian/docs	Mon May 21 14:43:10 2001
+++ MPlayer-0.18pre5/debian/docs	Thu Jan  1 01:00:00 1970
@@ -1,35 +0,0 @@
-
-DOCS/AUTHORS
-DOCS/BUGREPORTS
-DOCS/BUGS
-DOCS/CDROM
-DOCS/CODECS
-DOCS/CVS
-DOCS/ChangeLog
-DOCS/ChangeLog.mpeg
-DOCS/DEBIAN
-DOCS/DGA
-DOCS/DVD
-DOCS/DVD-FAQ
-DOCS/Hungarian
-DOCS/INSTALL
-DOCS/LIRC
-DOCS/MPlayer-FAQ
-DOCS/MTRR
-DOCS/OpenDivX
-DOCS/README
-DOCS/Russian
-DOCS/SDL
-DOCS/SOUNDCARDS
-DOCS/SPEED
-DOCS/Spanish
-DOCS/TODO
-DOCS/TVout-G400
-DOCS/VIDEOCARDS
-DOCS/codecs-in.html
-DOCS/codecs.conf
-DOCS/example.conf
-DOCS/inttypes.h
-DOCS/mplayer.1
-DOCS/tech-eng.txt
-DOCS/tech-hun.txt
diff -ruN MPlayer-0.18pre5.prev/debian/postinst MPlayer-0.18pre5/debian/postinst
--- MPlayer-0.18pre5.prev/debian/postinst	Thu May 31 11:04:33 2001
+++ MPlayer-0.18pre5/debian/postinst	Wed Aug 22 19:33:31 2001
@@ -1,53 +1,30 @@
 #!/bin/sh -e
 # postinst script for mplayer
-#
-# see: dh_installdeb(1)
 
-set -e
+if [ "$1" = "configure" ]; then
+  #TODO: creating /etc/mplayer.conf
 
-# summary of how this script can be called:
-#        * <postinst> `configure' <most-recently-configured-version>
-#        * <old-postinst> `abort-upgrade' <new version>
-#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
-#          <new-version>
-#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
-#          <failed-install-package> <version> `removing'
-#          <conflicting-package> <version>
-# for details, see /usr/share/doc/packaging-manual/
-#
-# quoting from the policy:
-#     Any necessary prompting should almost always be confined to the
-#     post-installation script, and should be protected with a conditional
-#     so that unnecessary prompting doesn't happen if a package's
-#     installation fails and the `postinst' is called with `abort-upgrade',
-#     `abort-remove' or `abort-deconfigure'.
-
-case "$1" in
-configure)
-#TODO: creating /etc/mplayer.conf, 
-
-
-# Source debconf library.
-. /usr/share/debconf/confmodule
-
-db_subst mplayer/output vo xv, xmga, mga, x11, gl, sdl
-
-db_input high mplayer/output || true
-db_go
-
-if [ -f /etc/mplayer.conf ]; then
-
-db_input high mplayer/overwrite || true
-db_go
-db_get mplayer/overwrite
- else
-RET="true"
-fi
+  # Source debconf library.
+  . /usr/share/debconf/confmodule
+
+  # the following list needs to be in sync with `mplayer -vo help` output
+  db_subst mplayer/output vo xv, x11, dga, sdl, fbdev, odivx, png, pgm, md5, null
 
-	if [ "$RET" = "true" ]; then
-	db_get mplayer/output
+  db_input high mplayer/output || true
+  db_go
+
+  if [ -f /etc/mplayer.conf ]; then
+    db_input high mplayer/overwrite || true
+    db_go
+    db_get mplayer/overwrite
+  else
+    RET="true"
+  fi
 
-	cat <<EOCFG > /etc/mplayer.conf
+  if [ "$RET" = "true" ]; then
+    db_get mplayer/output
+
+    cat <<EOCFG >/etc/mplayer.conf
 ##
 ## MPlayer config file
 ##
@@ -144,33 +121,11 @@
 
 EOCFG
 
-	fi
-
-
-#db_purge
-db_input medium mplayer/cfgnote || true
-db_go
-
-
-
-# store info in debconf database
-;;
+  fi
 
-abort-upgrade|abort-remove|abort-deconfigure)
-
-;;
-
-*)
-echo "postinst called with unknown argument \`$1'" >&2
-exit 0
-;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
+  #db_purge
+  db_input medium mplayer/cfgnote || true
+  db_go
+fi
 
 #DEBHELPER#
-
-exit 0
-
-
diff -ruN MPlayer-0.18pre5.prev/debian/postinst.templates MPlayer-0.18pre5/debian/postinst.templates
--- MPlayer-0.18pre5.prev/debian/postinst.templates	Thu May 31 11:04:33 2001
+++ MPlayer-0.18pre5/debian/postinst.templates	Thu Jan  1 01:00:00 1970
@@ -1,31 +0,0 @@
-Template: mplayer/output
-Type: select
-Choices: ${vo}
-Default: xv 
-Description: Which Video Output driver would you like?
- Mplayer can use very wide range of video output drivers:
- ( order aproximately by speed: )
-	 * mga, xmga - direct hardware access on MGA cards (G200/400/450), needs /dev/mga_vid
-	   this driver can work without X and display video on secondary head of matrox cards
-	 * xv - XVideo extensions of X 4.x ( hardware scaling, bilinear filtering )
-	 * sdl - SDL library, it can also use hardware scaling, filtering etc 
-	 * dga, fsdga - DGA extension.
-	 * fsbdev - framebuffer device ( watching movies on text console )
-	 * x11 - simple x11 output.
- Please choose carefully because it has tramendous effect on speed.
-
-Template: mplayer/overwrite
-Type: boolean
-Default: false
-Description: Overwrite /etc/mplayer.conf ?
- Should I overwrite your current /etc/mplayer.conf with the one created on the fly based on your answers?
-
-Template: mplayer/cfgnote
-Type: note
-Description: Create your ~/.mplayer/conf file.
-	Remember to read documentation and edit your ~/.mplayer/conf
-	(or /etc/mplayer.conf) file. This binary depends heavily on
-	your hardware - which means that it needs tweaking for every single
-	machine it's installed to. And it also it means that it will use
-	your setup very effectively. Look at /usr/share/doc/mplayer
-  end
diff -ruN MPlayer-0.18pre5.prev/debian/rules MPlayer-0.18pre5/debian/rules
--- MPlayer-0.18pre5.prev/debian/rules	Tue Jun 26 13:12:27 2001
+++ MPlayer-0.18pre5/debian/rules	Wed Aug 22 19:41:02 2001
@@ -1,55 +1,45 @@
 #!/usr/bin/make -f
-# Made with the aid of debmake, by Christoph Lameter,
-# based on the sample debian/rules file for GNU hello by Ian Jackson.
+# mplayer debian/rules file, derived from hello, debmake and debhelper examples
 
-package=mplayer
+export DH_COMPAT=2
 
 build:
-	$(checkdir)
+	dh_testdir
 	./configure --prefix=/usr
-	make dep
-	make mplayer
+	$(MAKE) dep
+	$(MAKE) mplayer
 	touch build
 
 clean:
-	$(checkdir)
-	-rm -f build
-	-$(MAKE) distclean
-	-rm -f `find . -name "*~"`
-	-rm -rf debian/tmp debian/files* core debian/substvars
+	dh_testdir
+	dh_testroot
+	$(MAKE) distclean
+	dh_clean
 
-binary-indep: checkroot build
-	$(checkdir)
+binary-indep:
 # There are no architecture-independent files to be uploaded
 # generated by this package.  If there were any they would be
 # made here.
 
-
-
-binary-arch: checkroot build
-	$(checkdir)
-	-rm -rf debian/tmp
-	install -d debian/tmp
-	cd debian/tmp && install -d `cat ../dirs`
-	$(MAKE) install prefix=`pwd`/debian/tmp/usr
-
-
-# Must have debmake installed for this to work. Otherwise please copy
-# /usr/bin/debstd into the debian directory and change debstd to debian/debstd
-	debstd 
-	dpkg-gencontrol -isp
-	chown -R root.root debian/tmp
-	chmod -R go=rX debian/tmp
-	dpkg --build debian/tmp ..
-
-define checkdir
-	test -f debian/rules
-endef
+binary-arch: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+	$(MAKE) install prefix=$(CURDIR)/debian/mplayer/usr
+	dh_installdebconf
+	dh_installdocs DOCS/*
+	dh_installchangelogs
+	dh_installmenu
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
 
 binary: binary-indep binary-arch
 
-checkroot:
-	$(checkdir)
-	test root = "`whoami`"
-
-.PHONY: binary binary-arch binary-indep clean checkroot
+.PHONY: clean binary binary-arch binary-indep
diff -ruN MPlayer-0.18pre5.prev/debian/substvars MPlayer-0.18pre5/debian/substvars
--- MPlayer-0.18pre5.prev/debian/substvars	Mon May 21 10:32:00 2001
+++ MPlayer-0.18pre5/debian/substvars	Thu Jan  1 01:00:00 1970
@@ -1 +0,0 @@
-shlibs:Depends=libc6 (>= 2.2.3-1), libgl1, libncurses5 (>= 5.2.20010310-1), libpng2(>=1.0.10), libsdl1.1, libstdc++2.10-glibc2.2, svgalibg1, xlibs (>> 4.0.3), zlib1g (>= 1:1.1.3)
diff -ruN MPlayer-0.18pre5.prev/debian/templates MPlayer-0.18pre5/debian/templates
--- MPlayer-0.18pre5.prev/debian/templates	Thu Jan  1 01:00:00 1970
+++ MPlayer-0.18pre5/debian/templates	Wed Aug 22 19:38:01 2001
@@ -0,0 +1,40 @@
+Template: mplayer/output
+Type: select
+Choices: ${vo}
+Default: xv 
+Description: Which video output driver would you like to use?
+ Mplayer can use a wide range of video output drivers. Here is a list of
+ available drivers, ordered approximately by speed:
+ .
+   * mga, xmga - direct hardware access on MGA cards (G200/400/450),
+                 needs /dev/mga_vid, works without X and display video
+                 on secondary head of Matrox cards
+   * xv - XVideo extensions of X 4.x (hardware scaling, bilinear
+          filtering)
+   * sdl - SDL YUV/RGB/BGR renderer, also uses hardware scaling,
+           filtering etc
+   * dga, fsdga - DGA extension (Direct Graphic Access V2.0)
+   * fbdev - framebuffer device
+   * x11 - simple X11 output (XImage/Shm)
+   * odivx - OpenDivX AVI File writer
+   * png - output to a PNG file
+   * pgm - output to a PGM file
+   * md5 - output to a MD5 sum
+   * null - null video output
+ .
+ Please choose carefully because this will have a tremendous effect on speed.
+
+Template: mplayer/overwrite
+Type: boolean
+Default: false
+Description: Overwrite /etc/mplayer.conf ?
+ Should I overwrite your current /etc/mplayer.conf with the one created on the fly based on your answers?
+
+Template: mplayer/cfgnote
+Type: note
+Description: Create your ~/.mplayer/conf file.
+ Remember to read documentation and edit your ~/.mplayer/conf
+ (or /etc/mplayer.conf) file. This binary depends heavily on
+ your hardware - which means that it needs tweaking for every single
+ machine it's installed to. And it also it means that it will use
+ your setup very effectively. Look at /usr/share/doc/mplayer


More information about the MPlayer-users mailing list