[maemo-commits] [maemo-commits] r10398 - in projects/haf/trunk/meta-product-sardine: . debian

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Tue Mar 6 11:27:58 EET 2007
Author: mdk
Date: 2007-03-06 11:27:57 +0200 (Tue, 06 Mar 2007)
New Revision: 10398

Added:
   projects/haf/trunk/meta-product-sardine/ChangeLog
   projects/haf/trunk/meta-product-sardine/debian/postinst
Removed:
   projects/haf/trunk/meta-product-sardine/debian/files
Modified:
   projects/haf/trunk/meta-product-sardine/debian/rules
Log:
Adding a postinst script that creates the symlinks and all the stuff.
Moving all the logic to the postinst script.


Added: projects/haf/trunk/meta-product-sardine/ChangeLog
===================================================================
--- projects/haf/trunk/meta-product-sardine/ChangeLog	2007-03-06 08:31:41 UTC (rev 10397)
+++ projects/haf/trunk/meta-product-sardine/ChangeLog	2007-03-06 09:27:57 UTC (rev 10398)
@@ -0,0 +1,9 @@
+2007-03-06  Michael Dominic Kostrzewa  <michael.kostrzewa at nokia.com> 
+	
+	* debian/postinst: Adding a postinst script that creates the symlinks
+	and all the stuff.
+	
+	* debian/files: Removing.
+
+	* debian/rules: Moving all the logic to the postinst script.
+

Deleted: projects/haf/trunk/meta-product-sardine/debian/files
===================================================================
--- projects/haf/trunk/meta-product-sardine/debian/files	2007-03-06 08:31:41 UTC (rev 10397)
+++ projects/haf/trunk/meta-product-sardine/debian/files	2007-03-06 09:27:57 UTC (rev 10398)
@@ -1 +0,0 @@
-meta-product-sardine_1.0.0-1_all.deb x11 optional

Added: projects/haf/trunk/meta-product-sardine/debian/postinst
===================================================================
--- projects/haf/trunk/meta-product-sardine/debian/postinst	2007-03-06 08:31:41 UTC (rev 10397)
+++ projects/haf/trunk/meta-product-sardine/debian/postinst	2007-03-06 09:27:57 UTC (rev 10398)
@@ -0,0 +1,21 @@
+#!/bin/sh -e
+
+# We try to support upgrade path from older dists
+# First check if there is an existing old-default directory 
+# and try moving it around a bit
+if [[ -d '/usr/share/themes/default' && ! -h '/usr/share/themes/default' ]]; then
+  echo "Moving 'default' theme to 'theme0'..."
+  mv "/usr/share/themes/default" "/usr/share/themes/theme0"
+fi
+
+# Remove the existing symlink if it exists
+if [ -h '/usr/share/themes/default' ]; then
+  echo "Removing existing 'default' symlink"
+  rm -f '/usr/share/themes/default'
+fi
+
+# Create a symlink to default theme
+echo "Creating a sumlink 'default' => 'plankton' in /usr/share/themes"
+ln -s '/usr/share/themes/plankton' '/usr/share/themes/default'
+
+exit 0

Modified: projects/haf/trunk/meta-product-sardine/debian/rules
===================================================================
--- projects/haf/trunk/meta-product-sardine/debian/rules	2007-03-06 08:31:41 UTC (rev 10397)
+++ projects/haf/trunk/meta-product-sardine/debian/rules	2007-03-06 09:27:57 UTC (rev 10398)
@@ -28,10 +28,6 @@
 	dh_testroot
 	dh_clean -k
 	dh_installdirs
-	
-	# Symlink
-	install -d $(CURDIR)/debian/meta-product-sardine/usr/share/themes/plankton
-	ln -s plankton $(CURDIR)/debian/meta-product-sardine/usr/share/themes/default
 
 binary-indep: build install
 


More information about the maemo-commits mailing list