rev 10425 - in kde-extras/guidance/trunk/debian: . patches

Fathi Boudra fabo at alioth.debian.org
Thu May 1 13:20:51 UTC 2008


Author: fabo
Date: 2008-05-01 13:20:50 +0000 (Thu, 01 May 2008)
New Revision: 10425

Modified:
   kde-extras/guidance/trunk/debian/changelog
   kde-extras/guidance/trunk/debian/control
   kde-extras/guidance/trunk/debian/kde-guidance-powermanager.install
   kde-extras/guidance/trunk/debian/kde-guidance.init
   kde-extras/guidance/trunk/debian/kde-guidance.install
   kde-extras/guidance/trunk/debian/patches/10_wineconfig_icon.diff
   kde-extras/guidance/trunk/debian/patches/11_no_cpu_freq.diff
   kde-extras/guidance/trunk/debian/patches/12_pm_fix_indentation_actioncollection.diff
   kde-extras/guidance/trunk/debian/patches/13_nvidia_typo.diff
   kde-extras/guidance/trunk/debian/patches/14_powermanager_fixes.diff
   kde-extras/guidance/trunk/debian/pyversions
   kde-extras/guidance/trunk/debian/rules
Log:
* Merge thomas changes


Modified: kde-extras/guidance/trunk/debian/changelog
===================================================================
--- kde-extras/guidance/trunk/debian/changelog	2008-05-01 13:19:32 UTC (rev 10424)
+++ kde-extras/guidance/trunk/debian/changelog	2008-05-01 13:20:50 UTC (rev 10425)
@@ -1,11 +1,19 @@
-kde-guidance (0.8.0-3) UNRELEASED; urgency=low
+kde-guidance (0.8.0-3) unstable; urgency=low
 
