I still hope we can integrate somehow Chum and OpenRepos. So, it would be sufficient to get packages submitted to Chum and get them reflected in OpenRepos stream automatically. Don’t have such hopes for Jolla Store integration (for some unknown reason).
Question 2: should work, as for any other regular SPEC.
Make sure you include them as dependencies. Compared to SDK, OBS has a smaller base image, so you get to check your dependencies better. I can see some ls outputs in your build log. According to that, the libs are missing
I don’t get it. libjpeg must be in the base image. I’m copying it FROM the base image That’s the point. I have to copy them into my app local lib dir to use them in the python lib I use. If I didn’t copy from the base image, I wouldn’t get this build into harbour. It’s a kind of ‘hack’, but it gets the app:
If you add as BuildRequires and then use the same copy trick as you have already. As BuildRequires is different from Requires, Harbour is no problem. Just don’t assume that JPEG is by default in the base image.
Ok, I’m not sure how I do that with system libs since I’ve only ever used BuildRequires with Qt dependencies.
The assumption that libjpeg is in the base image comes from the sailfish os documentation about provided libraries. However, I explicitly copy a specific version. That’s a 3.4 thing, for sure, and generally frowned upon. But it was also the only way I found to get these apps into the jolla store (and good exercise).
No problem. To find “good” dependcy, search for corresponding lib. In case of JPEG, package is libjpeg-turbo-devel. To see what it provides, run
$ sb2 -t SailfishOS-4.1.0.24-aarch64 -m sdk-install -R zypper info --provides libjpeg-turbo-devel
Loading repository data...
Reading installed packages...
Information for package libjpeg-turbo-devel:
--------------------------------------------
Repository : jolla
Name : libjpeg-turbo-devel
Version : 2.0.4+git1-1.2.2.jolla
Arch : aarch64
Vendor : meego
Installed Size : 41.9 KiB
Installed : No
Status : not installed
Source package : libjpeg-turbo-2.0.4+git1-1.2.2.jolla.src
Summary : Development tools for programs which will use the libjpeg library
Description :
The libjpeg-devel package includes the header files and documentation
necessary for developing programs which will manipulate JPEG files using
the libjpeg library.
If you are going to develop programs which will manipulate JPEG images,
you should install libjpeg-devel. You'll also need to have the libjpeg
package installed.
Provides : [5]
libjpeg-devel
libjpeg-turbo-devel = 2.0.4+git1-1.2.2.jolla
libjpeg-turbo-devel(aarch-64) = 2.0.4+git1-1.2.2.jolla
pkgconfig(libjpeg) = 2.0.4
pkgconfig(libturbojpeg) = 2.0.4
Notice, that it provides pkgconfig(libjpeg). So, add in your SPEC:
EDIT: that breaks builds in the SDK: I’m assuming you’re doing something like docker or SSH into the virtual? I’m ‘just’ using the SDK with virtualbox so I’m not sure what the best way to go is.
In SDK (will work for OBS also), you can zypper search libtiff for instance. It will give you this :
Loading repository data...
Reading installed packages...
S | Name | Summary | Type
--+---------------------+-------------------------------------------------------------------+-----------
| libtiff | Library of functions for manipulating TIFF format image files | package
| libtiff | Library of functions for manipulating TIFF format image files | srcpackage
| libtiff-debuginfo | Debug information for package libtiff | package
| libtiff-debugsource | Debug sources for package libtiff | package
| libtiff-devel | Development tools for programs which will use the libtiff library | package
| libtiff-doc | Documentation for libtiff | package
| libtiff-tools | Command-line utility programs for manipulating TIFF files | package
I had trid zypper info --provides libtiff without devel. that turned out to be the wrong avenue. adding -devel did it (pkgconfig(libtiff-4)). Thanks!
EDIT: So, adding BuildRequires for the libraries doesn’t help with
# >> install post
install -D -t %{buildroot}/%{_datadir}/%{name}/lib/
%{_libdir}/libjpeg.so.62
%{_libdir}/libopenjp2.so.7
%{_libdir}/libtiff.so.5
%{_libdir}/libfreetype.so.6
%{_libdir}/libwebpdemux.so.2
%{_libdir}/libwebpmux.so.3
%{_libdir}/libwebp.so.7
# << install post
Ive edited the first post to add links to our new documentation. For devs not used to OBS, there is the Getting Started document, and for us maintainers, we have a list of checks for submitted packages, s its probably worth devs being familiar with them.
Just updated mine I’d still recomend the people install from the Jolla store, though. That’s my priority in testing as I build. Chum will probably be my ‘bleeding edge’ (cough) code in future. That is to say, testing.
There are also some subtle and not so subtle differences between just building in the sdk, tagging in github, uploading to harbour and ‘semi-automated’ builds. I’m not so sure yet.
I also have some more complicated projects which I’ve been ‘faking’ in a sense. For instance, Imageworks has included the PIL library. I’ve just pushed binary library depends (the cpython stuff) into an application library context. I should be building those. …