[SCM] breeze packaging branch, master, updated. ubuntu/4%5.4.1-0ubuntu1-33-g5fd05ba

Maximiliano Curia maxy at moszumanska.debian.org
Tue Sep 15 22:01:00 UTC 2015


Gitweb-URL: http://git.debian.org/?p=pkg-kde/plasma/breeze.git;a=commitdiff;h=5fd05ba

The following commit has been merged in the master branch:
commit 5fd05baa3dcfb8c73fe2038e6db1022ef5a1f80b
Author: Maximiliano Curia <maxy at gnuservers.com.ar>
Date:   Tue Sep 15 23:19:40 2015 +0200

    Fix the x-cursor-theme alternatives. (Closes: #798696)
---
 debian/breeze-cursor-theme.postinst | 40 +++++++++++++++++++------------------
 debian/breeze-cursor-theme.prerm    | 12 +++++------
 debian/changelog                    |  3 ++-
 debian/rules                        | 16 +++++++--------
 debian/wrapperthemes.sh             | 32 +++++++++++++++++------------
 5 files changed, 55 insertions(+), 48 deletions(-)

diff --git a/debian/breeze-cursor-theme.postinst b/debian/breeze-cursor-theme.postinst
index f71a9ce..b52cf34 100644
--- a/debian/breeze-cursor-theme.postinst
+++ b/debian/breeze-cursor-theme.postinst
@@ -1,28 +1,30 @@
 #! /bin/sh
-
 set -e
 
-MAINPRIORITY=102 # DMZ+2 (was +1 previously, need upgrade)
-SECONDARYPRIORITY=41 # Oxygen+1
 TARGET=/usr/share/icons/default/index.theme
 ICONDIR=/etc/X11/cursors
-MAIN_THEMES="breeze_cursors"
-SECONDARY_THEMES="Breeze_Snow"
 
-for theme in $MAIN_THEMES; do
-    update-alternatives --install $TARGET \
-        x-cursor-theme \
-            $ICONDIR/$theme.theme \
-            $MAINPRIORITY
-done
+# breeze_cursors with 102 (DMZ+2) priority
+update-alternatives --install $TARGET x-cursor-theme \
+    $ICONDIR/breeze_cursors.theme 102
 
-for theme in $SECONDARY_THEMES; do
-    update-alternatives --install $TARGET \
-        x-cursor-theme \
-            $ICONDIR/$theme.theme \
-            $SECONDARYPRIORITY
-done
+# Breeze_Snow with 41 (Oxygen+1) priority
+update-alternatives --install $TARGET x-cursor-theme \
+    $ICONDIR/Breeze_Snow.theme 41
 
-#DEBHELPER#
+case "$1" in
+    configure)
+        # On upgrade from a version that was badly managing the
+        # x-cursor-theme, remove the old ones from the alternatives.
+        version="$2"
+        if [ -n "$version" ] && \
+                dpkg --compare-versions "$version" lt "4:5.4.1-2~"; then
+            update-alternatives --remove x-cursor-theme \
+                /usr/share/icons/Breeze_Snow/index.theme    || true
+            update-alternatives --remove x-cursor-theme \
+                /usr/share/icons/breeze_cursors/index.theme || true
+        fi
+        ;;
+esac
 
-exit 0
+#DEBHELPER#
diff --git a/debian/breeze-cursor-theme.prerm b/debian/breeze-cursor-theme.prerm
index 1858e9d..5686105 100644
--- a/debian/breeze-cursor-theme.prerm
+++ b/debian/breeze-cursor-theme.prerm
@@ -1,17 +1,15 @@
 #! /bin/sh
-
 set -e
 
 ICONDIR=/etc/X11/cursors
-THEMES="breeze_cursors Breeze_Snow"
 
 case "$1" in
     remove|deconfigure|failed-upgrade)
-        for theme in $THEMES; do
-            update-alternatives --remove x-cursor-theme \
-                $ICONDIR/$theme.theme
-        done
-  ;;
+       update-alternatives --remove x-cursor-theme \
+           $ICONDIR/breeze_cursors.theme
+       update-alternatives --remove x-cursor-theme \
+           $ICONDIR/Breeze_Snow.theme
+    ;;
 esac
 
 #DEBHELPER#
diff --git a/debian/changelog b/debian/changelog
index 8cd4906..278952b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 breeze (4:5.4.1-2~) UNRELEASED; urgency=medium
 