-  * NOT RELEASED YET
-  * Depends: python-qt-dev
-    - mountconfig in guidance needs pyqtconfig
+  [ Thomas Viehmann ]
+  * Fix double build FTBFS. They annoy NMUers. (Closes: #424430)
+  * Move python modules into private dirs. (Closes: #445281)
+    + This requires fixing and expanding the interpreter adjustment.
 
- -- Mark Purcell <msp at debian.org>  Sat, 01 Sep 2007 11:48:32 +0100
+  [ Fathi Boudra ]
+  * Update pyversions. Build for python 2.4/2.5.
 
+  [ Mark Purcell ]
+  * Add python-qt-dev dependency to kde-guidance package.
+    mountconfig needs pyqtconfig.
+
+ -- Fathi Boudra <fboudra at free.fr>  Sun, 07 Oct 2007 18:55:46 +0200
+
 kde-guidance (0.8.0-2) unstable; urgency=low
 
   * Add Build-Depends: python-qt-dev

Modified: kde-extras/guidance/trunk/debian/control
===================================================================
--- kde-extras/guidance/trunk/debian/control	2008-05-01 13:19:32 UTC (rev 10424)
+++ kde-extras/guidance/trunk/debian/control	2008-05-01 13:20:50 UTC (rev 10425)
@@ -3,12 +3,13 @@
 Priority: optional
 Maintainer: Debian KDE Extras Team <pkg-kde-extras at lists.alioth.debian.org>
 Uploaders: Fathi Boudra <fabo at debian.org>, Mark Purcell <msp at debian.org>
-Build-Depends: cdbs, debhelper (>= 5), chrpath, kdelibs4-dev,
+Build-Depends: cdbs, debhelper (>= 5), quilt, chrpath, kdelibs4-dev,
  libpythonize0-dev, libtool, libxml2-utils, libxss-dev, libxxf86vm-dev,
  pykdeextensions, pyqt-tools, python-kde3, python-kde3-dev, python-sip4-dev,
  python-support (>= 0.6), python-all-dev (>= 2.3.5-11), x11proto-scrnsaver-dev,
  python-qt-dev
-Standards-Version: 3.7.2
+Standards-Version: 3.7.3
+Homepage: http://www.simonzone.com/software/guidance
 
 Package: kde-guidance
 Architecture: any
@@ -26,8 +27,6 @@
  .
  These tools are available in KDE Control Center, System Settings 
  or can be run as standalone applications.
- .
-  Homepage: http://www.simonzone.com/software/guidance
 
 Package: kde-guidance-powermanager
 Architecture: any
@@ -37,5 +36,3 @@
 Description: HAL based power manager applet
  A power management applet to indicate battery levels and perform hibernate or
  suspend using HAL.
- .
-  Homepage: http://www.simonzone.com/software/guidance

Modified: kde-extras/guidance/trunk/debian/kde-guidance-powermanager.install
===================================================================
--- kde-extras/guidance/trunk/debian/kde-guidance-powermanager.install	2008-05-01 13:19:32 UTC (rev 10424)
+++ kde-extras/guidance/trunk/debian/kde-guidance-powermanager.install	2008-05-01 13:20:50 UTC (rev 10425)
@@ -4,10 +4,10 @@
 usr/share/apps/guidance/pics/battery*.png
 usr/share/apps/guidance/pics/processor.png
 usr/share/autostart/guidance-power-manager.desktop
-usr/share/python-support/kde-guidance/guidance-power-manager.py
-usr/share/python-support/kde-guidance/guidance_power_manager_ui.py
-usr/share/python-support/kde-guidance/notify.py
-usr/share/python-support/kde-guidance/powermanage.py
-usr/share/python-support/kde-guidance/powermanager_ui.py
-usr/share/python-support/kde-guidance/tooltip.py
-usr/share/python-support/kde-guidance/hal-test.py
+usr/share/guidance/python/guidance-power-manager.py
+usr/share/guidance/python/guidance_power_manager_ui.py
+usr/share/guidance/python/notify.py
+usr/share/guidance/python/powermanage.py
+usr/share/guidance/python/powermanager_ui.py
+usr/share/guidance/python/tooltip.py
+usr/share/guidance/python/hal-test.py

Modified: kde-extras/guidance/trunk/debian/kde-guidance.init
===================================================================
--- kde-extras/guidance/trunk/debian/kde-guidance.init	2008-05-01 13:19:32 UTC (rev 10424)
+++ kde-extras/guidance/trunk/debian/kde-guidance.init	2008-05-01 13:20:50 UTC (rev 10425)
@@ -20,7 +20,7 @@
 
 case "$1" in
   start)
-	/usr/share/python-support/kde-guidance/displayconfig-hwprobe.py
+	/usr/share/guidance/python/displayconfig-hwprobe.py
 	;;
   stop)
 	;;

Modified: kde-extras/guidance/trunk/debian/kde-guidance.install
===================================================================
--- kde-extras/guidance/trunk/debian/kde-guidance.install	2008-05-01 13:19:32 UTC (rev 10424)
+++ kde-extras/guidance/trunk/debian/kde-guidance.install	2008-05-01 13:20:50 UTC (rev 10425)
@@ -13,7 +13,7 @@
 usr/lib/kde3/kcm_wineconfig.so.0.0.0
 usr/lib/kde3/kcm_wineconfig.la
 usr/lib/kde3/kcm_wineconfig.a
-usr/lib/python*/site-packages/ixf86misc.so
+usr/lib/python*/site-packages/ixf86misc.so usr/lib/guidance/python/
 usr/share/icons/crystalsvg/16x16/apps/daemons.png
 usr/share/icons/crystalsvg/16x16/apps/disksfilesystems.png
 usr/share/icons/crystalsvg/16x16/apps/userconfig.png
@@ -108,37 +108,37 @@
 usr/share/apps/guidance/Cards+
 usr/share/apps/guidance/MonitorsDB
 usr/share/apps/guidance/pcitable
