From 5534dcb9186d42b9a224faaf059caafd08b83600 Mon Sep 17 00:00:00 2001 From: Tobi Sim Date: Sun, 8 Mar 2015 18:50:19 +0100 Subject: [PATCH] made the Makefile add arch-specific python Modules --- Makefile | 7 +++---- README.md | 6 +++--- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 186af37..de5a1a5 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ temp:=/tmp/fpm-jolla builddir:=./build sdkpath:=$(HOME)/SailfishOS dependencies=$(shell for file in `cat dependencies.txt`;do echo "-d "$${file};done;) -arch:=noarch +arch:=armv7hl rpmname:=$(Appname)-$(arch).rpm jolla_usb_ip:=192.168.2.15 jolla_wifi_ip:=Jolla @@ -21,12 +21,11 @@ make-virt: build-tmp rpm-virt send-virt build-tmp: rm -rf $(temp) mkdir -p $(temp)/usr/share/applications - mkdir -p $(temp)/usr/share/$(Appname)/src - mkdir -p $(temp)/usr/share/$(Appname)/src + mkdir -p $(temp)/usr/share/$(Appname)/src/pyPackages mkdir -p $(temp)/usr/bin cp -ar ./qml $(temp)/usr/share/$(Appname) cp -ar ./src/*.py $(temp)/usr/share/$(Appname)/src - cp -ar ./pyPackages $(temp)/usr/share/$(Appname)/src + cp -ar ./pyPackages/*$(arch) $(temp)/usr/share/$(Appname)/src/pyPackages cp ./dat/$(Appname).desktop $(temp)/usr/share/applications/ install -m 755 ./dat/$(Appname).sh $(temp)/usr/bin/$(Appname) diff --git a/README.md b/README.md index fc16838..14db51e 100644 --- a/README.md +++ b/README.md @@ -29,9 +29,9 @@ builds your package, and installs it on your jolla phone, considering your devel ## 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: -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. +##Adding python Modules: +all python Modules in pyPackages (suffixed correctly) are included in the package. +I like to keep both an armv7l and a x86 version in pyPackages , and package the one with the corresponding $(arch)-suffix at packaging. Select the package version within the qml code. I had success using pip wheel to build these packages directly on the jolla phone(armv7hl)/sailfish emulator(x86) and unpacking them to pyPackages. As an example, pillow (Python Imaging Library) is included in the repo. ## Renaming your App: `/renamep.py "my-new-appname"`