openSUSE:Packaging Typelibs
A good amount of libraries, mostly from the GNOME Stack, ship a .typelib
file. This .typelib
interfaces between various programming languages (seed, python, vala) and the library.
Just like shared libraries, they are versioned and can potentially require to be installed in multiple versions.
Naming convention
The package name follows the convention typelib-<GIVersion>-<TypeLibName>-<TypeLibVersion>
, where dots (.) are replaced with underscores (_), where:
typelib
- is a literal, as an identifier of the package type.
<GIVersion>
- is the current gobject introspection version is 1.0, so 1_0
<TypeLibName>
- is the name of the actual binding, Case sensitive
<TypeLibVersion>
- is the version of the binding
All these elements can be taken out of the filename. For example
/usr/lib/girepository-1.0/Memphis-0.2.typelib
results in the package name typelib-1_0-Memphis-0_2
.
BuildRequires
When building such packages, make sure that the spec file contains BuildRequires: gobject-introspection
, as this triggers the installation of an automatic dependency scanner in plus. As a result, the typelib-*
package automatically requires its libraries and possibly other typelib-packages.