We have moved to a new Sailfish OS Forum. Please start new discussions there.

Revision history [back]

click to hide/show revision 1
initial version

posted 2015-01-26 18:33:00 +0200

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

  1. Find the source https://github.com/sailfishos/sailfish-office

  2. fork/clone it

  3. create a checkout (of your fork)

     git clone git@github.com:sailfishos/sailfish-office.git 
  4. open some (new/placeholder) project in the sailfish IDE

  5. start the SDK

  6. 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

  7. go to the checkout dir (your home dir is mounted in ~/share/)

    cd ~/share/path/to/the/code/sailfish-office/

  8. 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 
  9. Notice missing dependencies

[mersdk@SailfishSDK sailfish-office]$ mb2 -t SailfishOS-i486 -s rpm/sailfish-office.spec build
Package '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.i486
        libjollasignonuiservice-qt5-devel is needed by sailfish-office-1.1.5-1.i486

STOP following here

  1. install dependencies

    sudo zypper in  libqt5sparql-devel poppler-qt5-devel poppler-devel cmake 
  2. fail

There is no package providing libjollasignonuiservice-qt5-devel

Installing the other packages does not in fact make mb2 happy, ie

[mersdk@SailfishSDK sailfish-office]$ mb2 -t SailfishOS-i486 -s rpm/sailfish-office.spec build
Package '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.i486
        libjollasignonuiservice-qt5-devel is needed by sailfish-office-1.1.5-1.i486

remains as the output.

Manuall compilation:

have a look at rpm/sailfish-office.spec:

BuildRequires: pkgconfig(Qt5Quick)
BuildRequires: pkgconfig(Qt5Widgets)
#BuildRequires: pkgconfig(Qt5WebKit)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: libqt5sparql-devel
BuildRequires: poppler-qt5-devel poppler-qt5 poppler-devel poppler
BuildRequires: mapplauncherd-qt5-devel
BuildRequires: cmake
BuildRequires: qt5-qttools-linguist
BuildRequires: libjollasignonuiservice-qt5-devel

so we need to install all of this (additionally to what was installed above)

sudo zypper in qt5-qtdeclarative-qtquick-devel qt5-qtdbus-devel qt5-qttools-linguist mapplauncherd-qt5-devel
however, again, libjollasignonuiservice-qt5-devel is actually not in the repo, so we cant install it
mkdir build
cd build
cmake ../sailfish-office/

will fail with

[mersdk@SailfishSDK build]$ cmake ../sailfish-office/
-- The C compiler identification is GNU 4.6.4
-- The CXX compiler identification is GNU 4.6.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found QtSparql: /usr/include/Qt5Sparql  
-- Found Booster: /usr/include/mdeclarativecache5  
-- Could NOT find libjollasignonuiservice (missing:  JOLLASIGNONUISERVICE_INCLUDE_DIR JOLLASIGNONUISERVICE_LIBRARY) 
-- Found Poppler: /usr/include/poppler/cpp  
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
JOLLASIGNONUISERVICE_INCLUDE_DIR (ADVANCED)
   used as include directory in directory /home/mersdk/share/proggn/jolla/sailfish-office
   used as include directory in directory /home/mersdk/share/proggn/jolla/sailfish-office/plugin
   used as include directory in directory /home/mersdk/share/proggn/jolla/sailfish-office/pdf
JOLLASIGNONUISERVICE_LIBRARY (ADVANCED)
    linked by target "sailfish-office" in directory /home/mersdk/share/proggn/jolla/sailfish-office

-- Configuring incomplete, errors occurred!

Todo

  1. create arm packages to test on device
  2. use open build service to create packages
  3. setup an openrepo for the build from open build service ?
  4. cleanup of this wannabe guide

Can anyone help? @Jolla could someone provide the missing package? I will update this entry as I/we progress

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

  1. Find the source https://github.com/sailfishos/sailfish-office

  2. fork/clone it

  3. create a checkout (of your fork)

     git clone git@github.com:sailfishos/sailfish-office.git 
  4. open some (new/placeholder) project in the sailfish IDE

  5. start the SDK

  6. 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

  7. go to the checkout dir (your home dir is mounted in ~/share/)

    cd ~/share/path/to/the/code/sailfish-office/

  8. 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 
  9. Notice missing dependencies

[mersdk@SailfishSDK sailfish-office]$ mb2 -t SailfishOS-i486 -s rpm/sailfish-office.spec build
Package '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.i486
        libjollasignonuiservice-qt5-devel is needed by sailfish-office-1.1.5-1.i486

STOP following here

  1. install dependencies

    sudo zypper in  libqt5sparql-devel poppler-qt5-devel poppler-devel cmake 
  2. fail

There is no package providing libjollasignonuiservice-qt5-devel

