diff --git a/Makefile b/Makefile index c4078e8..c4e2c6c 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ Appname:=$(shell cat appname.txt) prefix:=/usr -temp:=/tmp/fpm +temp:=/tmp/fpm-jolla builddir:=./build sdkpath:=$(HOME)/SailfishOS dependencies=$(shell for file in `cat dependencies.txt`;do echo "-d "$${file};done;) @@ -32,30 +32,21 @@ build-tmp: rpm-virt: 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)/$(rpmname) -n $(Appname) -a $(arch) --prefix / * send-virt: - 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) + cat ./$(rpmname) | ssh -p2223 -i $(sdkpath)/vmshare/ssh/private_keys/SailfishOS_Emulator/root root@localhost cat ">>" /tmp/$(rpmname) "&&" pkcon install-local -y /tmp/$(rpmname) "&&" rm /tmp/$(rpmname) -send-jolla-wifi: arch:=noarch send-jolla-wifi: - rsync -vrp ./$(rpmname) root@$(jolla_wifi_ip):/tmp - ssh root@$(jolla_wifi_ip) pkcon install-local -y /tmp/$(rpmname) "&&" rm /tmp/$(rpmname) + cat ./$(rpmname) | ssh root@$(jolla_wifi_ip) cat ">>" /tmp/$(rpmname) "&&" 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 ./$(rpmname) root@$(jolla_wifi_ip):/tmp - ssh root@$(jolla_wifi_ip) pkcon install-local -y /tmp/$(rpmname) "&&" rm /tmp/$(rpmname) + cat ./$(rpmname) | ssh root@$(jolla_wifi_ip) cat ">>" /tmp/$(rpmname) "&&" pkcon install-local -y /tmp/$(rpmname) "&&" rm /tmp/$(rpmname) -send-jolla: arch:=noarch send-jolla: - 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 - + cat ./$(rpmname) | ssh root@$(jolla_usb_ip) cat ">>" /tmp/$(rpmname) "&&" pkcon install-local -y /tmp/$(rpmname) "&&" rm /tmp/$(rpmname) clean: rm -rf $(temp) diff --git a/README b/README index 4f6c5d8..c39d9a7 100644 --- a/README +++ b/README @@ -1,32 +1,36 @@ Sailfish Python +============== this is a pyotherside based app template for sailfish os. I simply cant get my head around the way rpm packages are built,so i found an alternative Way using fpm https://github.com/jordansissel/fpm -these packages are needed to build/install the package: +Build Dependencies: +------------------ +this package are needed to build/install the package: fpm -- to package a a root tree from a temporary directory to a rpm package -rsync -- to send the package to your testing machine (jolla phone or sailfish emulator) +Make Commands: +------------- use these make commands to build/install your app for testing: -make make-virt +## make make-virt build your package, and install it on your Sailfish Emulator on localhost:2223, considering your Sailfish-SDK is installed at ~/SailfishOS -make make-jolla-wifi +## make make-jolla-wifi build your package, and install it on your jolla phone, considering your development PC is authorized for root ssh login on the phone and it is found in your dns-space as "jolla" -make make-jolla-usb [jolla_usb_ip=192.168.2.15] +## make make-jolla-usb [jolla_usb_ip=192.168.2.15] build your package, and install it on your jolla phone, considering your development PC is authorized for root ssh login on the phone, and connected via usb development mode set your jollas ip like above. -Adding dependencies: +## Adding dependencies: a basic set of dependencies for python3 apps are already added to dependencies.txt, but you can still add other ones to the list. -Adding python Modules: +## Adding python Modules: all python Modules in pyPackages are included in the package. for now, i like to package both an armv7l and a x86 version and select the package version within the qml code. Packages are built with "noarch", so they should run an any device. I had success using pip wheel to build these packages directly on the jolla phone/sailfish emulator and unpacking them to pyPackages. As an example, the is pillow (Python Imaging Library) included in the package. -Renaming your App: +## Renaming your App: ./renamep.py "my-new-appname" diff --git a/dat/Sailfish-Scanner.spec b/dat/Sailfish-Scanner.spec deleted file mode 100644 index 6e61b0e..0000000 --- a/dat/Sailfish-Scanner.spec +++ /dev/null @@ -1,72 +0,0 @@ -Name: scanner - -Summary: Image Cropping Tool -Version: 0.0.1 -Release: 1 -Group: Applications/Internet -License: BSD -Url: https://github.com/dasimmet/sailfish-scanner -Source0: %{name}-%{version}.tar.bz2 -BuildRequires: pkgconfig(Qt5Core) -BuildRequires: pkgconfig(Qt5Qml) -BuildRequires: pkgconfig(Qt5Gui) -BuildRequires: pkgconfig(Qt5Quick) -BuildRequires: pkgconfig(qt5embedwidget) >= 1.9.4 - -Requires: sailfishsilica-qt5 >= 0.11.8 -Requires: jolla-ambient >= 0.3.24 -Requires: pyotherside-qml-plugin-python3-qt5 -Requires: python3-base -Requires: sailfish-components-media-qt5 - -%description -Sailfish Web Browser - -%prep -%setup -q -n %{name}-%{version} - -# >> setup -# << setup - -%build -# >> build pre -# << build pre - -%qmake5 - -make %{?jobs:-j%jobs} - -# >> build post -# << build post - -%install -rm -rf %{buildroot} -# >> install pre -# << install pre -%qmake5_install -chmod +x %{buildroot}/%{_oneshotdir}/* - -# >> install post -# << install post - -%post -# >> post -/usr/bin/update-desktop-database -q - -# Upgrade, count is 2 or higher (depending on the number of versions installed) -if [ "$1" -ge 2 ]; then -%{_bindir}/add-oneshot --user --now cleanup-browser-startup-cache -fi -# << post - -%files -%defattr(-,root,root,-) -# >> files -%{_bindir}/%{name} -%{_datadir}/applications/%{name}.desktop -%{_datadir}/applications/open-url.desktop -%{_datadir}/%{name}/* -%{_datadir}/translations/sailfish-browser_eng_en.qm -%{_datadir}/dbus-1/services/*.service -%{_oneshotdir}/cleanup-browser-startup-cache -# << files