Description: Fix generated files by hardcoding p4vasp_home for runtime
 The p4vasp_config and launcher targets are called twice, during 'make'
 and 'make install', resulting in incorrect paths in generated files.
 APPMENU_DISPLAY_BOTH has been replaced by UBUNTU_MENUPROXY in Trusty.
 PYTHONPATH is not needed in recent versions of p4vasp.
Author: Graham Inggs <graham@nerve.org.za>
Forwarded: no
Last-Update: 2014-06-06
--- a/Makefile
+++ b/Makefile
@@ -50,7 +50,7 @@
 	cd odpdom && $(MAKE) libODP.a	
 	cd src && $(MAKE)
 p4vasp_config:
-	echo "p4vasp_home='$(P4VASP_HOME)'" >$(P4VCONFIG)
+	echo "p4vasp_home='/usr/share/p4vasp'" >$(P4VCONFIG)
 	cat $(VINFO) >> $(P4VCONFIG)
 devver:
 	echo "name       ='p4vasp-devel'" > $(VINFO)
@@ -63,10 +63,9 @@
 launcher:
 	echo "#!`which sh`" >$(P4V)
 	echo "export LD_PRELOAD=libstdc++.so.6" >>$(P4V)
-	echo "export PYTHONPATH=\$$PYTHONPATH:"$(SITE_PACKAGES) >>$(P4V)
-	echo "export APPMENU_DISPLAY_BOTH=1" >>$(P4V)
-	echo "export P4VASP_HOME="$(P4VASP_HOME) >> $(P4V)
-	echo "exec python "$(BINDIR)"/p4v.py \$$1 \$$2 \$$3" >>$(P4V)
+	echo "export UBUNTU_MENUPROXY=0" >>$(P4V)
+	echo "export P4VASP_HOME=/usr/share/p4vasp" >> $(P4V)
+	echo "exec /usr/bin/python /usr/share/p4vasp/p4v.py \"\$$$$@@\"" >>$(P4V)
 appletlist:
 	cd install && python makeappletlist.py
 bashrc:setenvironment