Installing the other packages does not in fact make mb2 happy, ie

[mersdk@SailfishSDK sailfish-office]$ mb2 -t SailfishOS-i486 -s rpm/sailfish-office.spec build
Package '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.i486
        libjollasignonuiservice-qt5-devel is needed by sailfish-office-1.1.5-1.i486

remains as the output.

Manuall compilation:

have a look at rpm/sailfish-office.spec:

BuildRequires: pkgconfig(Qt5Quick)
BuildRequires: pkgconfig(Qt5Widgets)
#BuildRequires: pkgconfig(Qt5WebKit)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: libqt5sparql-devel
BuildRequires: poppler-qt5-devel poppler-qt5 poppler-devel poppler
BuildRequires: mapplauncherd-qt5-devel
BuildRequires: cmake
BuildRequires: qt5-qttools-linguist
BuildRequires: libjollasignonuiservice-qt5-devel

so we need to install all of this (additionally to what was installed above)

sudo zypper in qt5-qtdeclarative-qtquick-devel qt5-qtdbus-devel qt5-qttools-linguist mapplauncherd-qt5-devel
however, again, libjollasignonuiservice-qt5-devel is actually not in the repo, so we cant install it
mkdir build
cd build
cmake ../sailfish-office/

will fail with

[mersdk@SailfishSDK build]$ cmake ../sailfish-office/
-- The C compiler identification is GNU 4.6.4
-- The CXX compiler identification is GNU 4.6.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found QtSparql: /usr/include/Qt5Sparql  
-- Found Booster: /usr/include/mdeclarativecache5  
-- Could NOT find libjollasignonuiservice (missing:  JOLLASIGNONUISERVICE_INCLUDE_DIR JOLLASIGNONUISERVICE_LIBRARY) 
-- Found Poppler: /usr/include/poppler/cpp  
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
JOLLASIGNONUISERVICE_INCLUDE_DIR (ADVANCED)
   used as include directory in directory /home/mersdk/share/proggn/jolla/sailfish-office
   used as include directory in directory /home/mersdk/share/proggn/jolla/sailfish-office/plugin
   used as include directory in directory /home/mersdk/share/proggn/jolla/sailfish-office/pdf
JOLLASIGNONUISERVICE_LIBRARY (ADVANCED)
    linked by target "sailfish-office" in directory /home/mersdk/share/proggn/jolla/sailfish-office

-- Configuring incomplete, errors occurred!

Credits

https://together.jolla.com/question/7793/nemo-qml-plugin-alarms-qt5-binary-packages-missing-in-sdk-how-to-compile-from-source/

Todo

  1. create arm packages to test on device
  2. use open build service to create packages
  3. setup an openrepo for the build from open build service ?
  4. cleanup of this wannabe guide

Can anyone help? @Jolla could someone provide the missing package? I will update this entry as I/we progress

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

  1. Find the source https://github.com/sailfishos/sailfish-office

  2. fork/clone it

  3. create a checkout (of your fork)

     git clone git@github.com:sailfishos/sailfish-office.git 
  4. open some (new/placeholder) project in the sailfish IDE

  5. start the SDK

  6. 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

  7. go to the checkout dir (your home dir is mounted in ~/share/)

    cd ~/share/path/to/the/code/sailfish-office/

  8. 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 
  9. Notice missing dependencies

[mersdk@SailfishSDK sailfish-office]$ mb2 -t SailfishOS-i486 -s rpm/sailfish-office.spec build
Package '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.i486
        libjollasignonuiservice-qt5-devel is needed by sailfish-office-1.1.5-1.i486

STOP following here

  1. install dependencies

    sudo sb2 -t SailfishOS-i486 -m sdk-install -R zypper in  install cmake poppler-qt5-devel libqt5sparql-devel poppler-qt5-devel poppler-devel cmake libjollasignonuiservice-qt5-devel
  2. fail

There is no package providing libjollasignonuiservice-qt5-devel

Installing the other packages does not in fact make mb2 happy, ie

[mersdk@SailfishSDK sailfish-office]$ mb2 -t SailfishOS-i486 -s rpm/sailfish-office.spec build
Package '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.i486
        libjollasignonuiservice-qt5-devel is needed by sailfish-office-1.1.5-1.i486

remains

Installing the required packages into the correct chroot (?) instead of the vm solves the dependencies as the output.intended.

Manuall compilation:

have a look at rpm/sailfish-office.spec:

BuildRequires: pkgconfig(Qt5Quick)
BuildRequires: pkgconfig(Qt5Widgets)
#BuildRequires: pkgconfig(Qt5WebKit)
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: libqt5sparql-devel
BuildRequires: poppler-qt5-devel poppler-qt5 poppler-devel poppler
BuildRequires: mapplauncherd-qt5-devel
BuildRequires: cmake
BuildRequires: qt5-qttools-linguist
BuildRequires: libjollasignonuiservice-qt5-devel