-usr/share/python-support/kde-guidance/displayconfig-hwprobe.py
-usr/share/python-support/kde-guidance/xf86misc.py
-usr/share/python-support/kde-guidance/MicroHAL.py
-usr/share/python-support/kde-guidance/SMBShareSelectDialog.py
-usr/share/python-support/kde-guidance/ScanPCI.py
-usr/share/python-support/kde-guidance/displayconfig-hwprobe.py
-usr/share/python-support/kde-guidance/xf86misc.py
-usr/share/python-support/kde-guidance/MicroHAL.py
-usr/share/python-support/kde-guidance/SMBShareSelectDialog.py
-usr/share/python-support/kde-guidance/ScanPCI.py
-usr/share/python-support/kde-guidance/SimpleCommandRunner.py
-usr/share/python-support/kde-guidance/displayconfig-restore.py
-usr/share/python-support/kde-guidance/displayconfig.py
-usr/share/python-support/kde-guidance/displayconfigabstraction.py
-usr/share/python-support/kde-guidance/displayconfigwidgets.py
-usr/share/python-support/kde-guidance/drivedetect.py
-usr/share/python-support/kde-guidance/execwithcapture.py
-usr/share/python-support/kde-guidance/fuser.py
-usr/share/python-support/kde-guidance/fuser_ui.py
-#usr/share/python-support/kde-guidance/grubconfig.py
-usr/share/python-support/kde-guidance/ktimerdialog.py
-usr/share/python-support/kde-guidance/mountconfig.py
-usr/share/python-support/kde-guidance/servertestdialog.py
-usr/share/python-support/kde-guidance/serviceconfig.py
-usr/share/python-support/kde-guidance/sizeview.py
-usr/share/python-support/kde-guidance/unixauthdb.py
-usr/share/python-support/kde-guidance/userconfig.py
-usr/share/python-support/kde-guidance/wineconfig.py
-usr/share/python-support/kde-guidance/wineread.py
-usr/share/python-support/kde-guidance/winewrite.py
-usr/share/python-support/kde-guidance/xorgconfig.py
+usr/share/guidance/python/displayconfig-hwprobe.py
+usr/share/guidance/python/xf86misc.py
+usr/share/guidance/python/MicroHAL.py
+usr/share/guidance/python/SMBShareSelectDialog.py
+usr/share/guidance/python/ScanPCI.py
+usr/share/guidance/python/displayconfig-hwprobe.py
+usr/share/guidance/python/xf86misc.py
+usr/share/guidance/python/MicroHAL.py
+usr/share/guidance/python/SMBShareSelectDialog.py
+usr/share/guidance/python/ScanPCI.py
+usr/share/guidance/python/SimpleCommandRunner.py
+usr/share/guidance/python/displayconfig-restore.py
+usr/share/guidance/python/displayconfig.py
+usr/share/guidance/python/displayconfigabstraction.py
+usr/share/guidance/python/displayconfigwidgets.py
+usr/share/guidance/python/drivedetect.py
+usr/share/guidance/python/execwithcapture.py
+usr/share/guidance/python/fuser.py
+usr/share/guidance/python/fuser_ui.py
+#usr/share/guidance/python/grubconfig.py
+usr/share/guidance/python/ktimerdialog.py
+usr/share/guidance/python/mountconfig.py
+usr/share/guidance/python/servertestdialog.py
+usr/share/guidance/python/serviceconfig.py
+usr/share/guidance/python/sizeview.py
+usr/share/guidance/python/unixauthdb.py
+usr/share/guidance/python/userconfig.py
+usr/share/guidance/python/wineconfig.py
+usr/share/guidance/python/wineread.py
+usr/share/guidance/python/winewrite.py
+usr/share/guidance/python/xorgconfig.py
 etc/X11/Xsession.d/40guidance-displayconfig_restore
 usr/lib/kde3/kcm_serviceconfig.so.0
 usr/lib/kde3/kcm_serviceconfig.so

