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

nemo-qml-plugin-alarms-qt5 binary packages missing in SDK (how to compile from source?)

asked 2013-12-31 18:18:04 +0200

epsilonijk gravatar image

updated 2013-12-31 19:37:56 +0200

Kontio gravatar image

Hiking forward through the SDK jungle, I came across the nemomobile alarms QML plugin (https://github.com/nemomobile/nemo-qml-plugin-alarms) which seems to be used on the device and might give me easy access to the timed server.

However, I could not install the package for the SDK targets (using the Sailfish OS tab in Creator). There seems to be only the source package in the repository:

[nemo@SailfishEmul ~]$ LANG=C pkcon search name alarms
Searching by name             [=========================]         
Waiting in queue              [=========================]         
Starting                      [=========================]         
Refreshing software list      [=========================]         
Querying                      [=========================]         
Available       nemo-qml-plugin-alarms-qt5-0.0.9-1.5.1.source   Alarms plugin for Nemo Mobile

There does not seem to be a rpmbuild in the SDK VM. What is the correct way to generate the binary RPMs?

edit retag flag offensive close delete

1 Answer

Sort by » oldest newest most voted
4

answered 2013-12-31 19:29:43 +0200

Kontio gravatar image

updated 2014-01-01 12:59:58 +0200

How to build a rpm by hand? You want to do that from mer sdk virtual machine, and not from emulator.

  1. Ensure you have the IDE open and a sailfish project open, so that the mer sdk vm is running.
  2. login in to the mer sdk as user "mersdk": ssh -p 2222 -i ~/SailfishOS/vmshare/ssh/private_keys/engine/mersdk mersdk@localhost
  3. mkdir alarm-tmp; cd alarm-tmp
  4. git clone https://github.com/nemomobile/nemo-qml-plugin-alarms.git
  5. cd nemo-qml-plugin-alarms
  6. mb2 -t SailfishOS-armv7hl -s rpm/nemo-qml-plugin-alarms-qt5.spec build for a arm rpm or mb2 -t SailfishOS-i486-x86 -s rpm/nemo-qml-plugin-alarms-qt5.spec build for an i486 (emulator) rpm
  7. if all went ok, you get an output where you can find your rpm: /home/mersdk/alarm-tmp/nemo-qml-plugin-alarms/RPMS/nemo-qml-plugin-alarms-qt5-0.0.0-1.i586.rpm

Happy Hacking :)

EDIT: it was asked how it can be done if src.rpm is downloaded with zypper si:

  1. Ensure you have the IDE open and a sailfish project open, so that the mer sdk vm is running.
  2. login in to the mer sdk as user "mersdk": ssh -p 2222 -i ~/SailfishOS/vmshare/ssh/private_keys/engine/mersdk mersdk@localhost
  3. sb2 -t SailfishOS-i486-x86 -m sdk-install -R zypper si nemo-qml-plugin-alarms
  4. mkdir alarm-tmp; cd alarm-tmp
  5. tar xvjf ../rpmbuild/SOURCES/nemo-qml-plugin-alarms-qt5-0.0.9.tar.bz2
  6. cd nemo-qml-plugin-alarms-qt5-0.0.9
  7. mb2 -t SailfishOS-i486-x86 -s ../../rpmbuild/SPECS/nemo-qml-plugin-alarms-qt5.spec build reps. mb2 -t SailfishOS-armv7hl -s ../../rpmbuild/SPECS/nemo-qml-plugin-alarms-qt5.spec build

NOTE: I would not use rpmbuild directly, mb2 does some wrapping around rpmbuild and sb2, to ensure all goes well. So I think this is the easier way. More about sb2:
https://wiki.merproject.org/wiki/Platform_SDK_and_SB2

edit flag offensive delete publish link more

Comments

Awesome, thanks! Will try that next year ;-)

epsilonijk ( 2014-01-01 00:26:47 +0200 )edit

And if I wanted to use the specific source RPM that is available in the repo? Would I zypper si that in the Mer SDK VM?

epsilonijk ( 2014-01-01 02:17:50 +0200 )edit

Thanks for all the patience and information! Great!

epsilonijk ( 2014-01-01 16:09:52 +0200 )edit

It seems, I cannot run both variants of mb2 build after each other. I got x86 libs included in the arm package...

epsilonijk ( 2014-01-04 04:25:51 +0200 )edit
1

I don't use mb2 that often, but seems it does not do a make clean. In that case I would do the following in between changing the arch: sb2 -t SailfishOS-armv7hl make distclean (if first arch was arm) resp. sb2 -t SailfishOS-i486-x86 make distclean, evt. replace distclean with clean

Kontio ( 2014-01-04 11:52:49 +0200 )edit
Login/Signup to Answer

Question tools

Follow
3 followers

Stats

Asked: 2013-12-31 18:18:04 +0200

Seen: 845 times

Last updated: Jan 01 '14