so we need to install all of this (additionally to what was installed above)

sudo zypper in qt5-qtdeclarative-qtquick-devel qt5-qtdbus-devel qt5-qttools-linguist mapplauncherd-qt5-devel
however, again, libjollasignonuiservice-qt5-devel is actually not in the repo, so we cant install it it

mkdir build
cd build
sb2 -t SailfishOS-i486 cmake ../sailfish-office/

will fail with

[mersdk@SailfishSDK build]$ sb2 -t SailfishOS-i486 cmake ../sailfish-office/
-- The C compiler identification is GNU 4.6.4
-- The CXX compiler identification is GNU 4.6.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found QtSparql: /usr/include/Qt5Sparql  
-- Found Booster: /usr/include/mdeclarativecache5  
-- Could NOT find libjollasignonuiservice (missing:  JOLLASIGNONUISERVICE_INCLUDE_DIR JOLLASIGNONUISERVICE_LIBRARY) 
-- Found Poppler: /usr/include/poppler/cpp  
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
JOLLASIGNONUISERVICE_INCLUDE_DIR (ADVANCED)
   used as include directory in directory /home/mersdk/share/proggn/jolla/sailfish-office
   used as include directory in directory /home/mersdk/share/proggn/jolla/sailfish-office/plugin
   used as include directory in directory /home/mersdk/share/proggn/jolla/sailfish-office/pdf
JOLLASIGNONUISERVICE_LIBRARY (ADVANCED)
    linked by target "sailfish-office" in directory /home/mersdk/share/proggn/jolla/sailfish-office

-- Configuring incomplete, errors occurred!
 

Credits

https://together.jolla.com/question/7793/nemo-qml-plugin-alarms-qt5-binary-packages-missing-in-sdk-how-to-compile-from-source/

How to install packages:

https://together.jolla.com/question/22379/porting-sdl-20-game-to-sailfish/

Todo

  1. create arm packages to test on device
  2. use open build service to create packages
  3. setup an openrepo for the build from open build service ?
  4. cleanup of this wannabe guide

Can anyone help? @Jolla could someone provide the missing package? I will update this entry as I/we progress

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

  1. Find the source https://github.com/sailfishos/sailfish-office

  2. fork/clone it

  3. create a checkout (of your fork)

     git clone git@github.com:sailfishos/sailfish-office.git 
  4. open some (new/placeholder) project in the sailfish IDE

  5. start the SDK

  6. 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

  7. go to the checkout dir (your home dir is mounted in ~/share/)

    cd ~/share/path/to/the/code/sailfish-office/

  8. 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 
  9. Notice missing dependencies

[mersdk@SailfishSDK sailfish-office]$ mb2 -t SailfishOS-i486 -s rpm/sailfish-office.spec build
Package 'libjollasignonuiservice-qt5-devel' not found.
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.i486
        libjollasignonuiservice-qt5-devel is needed by sailfish-office-1.1.5-1.i486

STOP following here

sailfish-office-1.1.5-1.i486
  1. install dependencies

    sb2 -t SailfishOS-i486 -m sdk-install -R zypper install cmake poppler-qt5-devel libqt5sparql-devel libjollasignonuiservice-qt5-devel
  2. faillibqt5sparql-devel

  3. compile rpm

There is no

mb2 -t SailfishOS-i486 -s rpm/sailfish-office.spec build
  1. 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@localhost