-  * 
+  * Fix the x-cursor-theme alternatives. (Closes: #798696) Thanks to
+    Kubuntu and Alejandro Lorenzo Gallego
 
  -- Maximiliano Curia <maxy at debian.org>  Tue, 15 Sep 2015 22:23:08 +0200
 
diff --git a/debian/rules b/debian/rules
index e315f3a..a11119f 100755
--- a/debian/rules
+++ b/debian/rules
@@ -6,27 +6,27 @@ include /usr/share/pkg-kde-tools/qt-kde-team/3/debian-qt-kde.mk
 
 override_dh_auto_clean:
 	$(overridden_command)
-	rm -rf build-qt4
+	rm -rf $(CURDIR)/build-qt4
 
 override_dh_auto_configure:
 	$(overridden_command)
-	$(overridden_command) --builddirectory=build-qt4 -- -DUSE_KDE4=true
+	$(overridden_command) --builddirectory=$(CURDIR)/build-qt4 -- -DUSE_KDE4=true
 
 override_dh_auto_build:
 	$(overridden_command)
-	$(overridden_command) --builddirectory=build-qt4
+	$(overridden_command) --builddirectory=$(CURDIR)/build-qt4
 
 override_dh_auto_install:
 	$(overridden_command)
-	$(overridden_command) --builddirectory=build-qt4
-	mkdir -p debian/kde-style-breeze-qt4/usr/lib/$(DEB_HOST_MULTIARCH)/qt4/plugins/styles/
-	ln -s /usr/lib/kde4/plugins/styles/breeze.so debian/kde-style-breeze-qt4/usr/lib/$(DEB_HOST_MULTIARCH)/qt4/plugins/styles/
+	$(overridden_command) --builddirectory=$(CURDIR)/build-qt4
+	mkdir -p $(CURDIR)/debian/kde-style-breeze-qt4/usr/lib/$(DEB_HOST_MULTIARCH)/qt4/plugins/styles/
+	ln -s /usr/lib/kde4/plugins/styles/breeze.so $(CURDIR)/debian/kde-style-breeze-qt4/usr/lib/$(DEB_HOST_MULTIARCH)/qt4/plugins/styles/
 
 override_dh_install:
 	# This is required to make sure Plasma does not
 	# fall back to a cursor theme from the 90's
-	debian/wrapperthemes.sh breeze_cursors
-	debian/wrapperthemes.sh Breeze_Snow
+	CURDIR=$(CURDIR) $(CURDIR)/debian/wrapperthemes.sh breeze_cursors \
+	                                                   Breeze_Snow
 	$(overridden_command)
 
 override_dh_strip:
diff --git a/debian/wrapperthemes.sh b/debian/wrapperthemes.sh
index 61c6d84..e2172c3 100755
--- a/debian/wrapperthemes.sh
+++ b/debian/wrapperthemes.sh
@@ -1,14 +1,20 @@
 #!/bin/sh
-ICONDIR=usr/share/icons
-WRAPPERDIR=etc/X11/cursors
-CURDIR=`pwd`
-
-theme=$1
-
-mkdir -p debian/tmp/${WRAPPERDIR}
-cd debian/tmp/${ICONDIR}
-grep -v Inherits ${CURDIR}/debian/tmp/${ICONDIR}/${theme}/index.theme > tmp || exit 1
-echo "Inherits=${theme}" >> tmp  || exit 1
-install -m 644 tmp ${CURDIR}/debian/tmp/${WRAPPERDIR}/${theme}.theme || exit 1
-rm tmp || exit 1
-exit 0
+set -e
+
+ICONDIR=/usr/share/icons
+WRAPPERDIR=/etc/X11/cursors
+: ${CURDIR:=`pwd`}
+
+tmp="$(mktemp)"
+
+while [ $# -gt 0 ]; do
+    theme=$1
+    shift
+
+    mkdir -p ${CURDIR}/debian/tmp${WRAPPERDIR}
+    cd ${CURDIR}/debian/tmp${ICONDIR}
+    grep -v Inherits ${CURDIR}/debian/tmp${ICONDIR}/${theme}/index.theme > "$tmp"
+    echo "Inherits=${theme}" >> "$tmp"
+    install -m 644 "$tmp" ${CURDIR}/debian/tmp${WRAPPERDIR}/${theme}.theme
+    rm "$tmp"
+done

-- 
breeze packaging



More information about the pkg-kde-commits mailing list