[SCM] mplayer/master.experimental: Improve Package.

micove-guest at users.alioth.debian.org micove-guest at users.alioth.debian.org
Tue Dec 2 21:14:12 UTC 2014


The following commit has been merged in the master.experimental branch:
commit ddcf25cf467aa64211c3c344ddf9e512e5d6a995
Author: Miguel A. Colón Vélez <debian.micove at gmail.com>
Date:   Tue Dec 2 00:31:58 2014 -0500

    Improve Package.
    
    + DH 9
    + Move manpages to correct packages.
      > Add Break/Replace
    + Fix menu file.
    + Fix clean so everything gets cleaned.
    + Remove symlink in debug since now compressed.
    + Update conf options similar to mplayer2.
    + Update rules file to DH9 since the old one
      compiled everything twice, did not clean properly
      and had other issues.
      Tested binary-arch and binary-indep builds and
      made sure the md5sum of the executables matched
      when:
      > only mplayer is compiled
      > only mplayer-gui is compiled
      > both are compiled using back to back configure/make.
      Previously $(MAKE) distclean was not called resulting
      in binaries with different md5sum if they were compiled
      before or after the second ./configure.

diff --git a/debian/clean b/debian/clean
index 7ee1491..8d16fd9 100644
--- a/debian/clean
+++ b/debian/clean
@@ -1,7 +1 @@
-debian/postrm
-debian/menu
-debian/TODO.Debian
-debian/templates
-debian/mime
-debian/config
-debian/dirs
+gmplayer
diff --git a/debian/compat b/debian/compat
index 7f8f011..ec63514 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-7
+9
diff --git a/debian/control b/debian/control
index b7c15a0..cc43b3b 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,7 @@ Vcs-Git: git://git.debian.org/git/pkg-multimedia/mplayer.git
 Vcs-Browser: http://git.debian.org/?p=pkg-multimedia/mplayer.git;a=summary
 Homepage: http://www.mplayerhq.hu/
 Build-Depends:
- debhelper (>= 7),
+ debhelper (>= 9~),
  docbook-xml,
  docbook-xsl,
  ladspa-sdk,
@@ -127,6 +127,10 @@ Depends:
  mplayer,
  ${misc:Depends},
  ${shlibs:Depends}
+Breaks:
+ mplayer (<< 2:1.1.1+svn37329-1)
+Replaces:
+ mplayer (<< 2:1.1.1+svn37329-1)
 Description: MPlayer's Movie Encoder
  MPlayer plays most MPEG, VOB, AVI, Ogg/OGM, VIVO,
  ASF/WMA/WMV, QT/MOV/MP4, FLI, RM, NuppelVideo, yuv4mpeg, FILM, RoQ, PVA files,
diff --git a/debian/mplayer-dbg.links b/debian/mplayer-dbg.links
deleted file mode 100644
index 1562cd1..0000000
--- a/debian/mplayer-dbg.links
+++ /dev/null
@@ -1 +0,0 @@
-/usr/lib/debug/usr/bin/mplayer /usr/lib/debug/usr/bin/gmplayer
diff --git a/debian/mplayer-gui.install b/debian/mplayer-gui.install
new file mode 100644
index 0000000..37a731c
--- /dev/null
+++ b/debian/mplayer-gui.install
@@ -0,0 +1,2 @@
+etc/mplayer.desktop usr/share/applications/
+gmplayer usr/bin/
diff --git a/debian/mplayer-gui.menu b/debian/mplayer-gui.menu
index 1226152..589410b 100644
--- a/debian/mplayer-gui.menu
+++ b/debian/mplayer-gui.menu
@@ -1 +1 @@
-?package(mplayer):command="/usr/bin/gmplayer" section="Applications/Video" needs="X11" title="gmplayer"
+?package(mplayer-gui):command="/usr/bin/gmplayer" section="Applications/Video" needs="X11" title="gmplayer"
diff --git a/debian/mplayer.install b/debian/mplayer.install
index 638b36e..457bf3b 100644
--- a/debian/mplayer.install
+++ b/debian/mplayer.install
@@ -1,4 +1,6 @@
 TOOLS/binary_codecs.sh usr/share/mplayer/
 TOOLS/midentify.sh usr/share/mplayer/
+debian/mplayer.conf etc/mplayer/
 debian/prefs var/lib/mplayer/
-etc/input.conf etc/menu.conf etc/mplayer
+etc/input.conf etc/mplayer
+etc/menu.conf etc/mplayer
diff --git a/debian/rules b/debian/rules
index f5d60d4..8724eb7 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,44 +1,18 @@
 #!/usr/bin/make -f
 
-# This has to be exported to make some magic below work.
-export DH_OPTIONS
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
 