Modified: kde-extras/guidance/trunk/debian/patches/10_wineconfig_icon.diff
===================================================================
--- kde-extras/guidance/trunk/debian/patches/10_wineconfig_icon.diff	2008-05-01 13:19:32 UTC (rev 10424)
+++ kde-extras/guidance/trunk/debian/patches/10_wineconfig_icon.diff	2008-05-01 13:20:50 UTC (rev 10425)
@@ -1,6 +1,5 @@
-diff -Nur kde-guidance-0.8.0/wineconfig/wineconfig.desktop kde-guidance-0.8.0.new/wineconfig/wineconfig.desktop
---- kde-guidance-0.8.0/wineconfig/wineconfig.desktop	2007-03-27 22:43:34.000000000 +0200
-+++ kde-guidance-0.8.0.new/wineconfig/wineconfig.desktop	2007-05-18 20:01:35.000000000 +0200
+--- a/wineconfig/wineconfig.desktop
++++ b/wineconfig/wineconfig.desktop
 @@ -18,7 +18,7 @@
  GenericName[pt]=Editor de Configuração do Wine
  GenericName[pt_BR]=Editor de Configuração do Wine

Modified: kde-extras/guidance/trunk/debian/patches/11_no_cpu_freq.diff
===================================================================
--- kde-extras/guidance/trunk/debian/patches/11_no_cpu_freq.diff	2008-05-01 13:19:32 UTC (rev 10424)
+++ kde-extras/guidance/trunk/debian/patches/11_no_cpu_freq.diff	2008-05-01 13:20:50 UTC (rev 10425)
@@ -1,6 +1,5 @@
-diff -Nur kde-guidance-0.8.0/powermanager/guidance-power-manager.py kde-guidance-0.8.0.new/powermanager/guidance-power-manager.py
---- kde-guidance-0.8.0/powermanager/guidance-power-manager.py	2007-03-26 17:14:50.000000000 +0200
-+++ kde-guidance-0.8.0.new/powermanager/guidance-power-manager.py	2007-05-18 20:03:03.000000000 +0200
+--- a/powermanager/guidance-power-manager.py
++++ b/powermanager/guidance-power-manager.py
 @@ -660,7 +660,8 @@
              self.checkIdletime()
  

Modified: kde-extras/guidance/trunk/debian/patches/12_pm_fix_indentation_actioncollection.diff
===================================================================
--- kde-extras/guidance/trunk/debian/patches/12_pm_fix_indentation_actioncollection.diff	2008-05-01 13:19:32 UTC (rev 10424)
+++ kde-extras/guidance/trunk/debian/patches/12_pm_fix_indentation_actioncollection.diff	2008-05-01 13:20:50 UTC (rev 10425)
@@ -1,6 +1,5 @@
-diff -Nur kde-guidance-0.8.0/powermanager/guidance-power-manager.py kde-guidance-0.8.0.new/powermanager/guidance-power-manager.py
---- kde-guidance-0.8.0/powermanager/guidance-power-manager.py	2007-05-18 20:03:33.000000000 +0200
-+++ kde-guidance-0.8.0.new/powermanager/guidance-power-manager.py	2007-05-18 20:05:29.000000000 +0200
+--- a/powermanager/guidance-power-manager.py
++++ b/powermanager/guidance-power-manager.py
 @@ -823,10 +823,7 @@
                  self.CpuProgress[cpu].setEnabled(True)
                  self.CpuProgress[cpu].setTotalSteps(cpustate['max'])
@@ -10,6 +9,6 @@
 -	
 -	
 +        self.systray.actionCollection().action(policy).setChecked(True)
-
+ 
      def changePoweredBrightness(self, level=None):
          """ Mains-powered brigthness slider has been moved. """

