Changed readme, no rsync anymore, removes specfile

master
Tobi Sim 2015-03-05 16:12:47 +01:00
parent 145417c0d7
commit 3c37f16c0d
3 changed files with 17 additions and 94 deletions

View File

@ -1,6 +1,6 @@
Appname:=$(shell cat appname.txt) Appname:=$(shell cat appname.txt)
prefix:=/usr prefix:=/usr
temp:=/tmp/fpm 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;)
@ -32,30 +32,21 @@ build-tmp:
rpm-virt: rpm-virt:
cd $(temp);fpm -f -s dir -t rpm $(dependencies) -p $(CURDIR)/$(rpmname) -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: rpm-jolla:
cd $(temp);fpm -f -s dir -t rpm $(dependencies) -p $(CURDIR)/$(rpmname) -n $(Appname) -a $(arch) --prefix / * cd $(temp);fpm -f -s dir -t rpm $(dependencies) -p $(CURDIR)/$(rpmname) -n $(Appname) -a $(arch) --prefix / *
send-virt: send-virt:
rsync -vrp --rsh='ssh -p2223 -i $(sdkpath)/vmshare/ssh/private_keys/SailfishOS_Emulator/root' ./$(rpmname) root@localhost:/tmp 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)
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: send-jolla-wifi:
rsync -vrp ./$(rpmname) root@$(jolla_wifi_ip):/tmp cat ./$(rpmname) | ssh root@$(jolla_wifi_ip) cat ">>" /tmp/$(rpmname) "&&" pkcon install-local -y /tmp/$(rpmname) "&&" rm /tmp/$(rpmname)
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: jolla_wifi_ip:=192.168.1.1
send-jolla-ap: send-jolla-ap:
rsync -vrp ./$(rpmname) root@$(jolla_wifi_ip):/tmp cat ./$(rpmname) | ssh root@$(jolla_wifi_ip) cat ">>" /tmp/$(rpmname) "&&" pkcon install-local -y /tmp/$(rpmname) "&&" rm /tmp/$(rpmname)
ssh root@$(jolla_wifi_ip) pkcon install-local -y /tmp/$(rpmname) "&&" rm /tmp/$(rpmname)
send-jolla: arch:=noarch
send-jolla: send-jolla:
rsync -vrp ./$(Appname)-$(arch).rpm root@$(jolla_usb_ip):/tmp cat ./$(rpmname) | ssh root@$(jolla_usb_ip) cat ">>" /tmp/$(rpmname) "&&" pkcon install-local -y /tmp/$(rpmname) "&&" rm /tmp/$(rpmname)
ssh root@$(jolla_usb_ip) pkcon install-local -y /tmp/$(Appname)-$(arch).rpm "&&" rm /tmp/$(Appname)-$(arch).rpm
clean: clean:
rm -rf $(temp) rm -rf $(temp)

20
README
View File

@ -1,32 +1,36 @@
Sailfish Python 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 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 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 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: 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 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" 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. 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. 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 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. 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" ./renamep.py "my-new-appname"

View File

@ -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