Bundling libraries in Maemo packages for Ovi store
Contents |
Introduction
When submitting packages to the Ovi store, they cannot depend on libraries or other content from other repositories, only the packages found in the official firmware. If you need such libraries, you will have to bundle them with your project in the following manner (in this example we'll use libvorbisidec1 package from Extras):
Acquire the necessary library files
You can either build them yourself in scratchbox, or simply download them from their repository
Make sure that you get the right architecture binaries (i.e. ARM for the Maemo target or X86 for the Simulator or Desktop builds)
Copy to project
After extracting the files from the package, copy them to a directory under your project, for example lib
Install folder
Declare the lib folder as an installable in your .pro file:
myproject.pro
...
maemo5 {
vorbislibs.path = /opt/myproject/lib
vorbislibs.files = lib/*
INSTALLS += vorbislibs
}
...
Define library path
The previous step will install the libs, but the OS will not find them upon launching the executable so the Exec line in the myproject.desktop file (under Other files in your project) needs to be altered to temporarily reference this library path.
Other files/myproject.desktop
[Desktop Entry] Encoding=UTF-8 Version=1.0 Type=Application Terminal=false Name=MyProject Exec=LD_LIBRARY_PATH=/opt/myproject/lib /opt/usr/bin/myproject Icon=myproject X-Window-Icon= X-HildonDesk-ShowInToolbar=true X-Osso-Type=application/x-executable
After this, your package will be build with the lib included and used by your package. Please note that you will have to fulfill any 3rd party license requirements of the included content or libraries yourself.


