made the Makefile add arch-specific python Modules

master
Tobi Sim 2015-03-08 18:50:19 +01:00
parent 234ad9d52a
commit 5534dcb918
2 changed files with 6 additions and 7 deletions

View File

@ -4,7 +4,7 @@ temp:=/tmp/fpm-jolla
builddir:=./build builddir:=./build
sdkpath:=$(HOME)/SailfishOS sdkpath:=$(HOME)/SailfishOS
dependencies=$(shell for file in `cat dependencies.txt`;do echo "-d "$${file};done;) dependencies=$(shell for file in `cat dependencies.txt`;do echo "-d "$${file};done;)
arch:=noarch arch:=armv7hl
rpmname:=$(Appname)-$(arch).rpm rpmname:=$(Appname)-$(arch).rpm
jolla_usb_ip:=192.168.2.15 jolla_usb_ip:=192.168.2.15
jolla_wifi_ip:=Jolla jolla_wifi_ip:=Jolla
@ -21,12 +21,11 @@ make-virt: build-tmp rpm-virt send-virt
build-tmp: build-tmp:
rm -rf $(temp) rm -rf $(temp)
mkdir -p $(temp)/usr/share/applications mkdir -p $(temp)/usr/share/applications
mkdir -p $(temp)/usr/share/$(Appname)/src mkdir -p $(temp)/usr/share/$(Appname)/src/pyPackages
mkdir -p $(temp)/usr/share/$(Appname)/src
mkdir -p $(temp)/usr/bin mkdir -p $(temp)/usr/bin
cp -ar ./qml $(temp)/usr/share/$(Appname) cp -ar ./qml $(temp)/usr/share/$(Appname)
cp -ar ./src/*.py $(temp)/usr/share/$(Appname)/src 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/ cp ./dat/$(Appname).desktop $(temp)/usr/share/applications/
install -m 755 ./dat/$(Appname).sh $(temp)/usr/bin/$(Appname) install -m 755 ./dat/$(Appname).sh $(temp)/usr/bin/$(Appname)

View File

@ -29,9 +29,9 @@ builds your package, and installs it on your jolla phone, considering your devel
## 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. 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. all python Modules in pyPackages (suffixed correctly) 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. 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: ## Renaming your App:
`/renamep.py "my-new-appname"` `/renamep.py "my-new-appname"`