[PC-BSD Commits] r1191 - in pbibuild/modules/flock: . overlay-dir

svn at pcbsd.org svn at pcbsd.org
Wed Jan 16 11:55:10 PST 2008


Author: kris
Date: 2008-01-16 11:55:09 -0800 (Wed, 16 Jan 2008)
New Revision: 1191

Modified:
   pbibuild/modules/flock/build.sh
   pbibuild/modules/flock/copy-files
   pbibuild/modules/flock/overlay-dir/PBI.RemoveScript.sh
   pbibuild/modules/flock/overlay-dir/PBI.SetupScript.sh
   pbibuild/modules/flock/pbi.conf
Log:

Fixed up Flock to include the default e-mail client script, and register it
as a default browser. 



Modified: pbibuild/modules/flock/build.sh
===================================================================
--- pbibuild/modules/flock/build.sh	2008-01-16 18:10:26 UTC (rev 1190)
+++ pbibuild/modules/flock/build.sh	2008-01-16 19:55:09 UTC (rev 1191)
@@ -8,3 +8,6 @@
 # MODULEDIR = The location of the module directory for this PBI
 #   PORTVER = Version number of the port we used to build
 ##############################################################################
+
+# Now append our prefs file with the default email script
+echo "pref(\"network.protocol-handler.app.mailto\", \"/Programs/Flock${PORTVER}/bin/defaultemail\");" >> ${PBIDIR}/lib/flock/greprefs/all.js

Modified: pbibuild/modules/flock/copy-files
===================================================================
--- pbibuild/modules/flock/copy-files	2008-01-16 18:10:26 UTC (rev 1190)
+++ pbibuild/modules/flock/copy-files	2008-01-16 19:55:09 UTC (rev 1191)
@@ -2,7 +2,7 @@
 /usr/local/bin/flock-config bin/
 /usr/local/include/flock include/
 /usr/local/lib/flock lib/
-/usr/local/lib/browser_plugins lib/browser_plugins/
+/usr/local/lib/flock/flock-bin bin/
 /usr/local/libdata/pkgconfig/flock-gtkmozembed.pc libdata/pkgconfig/
 /usr/local/libdata/pkgconfig/flock-js.pc libdata/pkgconfig/
 /usr/local/libdata/pkgconfig/flock-plugin.pc libdata/pkgconfig/

Modified: pbibuild/modules/flock/overlay-dir/PBI.RemoveScript.sh
===================================================================
--- pbibuild/modules/flock/overlay-dir/PBI.RemoveScript.sh	2008-01-16 18:10:26 UTC (rev 1190)
+++ pbibuild/modules/flock/overlay-dir/PBI.RemoveScript.sh	2008-01-16 19:55:09 UTC (rev 1191)
@@ -10,11 +10,6 @@
 rm -fR /usr/local/bin/flock-config
 rm -fR /usr/local/include/flock
 rm -fR /usr/local/lib/flock
-rm -fR /usr/local/lib/browser_plugins
-rm -fR /usr/local/libdata/pkgconfig/flock-gtkmozembed.pc
-rm -fR /usr/local/libdata/pkgconfig/flock-js.pc
-rm -fR /usr/local/libdata/pkgconfig/flock-plugin.pc
-rm -fR /usr/local/libdata/pkgconfig/flock-xpcom.pc
 #rm -fR /usr/local/share/applications/flock.desktop
 rm -fR /usr/local/share/idl/flock*
 rm -fR /usr/local/share/pixmaps/flock.xpm

Modified: pbibuild/modules/flock/overlay-dir/PBI.SetupScript.sh
===================================================================
--- pbibuild/modules/flock/overlay-dir/PBI.SetupScript.sh	2008-01-16 18:10:26 UTC (rev 1190)
+++ pbibuild/modules/flock/overlay-dir/PBI.SetupScript.sh	2008-01-16 19:55:09 UTC (rev 1191)
@@ -18,13 +18,46 @@
 ln -s /Programs/${PROGDIR}/.sbin/flock-config /usr/local/bin/flock-config
 ln -s /Programs/${PROGDIR}/include/flock /usr/local/include/flock
 ln -s /Programs/${PROGDIR}/lib/flock /usr/local/lib/flock
