[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] Install API XML desc to a standard location



From: "Daniel P. Berrange" <berrange redhat com>

Language bindings may well want to use the libvirt-api.xml and
libvirt-qemu-api.xml files to either auto-generate themselves,
or sanity check the manually written bindings for completeness.
Currently these XML files are not installed as standard, merely
ending up as a %doc file in the RPM.

This changes them to be installed into $prefix/share/libvirt/apis/
The *-refs.xml files are not installed, since those are only
useful during generation of the online API doc files.

The pkg-config file is enhanced so that you cann query the install
location of the API files. eg

  # pkg-config --variable=libvirt_qemu_api libvirt
  /home/berrange/builder/i686-pc-mingw32/sys-root/mingw/share/libvirt/libvirt-qemu-api.xml

* docs/Makefile.am: Install libvirt-api.xml & libvirt-qemu-api.xml
* libvirt.pc.in: Add vars for querying API install location
* libvirt.spec.in, mingw32-libvirt.spec.in: Include API XML files
---
 docs/Makefile.am        |    3 +++
 libvirt.pc.in           |    3 +++
 libvirt.spec.in         |    4 ++++
 mingw32-libvirt.spec.in |    4 ++++
 4 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/docs/Makefile.am b/docs/Makefile.am
index 5644fe2..2bef982 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -85,6 +85,9 @@ qemu_xml = \
   libvirt-qemu-api.xml \
   libvirt-qemu-refs.xml
 
+apidir = $(pkgdatadir)/api
+api_DATA = libvirt-api.xml libvirt-qemu-api.xml
+
 fig = \
   libvirt-net-logical.fig \
   libvirt-net-physical.fig \
diff --git a/libvirt.pc.in b/libvirt.pc.in
index d7a5e55..c64a7ca 100644
--- a/libvirt.pc.in
+++ b/libvirt.pc.in
@@ -3,6 +3,9 @@ exec_prefix= exec_prefix@
 libdir= libdir@
 includedir= includedir@
 
+libvirt_api= datadir@/libvirt/libvirt-api.xml
+libvirt_qemu_api= datadir@/libvirt/libvirt-qemu-api.xml
+
 Name: libvirt
 Version: @VERSION@
 Description: libvirt library
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 62b0ed4..d04fba9 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -1249,6 +1249,10 @@ rm -f $RPM_BUILD_ROOT%{_sysconfdir}/sysctl.d/libvirtd
 %doc %{_datadir}/gtk-doc/html/libvirt/*.png
 %doc %{_datadir}/gtk-doc/html/libvirt/*.css
 
+%dir %{_datadir}/libvirt/apis/
+%{_datadir}/libvirt/apis/libvirt-api.xml
+%{_datadir}/libvirt/apis/libvirt-qemu-api.xml
+
 %doc docs/*.html docs/html docs/*.gif
 %doc docs/libvirt-api.xml
 %doc examples/hellolibvirt
diff --git a/mingw32-libvirt.spec.in b/mingw32-libvirt.spec.in
index 7937e22..659d649 100644
--- a/mingw32-libvirt.spec.in
+++ b/mingw32-libvirt.spec.in
@@ -156,6 +156,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_mingw32_libdir}/libvirt-qemu.dll.a
 %{_mingw32_libdir}/libvirt-qemu.la
 
+%dir %{_mingw32_datadir}/libvirt/apis/
+%{_mingw32_datadir}/libvirt/apis/libvirt-api.xml
+%{_mingw32_datadir}/libvirt/apis/libvirt-qemu-api.xml
+
 %dir %{_mingw32_datadir}/libvirt/
 %dir %{_mingw32_datadir}/libvirt/schemas/
 %{_mingw32_datadir}/libvirt/schemas/basictypes.rng
-- 
1.7.7.6


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]