diff --git a/Makefile b/Makefile
index 20a5e96..4c51c1f 100644
--- a/Makefile
+++ b/Makefile
@@ -2,13 +2,14 @@ Appname:=$(shell cat appname.txt)
 prefix:=/usr
 temp:=/tmp/fpm-jolla
 sdkpath:=$(HOME)/SailfishOS
+sourcePath:=$(shell pwd)
 dependencies=$(shell for file in `cat dependencies.txt`;do echo "-d "$${file};done;)
 arch:=armv7hl
 version:=0.0.1
 iteration:=1
-rpmname:=$(Appname)-$(version).$(arch).rpm
+rpmname:=$(Appname)-$(version)-$(iteration).$(arch).rpm
 ssh_user:=nemo
-jolla_usb_ip:=192.168.2.15
+jolla_usb_ip:=192.168.1.15
 jolla_wifi_ip:=Jolla
 
 
@@ -27,7 +28,7 @@ build-tmp:
 	mkdir -p $(temp)/usr/share/icons/hicolor/86x86/apps
 	mkdir -p $(temp)/usr/bin
 	cp -ar ./qml $(temp)/usr/share/$(Appname)
-	cp -ar ./src/*.py $(temp)/usr/share/$(Appname)/src
+	cp -ar ./src/* $(temp)/usr/share/$(Appname)/src
 	cp -ar ./pyPackages/*$(arch) $(temp)/usr/share/$(Appname)/src/pyPackages
 	cp ./dat/$(Appname).desktop $(temp)/usr/share/applications/
 	cp -ar ./dat/appicon.png $(temp)/usr/share/icons/hicolor/86x86/apps/$(Appname).png
@@ -35,24 +36,63 @@ build-tmp:
 
 rpm-virt: arch:=i686
 rpm-virt: build-tmp
-	cd $(temp);fpm -f -s dir -t rpm -v $(version) --iteration $(iteration) $(dependencies) -p $(temp)/$(rpmname) -n $(Appname) -a $(arch) --prefix / *
+	cd $(temp);fpm -f -s dir -t rpm \
+		--after-install $(sourcePath)/dat/upgradeScript.sh \
+		--after-upgrade $(sourcePath)/dat/upgradeScript.sh \
+		--after-remove $(sourcePath)/dat/removeScript.sh \
+		--rpm-changelog $(sourcePath)/changelog.txt\
+		--directories "/usr/share/$(Appname)" \
+		-v $(version) \
+		--iteration $(iteration) \
+		$(dependencies) \
+		-p $(temp)/$(rpmname) \
+		-n $(Appname) \
+		-a $(arch) \
+		--prefix / *
 
 rpm-jolla: build-tmp
-	cd $(temp);fpm -f -s dir -t rpm -v $(version) --iteration $(iteration) $(dependencies) -p $(temp)/$(rpmname) -n $(Appname) -a $(arch) --prefix / *
+	cd $(temp);fpm -f -s dir -t rpm \
+		--after-install $(sourcePath)/dat/upgradeScript.sh \
+		--after-upgrade $(sourcePath)/dat/upgradeScript.sh \
+		--after-remove $(sourcePath)/dat/removeScript.sh \
+		--rpm-changelog $(sourcePath)/changelog.txt\
+		--directories "/usr/share/$(Appname)" \
+		-v $(version) \
+		--iteration $(iteration) \
+		$(dependencies) \
+		-p $(temp)/$(rpmname) \
+		-n $(Appname) \
+		-a $(arch) \
+		--prefix / *
 
 send-virt:
-	cat $(temp)/$(rpmname) | ssh -i '$(sdkpath)/vmshare/ssh/private_keys/SailfishOS_Emulator/root' -p2223 $(ssh_user)@localhost cat ">>" /tmp/$(rpmname) "&&" pkcon install-local -y /tmp/$(rpmname) "&&" rm /tmp/$(rpmname)
+	cat $(temp)/$(rpmname) | ssh -i '$(sdkpath)/vmshare/ssh/private_keys/SailfishOS_Emulator/nemo' -p2223 $(ssh_user)@localhost \
+		cat ">" /tmp/$(rpmname) "&&" \
+		pkcon install-local -y /tmp/$(rpmname) "&&" \
+		rm /tmp/$(rpmname)
 	
 send-jolla-wifi:
-	cat $(temp)/$(rpmname) | ssh $(ssh_user)@$(jolla_wifi_ip) cat ">>" /tmp/$(rpmname) "&&" pkcon install-local -y /tmp/$(rpmname) "&&" rm /tmp/$(rpmname)
+	cat $(temp)/$(rpmname) | ssh $(ssh_user)@$(jolla_wifi_ip) \
+		cat ">" /tmp/$(rpmname) "&&" \
+		pkcon install-local -y /tmp/$(rpmname) "&&" \
+		rm /tmp/$(rpmname)
 
 send-jolla-ap: jolla_wifi_ip:=192.168.1.1
 send-jolla-ap:
-	cat $(temp)/$(rpmname) | ssh $(ssh_user)@$(jolla_wifi_ip) cat ">>" /tmp/$(rpmname) "&&" pkcon install-local -y /tmp/$(rpmname) "&&" rm /tmp/$(rpmname)
+	cat $(temp)/$(rpmname) | ssh $(ssh_user)@$(jolla_wifi_ip) \
+		cat ">" /tmp/$(rpmname) "&&" \
+		pkcon install-local -y /tmp/$(rpmname) "&&" \
+		rm /tmp/$(rpmname)
 
 send-jolla-usb:
-	cat $(temp)/$(rpmname) | ssh $(ssh_user)@$(jolla_usb_ip) cat ">>" /tmp/$(rpmname) "&&" pkcon install-local -y /tmp/$(rpmname) "&&" rm /tmp/$(rpmname)
+	cat $(temp)/$(rpmname) | ssh $(ssh_user)@$(jolla_usb_ip) \
+		cat ">" /tmp/$(rpmname) "&&" \
+		pkcon install-local -y /tmp/$(rpmname) "&&" \
+		rm /tmp/$(rpmname)
 
+send-only-virt:
+	cat $(temp)/$(rpmname) | ssh -i '$(sdkpath)/vmshare/ssh/private_keys/SailfishOS_Emulator/nemo' -p2223 $(ssh_user)@localhost \
+		cat ">" /tmp/$(rpmname)
 
 clean: 
 	rm -rf $(temp)
diff --git a/changelog.txt b/changelog.txt
new file mode 100644
index 0000000..a13daa5
--- /dev/null
+++ b/changelog.txt
@@ -0,0 +1,2 @@
+*Mon Apr 27 2015 Tobi Sim 0.0.1-1
+-initial commit
diff --git a/dat/appicon.png b/dat/appicon.png
new file mode 100644
index 0000000..951dbb0
Binary files /dev/null and b/dat/appicon.png differ
diff --git a/dat/removeScript.sh b/dat/removeScript.sh
new file mode 100644
index 0000000..62e4f3e
--- /dev/null
+++ b/dat/removeScript.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+echo "removing /usr/share/sailfish-python"
+rm -rf /usr/share/sailfish-python
+
diff --git a/dat/upgradeScript.sh b/dat/upgradeScript.sh
new file mode 100644
index 0000000..5d6faee
--- /dev/null
+++ b/dat/upgradeScript.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+#rm -rf /usr/share/sailfish-python
+echo "Upgrading...."
+
diff --git a/renamep.py b/renamep.py
index c5fb4d5..549c063 100644
--- a/renamep.py
+++ b/renamep.py
@@ -22,7 +22,7 @@ def replaceInFile(oldname,newname,filename):
     makefile.write(re.sub(oldname,newname,maketxt))
     makefile.close()
 
-for filename in ["./Makefile","./dat/"+newname+".desktop","./dat/"+newname+".sh"]:
+for filename in ["./Makefile","./dat/"+newname+".desktop","./dat/"+newname+".sh","./dat/removeScript.sh","./dat/upgradeScript.sh"]:
     replaceInFile(oldname,newname,filename)