[Libguestfs] Packaging GObject for Fedora (was: [rjones at fedoraproject.org: [libguestfs] New upstream version 1.15.19.])

Daniel P. Berrange berrange at redhat.com
Mon Jan 23 10:57:50 UTC 2012


On Sun, Jan 22, 2012 at 03:59:28PM +0000, Richard W.M. Jones wrote:
> These are the changes I made to the spec file related to gobject
> bindings and gobject introspection.  TBH I wasn't sure how to properly
> package this.
> @@ -961,6 +1002,19 @@ rm -rf $RPM_BUILD_ROOT
>  %{_mandir}/man3/guestfs-erlang.3*
>  
>  
> +%files gobject
> +%defattr(-,root,root,-)
> +%{_libdir}/libguestfs-gobject-1.0.so.0*
> +
> +
> +%files gobject-devel
> +%defattr(-,root,root,-)
> +%{_libdir}/libguestfs-gobject-1.0.so
> +%{_includedir}/guestfs-gobject.h
> +%{_libdir}/girepository-1.0/Guestfs-1.0.typelib
> +%{_datadir}/gir-1.0/Guestfs-1.0.gir


You just want to move the 'typelib' file to the main gobject package - this
is a runtime file. ".typelib" is to ".so.0.N" files, as ".gir" is to ".h"
files.


Incidentally, if you're going to put version numbers in the gobject binary
and typelib files, then you'd normally expect to also put the header file
in a correspondingly versioned directory. ie I'd expect

  %{_includedir}/guestfs-gobject-1.0/guetsfs-gobject.h

The pkg-config file would also be named guestfs-gobject-1.0.pc, and set

-I/usr/include/guestfs-gobject-1.0 -lguest-gobject-1.0

The idea being that this is 100% parallel installable with -2.0 or -3.0
versions, should an ABI change be needed

Oh we're missing a pkg-config file for this...

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the Libguestfs mailing list