Modified: kde-extras/guidance/trunk/debian/patches/13_nvidia_typo.diff
===================================================================
--- kde-extras/guidance/trunk/debian/patches/13_nvidia_typo.diff	2008-05-01 13:19:32 UTC (rev 10424)
+++ kde-extras/guidance/trunk/debian/patches/13_nvidia_typo.diff	2008-05-01 13:20:50 UTC (rev 10425)
@@ -1,6 +1,5 @@
-diff -Nur kde-guidance-0.8.0/displayconfig/displayconfigabstraction.py kde-guidance-0.8.0.new/displayconfig/displayconfigabstraction.py
---- kde-guidance-0.8.0/displayconfig/displayconfigabstraction.py	2007-03-26 17:14:51.000000000 +0200
-+++ kde-guidance-0.8.0.new/displayconfig/displayconfigabstraction.py	2007-05-18 20:09:07.000000000 +0200
+--- a/displayconfig/displayconfigabstraction.py
++++ b/displayconfig/displayconfigabstraction.py
 @@ -2498,8 +2498,12 @@
          # FIXME x86_64 => 'lib64'
  

Modified: kde-extras/guidance/trunk/debian/patches/14_powermanager_fixes.diff
===================================================================
--- kde-extras/guidance/trunk/debian/patches/14_powermanager_fixes.diff	2008-05-01 13:19:32 UTC (rev 10424)
+++ kde-extras/guidance/trunk/debian/patches/14_powermanager_fixes.diff	2008-05-01 13:20:50 UTC (rev 10425)
@@ -1,6 +1,5 @@
-diff -Nur kde-guidance-0.8.0/powermanager/guidance-power-manager.py kde-guidance-0.8.0.new/powermanager/guidance-power-manager.py
---- kde-guidance-0.8.0/powermanager/guidance-power-manager.py	2007-05-18 20:11:28.000000000 +0200
-+++ kde-guidance-0.8.0.new/powermanager/guidance-power-manager.py	2007-05-18 20:12:35.000000000 +0200
+--- a/powermanager/guidance-power-manager.py
++++ b/powermanager/guidance-power-manager.py
 @@ -451,6 +451,10 @@
          """ Lock the screen and initiate a suspend to RAM (S3). """
          if self.config.readBoolEntry("lockOnResume", True):
@@ -84,9 +83,8 @@
          "Handles battery, display and suspend modes for your computer.", KAboutData.License_GPL, 
          "(C) 2006-2007 Sebastian Kügler, Canonical Ltd, Luka Renko", 
          None, None, "jriddell at ubuntu.com")
-diff -Nur kde-guidance-0.8.0/powermanager/powermanage.py kde-guidance-0.8.0.new/powermanager/powermanage.py
---- kde-guidance-0.8.0/powermanager/powermanage.py	2007-03-26 17:14:50.000000000 +0200
-+++ kde-guidance-0.8.0.new/powermanager/powermanage.py	2007-05-18 20:12:35.000000000 +0200
+--- a/powermanager/powermanage.py
++++ b/powermanager/powermanage.py
 @@ -72,8 +72,11 @@
          self.SCREENSAVER_BLANKONLY = True
  
@@ -166,9 +164,8 @@
                  print "Lid is closed."
              else:
                  print "Lid is currently open."
-diff -Nur kde-guidance-0.8.0/powermanager/tooltip.ui kde-guidance-0.8.0.new/powermanager/tooltip.ui
---- kde-guidance-0.8.0/powermanager/tooltip.ui	2007-03-16 20:28:18.000000000 +0100
-+++ kde-guidance-0.8.0.new/powermanager/tooltip.ui	2007-05-18 20:12:35.000000000 +0200
+--- a/powermanager/tooltip.ui
++++ b/powermanager/tooltip.ui
 @@ -23,7 +23,7 @@
      </property>
      <property name="minimumSize">

Modified: kde-extras/guidance/trunk/debian/pyversions
===================================================================
--- kde-extras/guidance/trunk/debian/pyversions	2008-05-01 13:19:32 UTC (rev 10424)
+++ kde-extras/guidance/trunk/debian/pyversions	2008-05-01 13:20:50 UTC (rev 10425)
@@ -1 +1 @@
-2.4
+2.4-

