[SCM] Phonon Multimedia Framework packaging branch, experimental, updated. debian/4.7.2-1-20-ga292ad6
Diane Trout
diane-guest at moszumanska.debian.org
Sat Sep 13 23:27:16 UTC 2014
Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-req/phonon.git;a=commitdiff;h=a3a4210
The following commit has been merged in the experimental branch:
commit a3a42104ad968c80f256f9b0b7dd428a19d75032
Author: Diane Trout <diane at ghic.org>
Date: Sat Sep 13 11:40:59 2014 -0700
Merge in changes from Kubuntu to support Qt5 debconf warning. (Done by jriddel)
---
debian/changelog | 2 +
debian/{expand_vars.awk => expand4qt5_vars.awk} | 2 +-
debian/phonon4qt5-backend-null.README.Debian | 19 ++++++++
debian/phonon4qt5-backend-null.config | 7 +++
debian/phonon4qt5-backend-null.dc-config.in | 50 ++++++++++++++++++++++
...l.postinst => phonon4qt5-backend-null.postinst} | 0
debian/phonon4qt5-backend-null.postrm | 18 ++++++++
debian/phonon4qt5-backend-null.templates | 18 ++++++++
debian/rules | 12 ++++--
9 files changed, 123 insertions(+), 5 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 397ed47..162b556 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -18,6 +18,8 @@ phonon (4:4.8.0-1) UNRELEASED; urgency=medium
and libphonon4qt5-dbg (qt5) debug packages.
* Add qttools5-dev to build qt5 phononwidgets designer support
library.
+ * Merge in changes from Kubuntu to support Qt5 debconf warning.
+ (Done by jriddel)
-- Diane Trout <diane at ghic.org> Tue, 09 Sep 2014 10:55:34 -0700
diff --git a/debian/expand_vars.awk b/debian/expand4qt5_vars.awk
similarity index 83%
copy from debian/expand_vars.awk
copy to debian/expand4qt5_vars.awk
index e4a1f3d..6609961 100644
--- a/debian/expand_vars.awk
+++ b/debian/expand4qt5_vars.awk
@@ -7,7 +7,7 @@ function readfile(file)
function process()
{
- gsub(/#RECOMMENDED_BACKEND#/,recommended_backend);
+ gsub(/#RECOMMENDED4QT5_BACKEND#/,recommended4qt5_backend);
if (/^#INCLUDE [^#]+#$/) {
readfile(substr($0,10,length($0)-9-1));
return
diff --git a/debian/phonon4qt5-backend-null.README.Debian b/debian/phonon4qt5-backend-null.README.Debian
new file mode 100644
index 0000000..dff04d2
--- /dev/null
+++ b/debian/phonon4qt5-backend-null.README.Debian
@@ -0,0 +1,19 @@
+About this backend
+------------------
+
+This backend is not a real Phonon4Qt5 backend. Therefore Phonon4Qt5 based (i.e. most
+KF5 and some Qt5) applications will produce no audio or video output. Typically,
+this is an undesirable configuration which you might have gotten to
+unintentionally. However, `phonon4qt5-backend-null' might be useful if you are not
+interested in multimedia and you don't want to install a number of pretty heavy
+packages which real backends typically depend on.
+
+If you wish to restore full Phonon4Qt5 multimedia capabilities, install a real
+Phonon4Qt5 backend with your favourite package manager. The recommended backend
+is `${recommended4qt5_backend}' but you may choose any other package which provides
+the `phonon4qt5-backend' virtual package. Use whatever works best with your system
+setup.
+
+Phonon4Qt5 backend package names typically start with 'phonon4qt5-backend-' string by
+convention. Have a look at the packages suggested by the `phonon4qt5' package as
+well.
diff --git a/debian/phonon4qt5-backend-null.config b/debian/phonon4qt5-backend-null.config
new file mode 100644
index 0000000..dfae7a2
--- /dev/null
+++ b/debian/phonon4qt5-backend-null.config
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+set -e
+
+#INCLUDE debian/phonon4qt5-backend-null.dc-config.in#
+
+#DEBHELPER#
diff --git a/debian/phonon4qt5-backend-null.dc-config.in b/debian/phonon4qt5-backend-null.dc-config.in
new file mode 100644
index 0000000..191d9a6
--- /dev/null
+++ b/debian/phonon4qt5-backend-null.dc-config.in
@@ -0,0 +1,50 @@
+# START CONFIG[phonon4qt5-null-backend/isnt_functional]
+
+. /usr/share/debconf/confmodule
+
+# This function will show a warning about phonon4qt5-backend-null whenever phonon4qt5
+# metapackage or phonon4qt5-backend-null is being installed
+warn_about_phonon_backend_null()
+{
+ local package=`basename "$0" .postinst`
+ local show_warning=0
+ local recommended4qt5_backend="#RECOMMENDED4QT5_BACKEND#"
+ local other_backends
+
+ # Do not show the note when reconfiguring
+ if [ "$1" = "reconfigure" ] || [ "DEBCONF_RECONFIGURE" = "1" ]; then
+ return 0
+ fi
+
+ if [ "$1" = "configure" ]; then
+ # Display the warning only if both (phonon4qt5 and phonon4qt5-backend-null)
+ # are (about to be) installed. In order to avoid checking dpkg status
+ # database, we can check Owners field of the debconf question.
+ db_metaget phonon4qt5-backend-null/isnt_functional Owners
+ OWNERS="`echo "$RET" | sed 's/, /
/g'`"
+ if echo "$OWNERS" | grep -q -e 'phonon4qt5$' -e 'phonon4qt5:' && echo "$OWNERS" | grep -q phonon4qt5-backend-null; then
+ show_warning=1
+ fi
+
+ # Finally show the note if needed (and it wasn't seen already)
+ db_fget phonon4qt5-backend-null/isnt_functional seen || true
+ if [ "$RET" != "true" ] && [ "$show_warning" = "1" ]; then
+ other_backends="`LC_ALL=C apt-cache showpkg phonon4qt5-backend | \
+ awk '/: *$/{go=0} {if (go==1) print $1;} /^Reverse Provides: *$/ {go=1}' | \
+ sort -u | \
+ grep -v -e phonon4qt5-backend-null -e "$recommended4qt5_backend" | \
+ awk '{printf ", " $1}'`"
+ db_settitle phonon4qt5-backend-null/isnt_functional_title || true
+ db_subst phonon4qt5-backend-null/isnt_functional recommended4qt5_backend "$recommended4qt5_backend"
+ db_subst phonon4qt5-backend-null/isnt_functional other_backends "$other_backends"
+ db_input high phonon4qt5-backend-null/isnt_functional || true
+ db_go || true
+ fi
+ fi
+}
+
+warn_about_phonon_backend_null "$@"
+
+# vim: set syntax=sh
+
+# END CONFIG[phonon4qt5-null-backend/isnt_functional]
diff --git a/debian/phonon-backend-null.postinst b/debian/phonon4qt5-backend-null.postinst
similarity index 100%
copy from debian/phonon-backend-null.postinst
copy to debian/phonon4qt5-backend-null.postinst
diff --git a/debian/phonon4qt5-backend-null.postrm b/debian/phonon4qt5-backend-null.postrm
new file mode 100644
index 0000000..4982606
--- /dev/null
+++ b/debian/phonon4qt5-backend-null.postrm
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+ *upgrade)
+ # Do not touch phonon4qt5-backend-null/isnt_functional on upgrades
+ ;;
+ *)
+ if [ -e /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+ db_fset phonon4qt5-backend-null/isnt_functional seen false || true
+ db_unregister phonon4qt5-backend-null/isnt_functional || true
+ fi
+ ;;
+esac
+
+#DEBHELPER#
diff --git a/debian/phonon4qt5-backend-null.templates b/debian/phonon4qt5-backend-null.templates
new file mode 100644
index 0000000..7dd0432
--- /dev/null
+++ b/debian/phonon4qt5-backend-null.templates
@@ -0,0 +1,18 @@
+Template: phonon4qt5-backend-null/isnt_functional_title
+Type: title
+_Description: Warning: Phonon4Qt5 is not functional
+
+Template: phonon4qt5-backend-null/isnt_functional
+Type: note
+#flag:comment:4
+# Translators: do not translate variable names
+# only translate "(recommended)" (the one in parenthesis)
+_Description: Missing back-end for Phonon4Qt5
+ Applications using Phonon4Qt5 (the KF 5 multimedia framework) will produce
+ no audio or video output, because only a dummy Phonon back-end is
+ installed on this system. This is typically an unintended configuration.
+ .
+ To restore full Phonon4Qt5 multimedia capabilities, install one of the real
+ Phonon4Qt5 back-end packages which are currently available for this system:
+ .
+ ${recommended_backend} (recommended)${other_backends}
diff --git a/debian/rules b/debian/rules
index 25fc481..8c943d9 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,7 +9,7 @@ libpkgs_gen_strict_local_shlibs = $(libpkgs_all_packages)
include /usr/share/pkg-kde-tools/qt-kde-team/2/library-packages.mk
RECOMMENDED_PHONON4_QT4_BACKEND := phonon-backend-vlc
-RECOMMENDED_PHONON4_QT5_BACKEND := phonon-qt5-backend-vlc
+RECOMMENDED_PHONON4_QT5_BACKEND := phonon4qt5-backend-vlc
override_dh_auto_clean:
$(overridden_command)
@@ -54,13 +54,17 @@ override_dh_gencontrol:
cmd="awk -f debian/expand_vars.awk -v recommended_backend='$(RECOMMENDED_PHONON4_QT4_BACKEND)' -- $$f > $$f.tmp && cat $$f.tmp >| $$f && rm -f $$f.tmp"; \
echo "$$cmd"; eval "$$cmd"; \
fi; \
+ if [ -f "$$f" ]; then \
+ cmd="awk -f debian/expand4qt5_vars.awk -v recommended4qt5_backend='$(RECOMMENDED_PHONON4_QT5_BACKEND)' -- $$f > $$f.tmp && cat $$f.tmp >| $$f && rm -f $$f.tmp"; \
+ echo "$$cmd"; eval "$$cmd"; \
+ fi; \
done
if [ -d debian/phonon-backend-null ]; then \
sed -i 's/\$${recommended_backend}/$(RECOMMENDED_PHONON4_QT4_BACKEND)/g' \
debian/phonon-backend-null/usr/share/doc/phonon-backend-null/README.Debian; \
fi
- if [ -d debian/phonon-qt5-backend-null ]; then \
- sed -i 's/\$${recommended_backend}/$(RECOMMENDED_PHONON4_QT5_BACKEND)/g' \
- debian/phonon-backend-null/usr/share/doc/phonon-backend-null/README.Debian; \
+ if [ -d debian/phonon4qt5-backend-null ]; then \
+ sed -i 's/\$${recommended4qt5_backend}/$(RECOMMENDED_PHONON4_QT5_BACKEND)/g' \
+ debian/phonon4qt5-backend-null/usr/share/doc/phonon4qt5-backend-null/README.Debian; \
fi
$(overridden_command) -- -Vphonon:Recommended-Backend-qt4=$(RECOMMENDED_PHONON4_QT4_BACKEND) -Vphonon:Recommended-Backend-qt5=$(RECOMMENDED_PHONON4_QT5_BACKEND)
--
Phonon Multimedia Framework packaging
More information about the pkg-kde-commits
mailing list