how to build sailfish-office
I would like to contribute some features to sailfish-office (the pdf viewer plugin). So here is how far I progressed on the way, this might apply to eg the sailfish-browser as well
Find the source https://github.com/sailfishos/sailfish-office
fork/clone it
create a checkout (of your fork)
git clone git@github.com:sailfishos/sailfish-office.git
open some (new/placeholder) project in the sailfish IDE
start the SDK
ssh into the SDK login in to the mer sdk as user "mersdk":
ssh -p 2222 -i ~/SailfishOS/vmshare/ssh/private_keys/engine/mersdk mersdk@localhost
go to the checkout dir (your home dir is mounted in ~/share/)
cd ~/share/path/to/the/code/sailfish-office/
try compiling an rpm
For the emulator:
mb2 -t SailfishOS-i486 -s rpm/sailfish-office.spec build
For your device:
mb2 -t SailfishOS-armv7hl -s rpm/sailfish-office.spec build
Notice missing dependencies
[mersdk@SailfishSDK sailfish-office]$ mb2 -t SailfishOS-i486 -s rpm/sailfish-office.spec buildPackage 'libjollasignonuiservice-qt5-devel' not found.Building target platforms: i486-meego-linux-gnu Building for target i486-meego-linux-gnu error: Failed build dependencies: libqt5sparql-devel is needed by sailfish-office-1.1.5-1.i486 poppler-qt5-devel is needed by sailfish-office-1.1.5-1.i486 poppler-qt5 is needed by sailfish-office-1.1.5-1.i486 poppler-devel is needed by sailfish-office-1.1.5-1.i486 cmake is needed by sailfish-office-1.1.5-1.i486libjollasignonuiservice-qt5-devel is needed by sailfish-office-1.1.5-1.i486
install dependencies
sb2 -t SailfishOS-i486 -m sdk-install -R zypper install cmake poppler-qt5-devel libqt5sparql-devel
compile rpm
mb2 -t SailfishOS-i486 -s rpm/sailfish-office.spec build
- copy to Emulator Start the Emulator VM from the IDE. I couldn't manage to use scp or share a folder to the VM, so I use a http server and curl
put the rpm (you can find it in subdir RPMS of your sourcedir) on some webserver (python -m SimpleHTTPServer 8081)
ssh to the Emulator
ssh -p 2223 -i ~/SailfishOS/vmshare/ssh/private_keys/SailfishOS_Emulator/root root@localhostDownload the package:
curl your_LAN_ip:8081/sailfish-office-1.1.5-1.i486.rpm >> sailfish-office.rpm
[root@SailfishEmul nemo]# rpm -i sailfish-office.rpm error: Failed dependencies: calligra-components >= 2.7.9+git4 is needed by sailfish-office-1.1.5-1.i486 calligra-filters >= 2.7.9+git4 is needed by sailfish-office-1.1.5-1.i486 libpoppler-qt5.so.1 is needed by sailfish-office-1.1.5-1.i486 sailfish-office-all-translations is needed by sailfish-office-1.1.5-1.i486
pkcon install zypper
zypper in poppler-qt5
Remaining Problems - Need help from Jolla
[root@SailfishEmul nemo]# rpm -i -f sailfish-office.rpm error: Failed dependencies: calligra-components >= 2.7.9+git4 is needed by sailfish-office-1.1.5-1.i486 calligra-filters >= 2.7.9+git4 is needed by sailfish-office-1.1.5-1.i486 sailfish-office-all-translations is needed by sailfish-office-1.1.5-1.i486
Missing Calligra packages in emulator
[root@SailfishEmul nemo]# zypper se calligra Loading repository data... Reading installed packages... S | Name | Summary | Type --+------------------------------------------+--------------------------------------------------------+----------- | calligra-extra-cmake-modules | Extra CMake modules for Calligra | package | calligra-extra-cmake-modules | Extra CMake modules for Calligra | srcpackage | calligra-extra-cmake-modules-debugsource | Debug sources for package calligra-extra-cmake-modules | package
So I propably need to add some extra repositories to the emulator? Or maybe the calligra packages need to be added to the repository?
Translations rpm
How do I build the translations rpm? Comment it out/ignore it using rpm --nodeps?
Manuall compilation
mkdir build cd build sb2 -t SailfishOS-i486 cmake ../sailfish-office/
Credits
How to install packages:
https://together.jolla.com/question/22379/porting-sdl-20-game-to-sailfish/
Todo
- test rpm on emulator
- create arm packages to test on device
- use open build service to create packages
- setup an openrepo for the build from open build service ?
- cleanup of this wannabe guide
Can anyone help? @Jolla could someone provide the missing package? I will update this entry as I/we progress
Great initiative, thanks. Personally i want to see support for password protected files. :) Perhaps you could also post it on IRC and mailing list for better dev. visibility?
anandrkris ( 2015-01-27 04:00:59 +0200 )edit@simonschmeisser - That's strange since we have received couple of contributions from community so far. I quicly checked the code and sounds like this dependency is not needed at all, I'll look into in later, but in the meantime you can be currently version but removing the references to it:
- In the spec file inside rpm folder, two references at top (buildrequires and Requires)
- in the CmakeList file, 3 references
- the include inside sailfishapplication.cpp
VDVsx ( 2015-02-07 16:02:17 +0200 )edit@VDVsx: Same problem here. sailfish-office definitely depends on org.kde.calligra module, but it is unclear how to install this dependency. Could you please provide some pointers how to install calligra module?
enikulenkov ( 2015-10-23 03:28:42 +0200 )edit