From 706fe0011f1949451f1646b113fc44c9f3b486da Mon Sep 17 00:00:00 2001 From: Tobi Sim Date: Sat, 21 Feb 2015 15:59:41 +0100 Subject: [PATCH] Compatibility fixes --- Makefile | 30 +++++++++++++++++------------- dat/sailfish-python.desktop | 4 ++-- renamep.py | 17 +++++++++++------ sailfish-python-noarch.rpm | Bin 10344 -> 0 bytes 4 files changed, 30 insertions(+), 21 deletions(-) delete mode 100644 sailfish-python-noarch.rpm diff --git a/Makefile b/Makefile index 9a242f4..224162b 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ -Appname:=sailfish-python +Appname:=$(shell cat appname.txt) prefix:=/usr -temp:=/tmp/make +temp:=/tmp/fpm builddir:=./build sdkpath:=$(HOME)/SailfishOS dependencies:=-d libsailfishapp-launcher -d python3-base -d pyotherside-qml-plugin-python3-qt5 @@ -12,7 +12,7 @@ jolla_wifi_ip:=Jolla all: clean build-tmp rpm-virt rpm-jolla -make-jolla: build-tmp rpm-jolla send-jolla +make-jolla-usb: build-tmp rpm-jolla send-jolla make-jolla-wifi: build-tmp rpm-jolla send-jolla-wifi make-jolla-ap: build-tmp rpm-jolla send-jolla-ap make-virt: build-tmp rpm-virt send-virt @@ -30,32 +30,36 @@ build-tmp: install -m 755 ./dat/$(Appname).sh $(temp)/usr/bin/$(Appname) rpm-virt: - cd $(temp);fpm -f -s dir -t rpm $(dependencies) -p $(CURDIR)/$(Appname)-$(arch).rpm -n $(Appname) -a $(arch) --prefix / * + cd $(temp);fpm -f -s dir -t rpm $(dependencies) -p $(CURDIR)/$(rpmname) -n $(Appname) -a $(arch) --prefix / * rpm-jolla: arch:=noarch rpm-jolla: - cd $(temp);fpm -f -s dir -t rpm $(dependencies) -p $(CURDIR)/$(Appname)-$(arch).rpm -n $(Appname) -a $(arch) --prefix / * + cd $(temp);fpm -f -s dir -t rpm $(dependencies) -p $(CURDIR)/$(rpmname) -n $(Appname) -a $(arch) --prefix / * send-virt: - rsync -vrp --rsh='ssh -p2223 -i $(sdkpath)/vmshare/ssh/private_keys/SailfishOS_Emulator/root' ./$(Appname)-$(arch).rpm root@localhost:/home/nemo/Downloads - ssh -p2223 -i $(sdkpath)/vmshare/ssh/private_keys/SailfishOS_Emulator/root root@localhost pkcon install-local -y /home/nemo/Downloads/$(Appname)-$(arch).rpm + rsync -vrp --rsh='ssh -p2223 -i $(sdkpath)/vmshare/ssh/private_keys/SailfishOS_Emulator/root' ./$(rpmname) root@localhost:/tmp + ssh -p2223 -i $(sdkpath)/vmshare/ssh/private_keys/SailfishOS_Emulator/root root@localhost pkcon install-local -y /tmp/$(rpmname) "&&" rm /tmp/$(rpmname) send-jolla-wifi: arch:=noarch send-jolla-wifi: - rsync -vrp ./$(Appname)-$(arch).rpm root@$(jolla_wifi_ip):/home/nemo/Downloads - ssh root@$(jolla_wifi_ip) pkcon install-local -y /home/nemo/Downloads/$(Appname)-$(arch).rpm + rsync -vrp ./$(rpmname) root@$(jolla_wifi_ip):/tmp + ssh root@$(jolla_wifi_ip) pkcon install-local -y /tmp/$(rpmname) "&&" rm /tmp/$(rpmname) + send-jolla-ap: arch:=noarch send-jolla-ap: jolla_wifi_ip:=192.168.1.1 send-jolla-ap: - rsync -vrp ./$(Appname)-$(arch).rpm root@$(jolla_wifi_ip):/home/nemo/Downloads - ssh root@$(jolla_wifi_ip) pkcon install-local -y /home/nemo/Downloads/$(Appname)-$(arch).rpm + rsync -vrp ./$(rpmname) root@$(jolla_wifi_ip):/tmp + ssh root@$(jolla_wifi_ip) pkcon install-local -y /tmp/$(rpmname) "&&" rm /tmp/$(rpmname) + send-jolla: arch:=noarch send-jolla: - rsync -vrp ./$(Appname)-$(arch).rpm root@$(jolla_usb_ip):/home/nemo/Downloads - ssh root@$(jolla_usb_ip) pkcon install-local -y /home/nemo/Downloads/$(Appname)-$(arch).rpm + rsync -vrp ./$(Appname)-$(arch).rpm root@$(jolla_usb_ip):/tmp + ssh root@$(jolla_usb_ip) pkcon install-local -y /tmp/$(Appname)-$(arch).rpm "&&" rm /tmp/$(Appname)-$(arch).rpm + clean: rm -rf $(temp) rm -rf $(builddir) + rm -rf ./$(rpmname) diff --git a/dat/sailfish-python.desktop b/dat/sailfish-python.desktop index 6304c03..f127049 100644 --- a/dat/sailfish-python.desktop +++ b/dat/sailfish-python.desktop @@ -1,6 +1,6 @@ [Desktop Entry] Type=Application X-Nemo-Application-Type=silica-qt5 -Name=Scanner +Name=sailfish-python Icon=icon-launcher-component-gallery -Exec=sailfish-qml sailfish-scanner +Exec=sailfish-qml sailfish-python diff --git a/renamep.py b/renamep.py index 6c9217a..efbddcb 100755 --- a/renamep.py +++ b/renamep.py @@ -14,12 +14,17 @@ os.rename("./qml/"+oldname+".qml","./qml/"+newname+".qml") os.rename("./dat/"+oldname+".desktop","./dat/"+newname+".desktop") os.rename("./dat/"+oldname+".sh","./dat/"+newname+".sh") -makefile=open("./Makefile","r") -maketxt=makefile.read() -makefile.close() -makefile=open("./Makefile","w") -makefile.write(re.sub("Appname:="+oldname,"Appname:="+newname,maketxt)) -makefile.close() +def replaceInFile(oldname,newname,filename): + makefile=open(filename,"r") + maketxt=makefile.read() + makefile.close() + makefile=open(filename,"w") + makefile.write(re.sub("Appname:="+oldname,"Appname:="+newname,maketxt)) + makefile.close() + +for filename in ["./Makefile","./dat/"+newname+".desktop"]: + replaceInFile(oldname,newname,filename) + namefile=open("./appname.txt","w") namefile.write(newname+"\n") diff --git a/sailfish-python-noarch.rpm b/sailfish-python-noarch.rpm deleted file mode 100644 index 494f5942ea4de9635c2df162dd0ffb460bde67b2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10344 zcmeHMc{r6_yMN5mKoXM5YsipckM`bFB(E`3q=?ufJM6vfZ5ELbO6JrniVzJVl%XWj z4lfx~%8;qal%(0W9_{z~&ewUbbIy02KhAZX%i?~1>-XIEy4PCw^E_+q>t2&rruqdS zP!>5vx;Kr^@zi1k`*|`MT1ah#782I{&kG+U^s8~=wO4$+d%_ST;Q;D8frx;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