-ln -s /Programs/${PROGDIR}/lib/browser_plugins /usr/local/lib/browser_plugins
-ln -s /Programs/${PROGDIR}/libdata/pkgconfig/flock-gtkmozembed.pc /usr/local/libdata/pkgconfig/flock-gtkmozembed.pc
-ln -s /Programs/${PROGDIR}/libdata/pkgconfig/flock-js.pc /usr/local/libdata/pkgconfig/flock-js.pc
-ln -s /Programs/${PROGDIR}/libdata/pkgconfig/flock-plugin.pc /usr/local/libdata/pkgconfig/flock-plugin.pc
-ln -s /Programs/${PROGDIR}/libdata/pkgconfig/flock-xpcom.pc /usr/local/libdata/pkgconfig/flock-xpcom.pc
-#ln -s /Programs/${PROGDIR}/share/applications/flock.desktop /usr/local/share/applications/flock.desktop
 ln -s /Programs/${PROGDIR}/share/idl/flock* /usr/local/share/idl/
 ln -s /Programs/${PROGDIR}/share/pixmaps/flock.xpm /usr/local/share/pixmaps/flock.xpm
 
+if [ ! -z "$DISPLAY" ]
+then
+
+USER="$USERNAME"
+if [ "$USER" != "root" ]
+then
+  HOMEDIR="/home/${USER}"
+else
+  HOMEDIR="/root"
+fi
+
+  # Ask if we should make this the default browser application for our user
+  kdialog --yesno "Do you want to make Flock the default browser?" --title "Default browser?"
+  if [ "$?" = "0" ]
+  then
+      # Strip out the old BrowserApplication line to make way for the new
+      cat ${HOMEDIR}/.kde/share/config/kdeglobals | grep -v '^BrowserApplication' > ${HOMEDIR}/.kdeglobals.new
+
+      touch ${HOMEDIR}/.kdeglobals.new2
+      while read line
+      do
+
+         if [ "$line" = "[General]" ]
+         then
+           echo "$line" >> ${HOMEDIR}/.kdeglobals.new2
+           echo "BrowserApplication=!/usr/local/bin/flock" >> ${HOMEDIR}/.kdeglobals.new2
+    	 else
+       	   echo "$line" >> ${HOMEDIR}/.kdeglobals.new2
+  	 fi
+      done < ${HOMEDIR}/.kdeglobals.new
+
+      # all finished, now move it back over kdeglobals
+      rm ${HOMEDIR}/.kdeglobals.new
+      chown ${USERNAME}:${USERNAME} ${HOMEDIR}/.kdeglobals.new2
+      mv ${HOMEDIR}/.kdeglobals.new2 ${HOMEDIR}/.kde/share/config/kdeglobals
+  fi
+
+fi
+
 echo "LAUNCHCLOSE: /usr/local/bin/flock"

Modified: pbibuild/modules/flock/pbi.conf
===================================================================
--- pbibuild/modules/flock/pbi.conf	2008-01-16 18:10:26 UTC (rev 1190)
+++ pbibuild/modules/flock/pbi.conf	2008-01-16 19:55:09 UTC (rev 1191)
@@ -32,6 +32,6 @@
 
 # Build Key - Change this to anything else to trigger a rebuild 
 #           - The rebuild will take place even if port is still the same ver
-BUILDKEY="01"
+BUILDKEY="21"
 
 export PBIPORT MAKEOPTS PROGNAME PROGWEB PROGAUTHOR OTHERPORT PROGICON PROGLIBS PBIUPDATE BUILDKEY



More information about the Commits mailing list