Modified: kde-extras/guidance/trunk/debian/rules
===================================================================
--- kde-extras/guidance/trunk/debian/rules	2008-05-01 13:19:32 UTC (rev 10424)
+++ kde-extras/guidance/trunk/debian/rules	2008-05-01 13:20:50 UTC (rev 10425)
@@ -4,12 +4,13 @@
 
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/python-distutils.mk
-include /usr/share/cdbs/1/rules/simple-patchsys.mk
+include /usr/share/cdbs/1/rules/patchsys-quilt.mk
 include /usr/share/cdbs/1/rules/utils.mk
 
-DEB_DH_INSTALL_ARGS = --sourcedir=debian/tmp
-DEB_INSTALL_MANPAGES_kde-guidance := debian/displayconfig.1  debian/mountconfig.1  debian/serviceconfig.1  debian/userconfig.1
-PYSUPPORT_PATH = $(DEB_DESTDIR)/usr/share/python-support/kde-guidance
+DEB_DH_INSTALL_ARGS := --sourcedir=debian/tmp
+DEB_INSTALL_MANPAGES_kde-guidance := debian/displayconfig.1 debian/mountconfig.1 debian/serviceconfig.1 debian/userconfig.1
+PYSUPPORT_PATH = $(DEB_DESTDIR)/usr/share/guidance/python
+DEB_PYTHON_PRIVATE_MODULES_DIRS = /usr/share/guidance/python /usr/lib/guidance/python
 
 install/kde-guidance::
 	# install icons to right place
@@ -34,9 +35,9 @@
 	install -D -p -m0755 displayconfig/displayconfig-hwprobe.py \
 		$(PYSUPPORT_PATH)/displayconfig-hwprobe.py
 