Download 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 on poppler-qt5
[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 providing libjollasignonuiservice-qt5-devel

Installing the other | calligra-extra-cmake-modules | Extra CMake modules for Calligra | srcpackage | calligra-extra-cmake-modules-debugsource | Debug sources for package calligra-extra-cmake-modules | package

[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

So I propably need to add some extra repositories to the emulator? Or maybe the calligra packages does not in fact make mb2 happy, ie

Installing the required packages into the correct chroot (?) instead of the vm solves the dependencies as intended.need to be added to the repository?

How do I build the translations rom? Comment it out/ignore it using rpm --nodeps?

Manuall compilation:

again, libjollasignonuiservice-qt5-devel is actually not in the repo, so we cant install it

mkdir build
cd build
sb2 -t SailfishOS-i486 cmake ../sailfish-office/

will fail with

[mersdk@SailfishSDK build]$ sb2 -t SailfishOS-i486 cmake ../sailfish-office/
-- The C compiler identification is GNU 4.6.4
-- The CXX compiler identification is GNU 4.6.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found QtSparql: /usr/include/Qt5Sparql  
-- Found Booster: /usr/include/mdeclarativecache5  
-- Could NOT find libjollasignonuiservice (missing:  JOLLASIGNONUISERVICE_INCLUDE_DIR JOLLASIGNONUISERVICE_LIBRARY) 
-- Found Poppler: /usr/include/poppler/cpp  
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
JOLLASIGNONUISERVICE_INCLUDE_DIR (ADVANCED)
   used as include directory in directory /home/mersdk/share/proggn/jolla/sailfish-office
   used as include directory in directory /home/mersdk/share/proggn/jolla/sailfish-office/plugin
   used as include directory in directory /home/mersdk/share/proggn/jolla/sailfish-office/pdf
JOLLASIGNONUISERVICE_LIBRARY (ADVANCED)
    linked by target "sailfish-office" in directory /home/mersdk/share/proggn/jolla/sailfish-office

-- Configuring incomplete, errors occurred!

Credits

https://together.jolla.com/question/7793/nemo-qml-plugin-alarms-qt5-binary-packages-missing-in-sdk-how-to-compile-from-source/

How to install packages:

https://together.jolla.com/question/22379/porting-sdl-20-game-to-sailfish/

Todo

  1. test rpm on emulator
  2. create arm packages to test on device
  3. use open build service to create packages
  4. setup an openrepo for the build from open build service ?
  5. cleanup of this wannabe guide

Can anyone help? @Jolla could someone provide the missing package? I will update this entry as I/we progress

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

  1. Find the source https://github.com/sailfishos/sailfish-office

  2. fork/clone it

  3. create a checkout (of your fork)

     git clone git@github.com:sailfishos/sailfish-office.git 
  4. open some (new/placeholder) project in the sailfish IDE

  5. start the SDK

  6. 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

  7. go to the checkout dir (your home dir is mounted in ~/share/)

    cd ~/share/path/to/the/code/sailfish-office/

  8. 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 
  9. Notice missing dependencies

[mersdk@SailfishSDK sailfish-office]$ mb2 -t SailfishOS-i486 -s rpm/sailfish-office.spec build
Package '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.i486
        libjollasignonuiservice-qt5-devel is needed by sailfish-office-1.1.5-1.i486 
  1. install dependencies

    sb2 -t SailfishOS-i486 -m sdk-install -R zypper install cmake poppler-qt5-devel libqt5sparql-devel
  2. compile rpm

mb2 -t SailfishOS-i486 -s rpm/sailfish-office.spec build
  1. 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@localhost
Download 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 on 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
[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

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 rom? rpm? Comment it out/ignore it using rpm --nodeps?

Manuall compilation:

compilation

mkdir build
cd build
sb2 -t SailfishOS-i486 cmake ../sailfish-office/

Credits

https://together.jolla.com/question/7793/nemo-qml-plugin-alarms-qt5-binary-packages-missing-in-sdk-how-to-compile-from-source/

How to install packages:

https://together.jolla.com/question/22379/porting-sdl-20-game-to-sailfish/

Todo

  1. test rpm on emulator
  2. create arm packages to test on device
  3. use open build service to create packages
  4. setup an openrepo for the build from open build service ?
  5. cleanup of this wannabe guide

Can anyone help? @Jolla could someone provide the missing package? I will update this entry as I/we progress

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

  1. Find the source https://github.com/sailfishos/sailfish-office

  2. fork/clone it

  3. create a checkout (of your fork)

     git clone git@github.com:sailfishos/sailfish-office.git 
  4. open some (new/placeholder) project in the sailfish IDE

  5. start the SDK

  6. 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

  7. go to the checkout dir (your home dir is mounted in ~/share/)

    cd ~/share/path/to/the/code/sailfish-office/

  8. 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 
  9. Notice missing dependencies

[mersdk@SailfishSDK sailfish-office]$ mb2 -t SailfishOS-i486 -s rpm/sailfish-office.spec build
Package '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.i486
        libjollasignonuiservice-qt5-devel is needed by sailfish-office-1.1.5-1.i486 
  1. install dependencies

    sb2 -t SailfishOS-i486 -m sdk-install -R zypper install cmake poppler-qt5-devel libqt5sparql-devel
  2. compile rpm

mb2 -t SailfishOS-i486 -s rpm/sailfish-office.spec build
  1. 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@localhost
Download 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

https://together.jolla.com/question/7793/nemo-qml-plugin-alarms-qt5-binary-packages-missing-in-sdk-how-to-compile-from-source/

How to install packages:

https://together.jolla.com/question/22379/porting-sdl-20-game-to-sailfish/

Todo

  1. test rpm on emulator
  2. create arm packages to test on device
  3. use open build service to create packages
  4. setup an openrepo for the build from open build service ?
  5. cleanup of this wannabe guide

Can anyone help? @Jolla could someone provide the missing package? I will update this entry as I/we progress