-# Support multiple makes at once
-ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-NUMJOBS = -j$(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
-else
-# on i386 and amd64, we query the system unless overriden by DEB_BUILD_OPTIONS
-ifeq      ($(DEB_BUILD_ARCH),i386)
-NUMJOBS := -j$(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)
-else ifeq ($(DEB_BUILD_ARCH),amd64)
-NUMJOBS := -j$(shell getconf _NPROCESSORS_ONLN 2>/dev/null || echo 1)
-endif
-endif
-
-
-# do not run the actual rules of this makefile in parallel. sub-makes
-# can go in parallel
-.NOTPARALLEL:
-
-############
-
-DEB_SOURCE := $(shell dpkg-parsechangelog | sed -n 's/^Source: //p')
-DEB_VERSION := $(shell dpkg-parsechangelog | sed -n 's/^Version: //p')
-UPSTREAM_VERSION := $(shell echo $(DEB_VERSION) | sed -r 's/[^:]+://; s/-[^-]+$$//')
-SVN_VERSION := $(shell echo $(UPSTREAM_VERSION) | sed -nr 's/^[0-9.:-~]+\+svn([0-9]+)$$/\1/p')
-
-
-DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
-DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
 DEB_HOST_ARCH       ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 DEB_HOST_ARCH_OS    ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
-DEB_HOST_ARCH_CPU   ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
 
+CFLAGS +=$(CPPFLAGS)
+LDFLAGS += -Wl,--as-needed
 
-# XXX enable-menu is frowned upon by upstream
 CONFIGURE_FLAGS = \
 	--prefix=/usr \
 	--confdir=/etc/mplayer \
+	--enable-debug \
 	--enable-xvmc \
 	--enable-menu \
 	--enable-radio --enable-radio-capture \
@@ -46,6 +20,8 @@ CONFIGURE_FLAGS = \
 	--language=all \
 	--disable-libmpeg2-internal \
 	--disable-ffmpeg_a \
+	--extra-cflags="${CFLAGS}" \
+	--extra-ldflags="${LDFLAGS}" \
 	$(archconf)
 
 ifeq ($(DEB_HOST_ARCH),i386)
@@ -79,12 +55,6 @@ ifeq ($(DEB_HOST_ARCH),alpha)
   archconf += --target=alpha_ev5-linux
 endif
 
-# generate debugging symbols for mplayer-dbg for all archs but mipsen,
-# see bug #520113
-ifeq (,$(findstring mips,$(DEB_HOST_ARCH)))
-CONFIGURE_FLAGS += --enable-debug
-endif
-
 ifeq (linux,$(DEB_HOST_ARCH_OS))
     CONFIGURE_FLAGS += --enable-joystick
     sound_backend := alsa
@@ -92,115 +62,53 @@ else
     sound_backend := oss
 endif
 
-build: build-arch build-indep
-
-####### build-arch
-build-arch:
-	dh_testdir
-	dh_prep -a
-	$(MAKE) -f debian/rules debian/mplayer/usr/bin/mplayer
-	$(MAKE) -f debian/rules debian/mencoder/usr/bin/mencoder
-	$(MAKE) -f debian/rules debian/mplayer-gui/usr/bin/gmplayer
-
-# build non-gui version
-# & mencoder
-debian/mplayer/usr/bin/mplayer debian/mencoder/usr/bin/mencoder:
-	dh_testdir
-	$(CLEAN_ENV) \
+%:
+	dh $@ --parallel
+
+override_dh_auto_build-arch:
+	dh_auto_build -- mplayer
+	mv mplayer gmplayer
+	$(MAKE) distclean
 	./configure $(CONFIGURE_FLAGS) --disable-gui
-	$(CLEAN_ENV) \
-	$(MAKE) $(NUMJOBS) mplayer mencoder V=1
+	dh_auto_build -- mplayer mencoder
+
+override_dh_auto_build-indep:
+	[ -f DOCS/HTML/en/index.html ] || dh_auto_build -- html-chunked
+
+override_dh_auto_clean:
+	dh_auto_clean || true
+
+override_dh_auto_configure:
+	./configure $(CONFIGURE_FLAGS) --enable-gui
+
+override_dh_auto_install-arch:
 	$(MAKE) install-mplayer DESTDIR=$(CURDIR)/debian/mplayer
-	$(MAKE) install-mplayer-man DESTDIR=$(CURDIR)/debian/mplayer
 	$(MAKE) install-mencoder DESTDIR=$(CURDIR)/debian/mencoder
-	$(MAKE) install-mencoder-man DESTDIR=$(CURDIR)/debian/mplayer
-	install -D -m 644 debian/mplayer.conf \
-	                  $(CURDIR)/debian/mplayer/etc/mplayer/mplayer.conf
+	$(MAKE) install-mplayer-man DESTDIR=$(CURDIR)/debian/mplayer
+	$(MAKE) install-mencoder-man DESTDIR=$(CURDIR)/debian/mencoder
+	$(MAKE) install-gui-man DESTDIR=$(CURDIR)/debian/mplayer-gui
+	$(MAKE) install-gui-icons DESTDIR=$(CURDIR)/debian/mplayer-gui
+	find debian/mencoder -type d -empty -delete
+	find debian/mplayer -type d -empty -delete
+	find debian/mplayer-gui -type d -empty -delete
+
+override_dh_auto_install-indep:
+override_dh_auto_test-indep:
+
+override_dh_compress-arch:
+	dh_compress
+	find debian/mencoder/usr/share/man/ -type f -name mplayer.1.gz -delete
+	find debian/mplayer-gui/usr/share/man/ -type f -name mplayer.1.gz -delete
+
+override_dh_install-arch:
+	dh_install
 	sed -e "s/@SOUND_BACKEND@/$(sound_backend)/" -i \
 	                  $(CURDIR)/debian/mplayer/etc/mplayer/mplayer.conf
 
-# build gui version
-debian/mplayer-gui/usr/bin/gmplayer:
-	dh_testdir
-	$(CLEAN_ENV) \
-	./configure $(CONFIGURE_FLAGS) --enable-gui
-	$(CLEAN_ENV) \
-	$(MAKE) $(NUMJOBS) mplayer
-	install -D -m 755 mplayer $(CURDIR)/debian/mplayer-gui/usr/bin/gmplayer
-	install -D -m 644 etc/mplayer.desktop \
-	                  $(CURDIR)/debian/mplayer-gui/usr/share/applications/mplayer.desktop
-	install -D -m 644 etc/mplayer16x16.png \
-	                  $(CURDIR)/debian/mplayer-gui/usr/share/icons/hicolor/16x16/apps/mplayer.png
-	install -D -m 644 etc/mplayer22x22.png \
-	                  $(CURDIR)/debian/mplayer-gui/usr/share/icons/hicolor/22x22/apps/mplayer.png
-	install -D -m 644 etc/mplayer24x24.png \
-	                  $(CURDIR)/debian/mplayer-gui/usr/share/icons/hicolor/24x24/apps/mplayer.png
-	install -D -m 644 etc/mplayer32x32.png \
-	                  $(CURDIR)/debian/mplayer-gui/usr/share/icons/hicolor/32x32/apps/mplayer.png
-	install -D -m 644 etc/mplayer48x48.png \
-	                  $(CURDIR)/debian/mplayer-gui/usr/share/icons/hicolor/48x48/apps/mplayer.png
-	install -D -m 644 etc/mplayer256x256.png \
-	                  $(CURDIR)/debian/mplayer-gui/usr/share/icons/hicolor/256x256/apps/mplayer.png
-
-
-# binaries already installed via build rules as we have to build several flavors
-install-arch: build-arch
-
-###### build-indep
-DOCS/HTML/en/index.html:
-	$(MAKE) html-chunked
-
-build-indep:
-	dh_testdir
-	dh_prep -i
-	test -f DOCS/HTML/en/index.html || $(MAKE) -f debian/rules DOCS/HTML/en/index.html
-
-# commands to compile the documentation
-install-indep: build-indep
-	dh_installchangelogs -i
-	dh_installdocs -i
-	dh_compress -i
-	dh_fixperms -i
-
-################ clean
-
-clean:
-	dh_testdir
-	dh_testroot
-	-test -f config.mak && $(MAKE) distclean
-
-# Build architecture-independent packages
-binary-indep: install-indep
-
-# Build architecture-dependent packages
-binary-arch: install-arch
-	dh_testdir
-	dh_testroot
-	dh_install -a
-	dh_installchangelogs -a
-	dh_installdocs -a
-	dh_installexamples -a
-	dh_installmenu -a
-	dh_installmime -a
-	dh_installman -a
-	dh_strip -a --dbg-package=mplayer-dbg
-	dh_link
-	dh_compress -a
-	dh_fixperms -a
-	dh_makeshlibs -a
-	dh_installdeb
-	dh_shlibdeps -- --ignore-missing-info
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-binary: binary-indep binary-arch
-
-PHONY += build clean binary-indep binary-arch binary-common binary 
-PHONY += install binary binary-arch binary-indep clean checkroot get-orig-source
-PHONY += autocontrol fix-orig-source copy-orig-from-svn download-and-unpack-orig
-
-.PHONY: $(PHONY)
+override_dh_strip:
+	dh_strip --dbg-package=mplayer-dbg
 
 get-orig-source:
 	sh debian/get-svn-source.sh
+
+.PHONY: get-orig-source

-- 
mplayer packaging



More information about the pkg-multimedia-commits mailing list