-	# move python modules in PYSUPPORT_PATH
-	mv $(DEB_DESTDIR)/usr/lib/python*/site-packages/*.py $(PYSUPPORT_PATH)
-	mv $(DEB_DESTDIR)/usr/share/apps/guidance/*.py $(PYSUPPORT_PATH)
+	# copy python modules in PYSUPPORT_PATH
+	cp $(DEB_DESTDIR)/usr/lib/python*/site-packages/*.py $(PYSUPPORT_PATH)
+	cp $(DEB_DESTDIR)/usr/share/apps/guidance/*.py $(PYSUPPORT_PATH)
 
         # fix script-not-executable
 	chmod 0755 $(PYSUPPORT_PATH)/xf86misc.py
@@ -58,18 +59,19 @@
 
 	# fix the link properly
 	mkdir -p debian/kde-guidance/usr/bin
-	(cd debian/kde-guidance/usr/bin; ln -sf ../share/python-support/kde-guidance/displayconfig.py displayconfig)
-	(cd debian/kde-guidance/usr/bin; ln -sf ../share/python-support/kde-guidance/displayconfig-restore.py displayconfig-restore)
-	(cd debian/kde-guidance/usr/bin; ln -sf ../share/python-support/kde-guidance/mountconfig.py mountconfig)
-	(cd debian/kde-guidance/usr/bin; ln -sf ../share/python-support/kde-guidance/serviceconfig.py serviceconfig)
-	(cd debian/kde-guidance/usr/bin; ln -sf ../share/python-support/kde-guidance/userconfig.py userconfig)
-	(cd debian/kde-guidance/usr/bin; ln -sf ../share/python-support/kde-guidance/wineconfig.py wineconfig)
-#	(cd debian/kde-guidance/usr/bin; ln -sf ../share/python-support/kde-guidance/grubconfig.py grubconfig)
+	(cd debian/kde-guidance/usr/bin; ln -sf ../share/guidance/python/displayconfig.py displayconfig)
+	(cd debian/kde-guidance/usr/bin; ln -sf ../share/guidance/python/displayconfig-restore.py displayconfig-restore)
+	(cd debian/kde-guidance/usr/bin; ln -sf ../share/guidance/python/mountconfig.py mountconfig)
+	(cd debian/kde-guidance/usr/bin; ln -sf ../share/guidance/python/serviceconfig.py serviceconfig)
+	(cd debian/kde-guidance/usr/bin; ln -sf ../share/guidance/python/userconfig.py userconfig)
+	(cd debian/kde-guidance/usr/bin; ln -sf ../share/guidance/python/wineconfig.py wineconfig)
+#	(cd debian/kde-guidance/usr/bin; ln -sf ../share/guidance/python/grubconfig.py grubconfig)
 
-	: # Replace all '#!' calls to python with /usr/bin/python
-	: # and make them executable
-	for i in `find debian/kde-guidance -type f`; do \
-		sed '1s,#!.*python[^ ]*\(.*\),#! /usr/bin/python\1,' \
+	# Replace all '#!' calls to python with /usr/bin/python
+	# and make them executable and add sys.path
+	# some care must be taken to not process twice
+	for i in $$(find debian/tmp -type f | xargs grep -L 'import sys ; sys.path\[:0\] = \["/usr/share/guidance/python/","/usr/lib/guidance/python/"\]' ); do \
+		sed '1s,#!.*python[^ ]*\(.*\),#! /usr/bin/python\1\n# -*- coding: UTF-8 -*-\nimport sys ; sys.path[:0] = ["/usr/share/guidance/python/"\,"/usr/lib/guidance/python/"],' \
 			$$i > $$i.temp; \
 		if cmp --quiet $$i $$i.temp; then \
 			rm -f $$i.temp; \
@@ -96,21 +98,22 @@
 	(cd powermanager; kdepyuic tooltip.ui)
 	(cd powermanager; kdepyuic notify.ui)
 
-	# move python modules in PYSUPPORT_PATH
-	mv powermanager/*.py $(PYSUPPORT_PATH)
+	# copy python modules in PYSUPPORT_PATH
+	cp powermanager/*.py $(PYSUPPORT_PATH)
 
 	# generate guidance-power-manager script
 	echo "#!/bin/sh" > $(DEB_DESTDIR)/usr/bin/guidance-power-manager
-	echo "/usr/share/python-support/kde-guidance/guidance-power-manager.py &" >> $(DEB_DESTDIR)/usr/bin/guidance-power-manager
+	echo "/usr/share/guidance/python/guidance-power-manager.py &" >> $(DEB_DESTDIR)/usr/bin/guidance-power-manager
 	chmod +x $(DEB_DESTDIR)/usr/bin/guidance-power-manager
 
 	# fix script-not-executable
 	chmod 0755 $(PYSUPPORT_PATH)/powermanage.py
 
-	: # Replace all '#!' calls to python with /usr/bin/python
-	: # and make them executable
-	for i in `find debian/kde-guidance-powermanager -type f`; do \
-		sed '1s,#!.*python[^ ]*\(.*\),#! /usr/bin/python\1,' \
+	# Replace all '#!' calls to python with /usr/bin/python
+	# and make them executable and add sys.path
+	# some care must be taken to not process twice
+	for i in $$(find debian/tmp -type f | xargs grep -L 'import sys ; sys.path\[:0\] = \["/usr/share/guidance/python/","/usr/lib/guidance/python/"\]' ); do \
+		sed '1s,#!.*python[^ ]*\(.*\),#! /usr/bin/python\1\n# -*- coding: UTF-8 -*-\nimport sys ; sys.path[:0] = ["/usr/share/guidance/python/"\,"/usr/lib/guidance/python/"],' \
 			$$i > $$i.temp; \
 		if cmp --quiet $$i $$i.temp; then \
 			rm -f $$i.temp; \




More information about the pkg-kde-commits mailing list