[gupnp/wip/phako/initable: 1/4] all: Bump API version




commit 3065367fc2d5cc23f66f13d030f25d3ad15f31c0
Author: Jens Georg <mail jensge org>
Date:   Sun Oct 24 16:49:12 2021 +0200

    all: Bump API version
    
    Reset ABI version, also bump project version

 ...np-binding-tool.xml => gupnp-binding-tool.xml.in} | 14 +++++++-------
 doc/meson.build                                      | 13 ++++++++++---
 examples/browse.js                                   |  2 +-
 examples/get-volume.js                               |  2 +-
 examples/get-volume.py                               |  2 +-
 examples/last-change.js                              |  2 +-
 libgupnp/meson.build                                 | 20 ++++++++++----------
 meson.build                                          | 19 ++++++++++++++++++-
 tools/{gupnp-binding-tool-1.2 => gupnp-binding-tool} |  0
 tools/meson.build                                    |  8 +++++++-
 vala/{GUPnP-1.2.metadata => GUPnP-1.6.metadata}      |  0
 vala/{gupnp-1.2.deps => gupnp-1.6.deps}              |  0
 vala/{gupnp-1.2-custom.vala => gupnp-custom.vala}    |  0
 vala/meson.build                                     |  4 ++--
 14 files changed, 58 insertions(+), 28 deletions(-)
---
diff --git a/doc/gupnp-binding-tool.xml b/doc/gupnp-binding-tool.xml.in
similarity index 94%
rename from doc/gupnp-binding-tool.xml
rename to doc/gupnp-binding-tool.xml.in
index e45f494..1e07f93 100644
--- a/doc/gupnp-binding-tool.xml
+++ b/doc/gupnp-binding-tool.xml.in
@@ -3,20 +3,20 @@
 
 <refentry id="gupnp-binding-tool" xmlns:xi="http://www.w3.org/2003/XInclude";>
   <refmeta>
-    <refentrytitle>gupnp-binding-tool-1.2</refentrytitle>
+    <refentrytitle>gupnp-binding-tool-@GUPNP_API_VERSION@</refentrytitle>
     <manvolnum>1</manvolnum>
     <refmiscinfo class="source">GUPnP</refmiscinfo>
     <refmiscinfo class="version"><xi:include href="version.xml" parse="text"><xi:fallback 
/></xi:include></refmiscinfo>
   </refmeta>
   
   <refnamediv>
-    <refname>gupnp-binding-tool-1.2</refname>
+    <refname>gupnp-binding-tool-@GUPNP_API_VERSION@</refname>
     <refpurpose>creates C convenience wrappers for UPnP services</refpurpose>
   </refnamediv>
 
   <refsynopsisdiv>
     <cmdsynopsis>
-      <command>gupnp-binding-tool-1.2</command>
+      <command>gupnp-binding-tool-@GUPNP_API_VERSION@</command>
       <arg choice="opt">--prefix <arg choice="req">PREFIX</arg></arg>
       <arg choice="opt">--mode <arg choice="req">client|server</arg></arg>
       <arg choice="req">SCPD file</arg>
@@ -26,7 +26,7 @@
   <refsect1>
     <title>Description</title>
     <para>
-      <command>gupnp-binding-tool-1.2</command> takes a <glossterm
+      <command>gupnp-binding-tool-@GUPNP_API_VERSION@</command> takes a <glossterm
       linkend="scpd">SCPD file</glossterm> and generates convenience C functions
       which call the actual GUPnP functions. The client-side bindings can be seen
       as a service-specific version of the GUPnPServiceProxy API and the 
@@ -81,7 +81,7 @@ igd_delete_port_mapping (GUPnPServiceProxy *proxy,
       the argument direction. 
     </para>
     <para>
-      <command>gupnp-binding-tool-1.2</command> generates both synchronous and
+      <command>gupnp-binding-tool-@GUPNP_API_VERSION@</command> generates both synchronous and
       asynchronous wrappers.  The <function>igd_delete_port_mapping</function> example
       above is the synchronous form, the asynchronous form is as follows:
     </para>
@@ -126,7 +126,7 @@ igd_external_ip_address_add_notify (GUPnPServiceProxy *proxy,
                                     gpointer userdata);</programlisting>
     
     <para>
-      All of the examples were produced with <filename>gupnp-binding-tool-1.2
+      All of the examples were produced with <filename>gupnp-binding-tool-@GUPNP_API_VERSION@
       --prefix igd --mode client WANIPConnection.xml</filename>.
     </para>
   </refsect1>
@@ -169,7 +169,7 @@ igd_external_ip_address_variable_notify (GUPnPService *service,
       variable value.
     </para>
     <para>
-      All of the examples were produced with <filename>gupnp-binding-tool-1.2
+      All of the examples were produced with <filename>gupnp-binding-tool-@GUPNP_API_VERSION@
       --prefix igd --mode server WANIPConnection.xml</filename>.
     </para>
   </refsect1>
diff --git a/doc/meson.build b/doc/meson.build
index 2fd0106..569bf01 100644
--- a/doc/meson.build
+++ b/doc/meson.build
@@ -38,6 +38,13 @@ if get_option('gtk_doc')
              install : true)
 endif
 
+docbook_man_page = configure_file(
+  input: 'gupnp-binding-tool.xml.in',
+  output: 'gupnp-binding-tool.xml',
+  configuration: api_config,
+  install: false
+)
+
 xsltproc = find_program('xsltproc', required: false)
 if xsltproc.found()
     stylesheet = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
@@ -67,15 +74,15 @@ if xsltproc.found()
             xlstproc_flags,
             '--noout',
             stylesheet,
-            'gupnp-binding-tool.xml'
+            docbook_man_page
         ]
     )
     if (stylesheet_check.returncode() == 0)
         message('Stylesheet ' + stylesheet + ' available')
         custom_target(
             'man 1 pages',
-            input: 'gupnp-binding-tool.xml',
-            output: 'gupnp-binding-tool-1.2.1',
+            input: docbook_man_page,
+            output: 'gupnp-binding-tool-@0@.1'.format(GUPNP_API_VERSION),
             command: xsltproc_args,
             depend_files : version_xml,
             install: true,
diff --git a/examples/browse.js b/examples/browse.js
index 1b3820a..f884094 100755
--- a/examples/browse.js
+++ b/examples/browse.js
@@ -26,7 +26,7 @@
 // OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 // DAMAGE.
 
-imports.gi.versions.GUPnP = "1.2"
+imports.gi.versions.GUPnP = "1.6"
 imports.gi.versions.GSSDP = "1.2"
 
 const Mainloop = imports.mainloop;
diff --git a/examples/get-volume.js b/examples/get-volume.js
index d4297b7..0f3cdbc 100755
--- a/examples/get-volume.js
+++ b/examples/get-volume.js
@@ -21,7 +21,7 @@
 // OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 // DAMAGE.
 
-imports.gi.versions.GUPnP = "1.2"
+imports.gi.versions.GUPnP = "1.6"
 
 const Mainloop = imports.mainloop;
 const GObject = imports.gi.GObject;
diff --git a/examples/get-volume.py b/examples/get-volume.py
index ccbd162..baf0c10 100755
--- a/examples/get-volume.py
+++ b/examples/get-volume.py
@@ -23,7 +23,7 @@
 # DAMAGE.
 
 import gi
-gi.require_version('GUPnP', '1.2')
+gi.require_version('GUPnP', '1.6')
 
 from gi.repository import GUPnP
 from gi.repository import GLib
diff --git a/examples/last-change.js b/examples/last-change.js
index 87e7a3c..1193245 100755
--- a/examples/last-change.js
+++ b/examples/last-change.js
@@ -26,7 +26,7 @@
 // OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
 // DAMAGE.
 
-imports.gi.versions.GUPnP = "1.2"
+imports.gi.versions.GUPnP = "1.6"
 
 const Mainloop = imports.mainloop;
 const GUPnP = imports.gi.GUPnP;
diff --git a/libgupnp/meson.build b/libgupnp/meson.build
index cb8a102..043a510 100644
--- a/libgupnp/meson.build
+++ b/libgupnp/meson.build
@@ -39,7 +39,7 @@ enums = gnome.mkenums(
     c_template : 'gupnp-enums.c.template',
     h_template : 'gupnp-enums.h.template',
     install_header : true,
-    install_dir : join_paths (get_option('includedir'), 'gupnp-1.2/libgupnp')
+    install_dir : join_paths (get_option('includedir'), GUPNP_API_NAME, 'libgupnp')
 )
 
 headers = files(
@@ -64,7 +64,7 @@ headers = files(
     'gupnp-white-list.h',
     'gupnp-xml-doc.h'
 )
-install_headers(headers, subdir : 'gupnp-1.2/libgupnp')
+install_headers(headers, subdir : GUPNP_API_NAME / 'libgupnp')
 
 sources = files(
     'gupnp-acl.c',
@@ -93,7 +93,7 @@ sources = files(
 )
 
 v = meson.project_version().split('.')
-soversion = 1
+soversion = 0
 library_minor = v[0].to_int() * 100 + v[1].to_int()
 library_micro = v[2].to_int()
 
@@ -107,7 +107,7 @@ interface_age = micro_version
 darwin_versions = [current, '@0@.@1@'.format(current, interface_age)]
 
 libgupnp = library(
-    'gupnp-1.2',
+    GUPNP_API_NAME,
     sources + context_manager_impl + enums,
     version : version,
     darwin_versions : darwin_versions,
@@ -123,16 +123,16 @@ gupnp = declare_dependency(
     dependencies : dependencies
 )
 
-meson.override_dependency('gupnp-1.2', gupnp)
+meson.override_dependency(GUPNP_API_NAME, gupnp)
 
 pkg.generate(
     libgupnp,
-    subdirs: 'gupnp-1.2',
-    name : 'gupnp-1.2',
+    subdirs: GUPNP_API_NAME,
+    name : GUPNP_API_NAME,
     requires : ['glib-2.0', 'gio-2.0', 'gssdp-1.2'],
     description : 'GObject-based UPnP library',
     version : meson.project_version(),
-    filebase : 'gupnp-1.2'
+    filebase : GUPNP_API_NAME
 )
 
 if get_option('introspection')
@@ -146,11 +146,11 @@ if get_option('introspection')
         libgupnp,
         sources : headers + sources + enums,
         namespace : 'GUPnP',
-        nsversion : '1.2',
+        nsversion : GUPNP_API_VERSION,
         header : 'libgupnp/gupnp.h',
         symbol_prefix : 'gupnp',
         identifier_prefix : 'GUPnP',
-        export_packages : 'gupnp-1.2',
+        export_packages : GUPNP_API_NAME,
         includes : gir_includes,
         install : true,
         extra_args : '-DGOBJECT_INTROSPECTION_SKIP'
diff --git a/meson.build b/meson.build
index 3790bcf..0eb0cc7 100644
--- a/meson.build
+++ b/meson.build
@@ -1,9 +1,15 @@
-project('gupnp', 'c', version : '1.4.0', meson_version : '>= 0.54.0')
+project('gupnp', 'c', version : '1.5.0', meson_version : '>= 0.54.0')
 gnome = import('gnome')
 pkg = import('pkgconfig')
 
 cc = meson.get_compiler('c')
 
+GUPNP_API_VERSION='1.6'
+GUPNP_API_NAME='gupnp-@0@'.format(GUPNP_API_VERSION)
+api_config = configuration_data()
+api_config.set('GUPNP_API_VERSION', GUPNP_API_VERSION)
+api_config.set('GUPNP_API_NAME', GUPNP_API_NAME)
+
 netlink_available = cc.has_header('linux/rtnetlink.h')
 ifaddrs_available = cc.has_header('ifaddrs.h')
 
@@ -47,3 +53,14 @@ endif
 if get_option('examples')
     subdir('examples')
 endif
+
+summary(
+  {
+    'Version': meson.project_version(),
+    'API Version' : GUPNP_API_VERSION,
+    'Library version': version,
+    'Darwin version': darwin_versions
+  },
+  section: 'Versioning'
+)
+
diff --git a/tools/gupnp-binding-tool-1.2 b/tools/gupnp-binding-tool
similarity index 100%
rename from tools/gupnp-binding-tool-1.2
rename to tools/gupnp-binding-tool
diff --git a/tools/meson.build b/tools/meson.build
index 42fe7e4..aea7142 100644
--- a/tools/meson.build
+++ b/tools/meson.build
@@ -1 +1,7 @@
-install_data('gupnp-binding-tool-1.2', install_dir : 'bin')
+configure_file(
+  copy: true,
+  input: 'gupnp-binding-tool',
+  output: 'gupnp-binding-tool-@0@'.format(GUPNP_API_VERSION),
+  install: true,
+  install_dir: 'bin'
+)
diff --git a/vala/GUPnP-1.2.metadata b/vala/GUPnP-1.6.metadata
similarity index 100%
rename from vala/GUPnP-1.2.metadata
rename to vala/GUPnP-1.6.metadata
diff --git a/vala/gupnp-1.2.deps b/vala/gupnp-1.6.deps
similarity index 100%
rename from vala/gupnp-1.2.deps
rename to vala/gupnp-1.6.deps
diff --git a/vala/gupnp-1.2-custom.vala b/vala/gupnp-custom.vala
similarity index 100%
rename from vala/gupnp-1.2-custom.vala
rename to vala/gupnp-custom.vala
diff --git a/vala/meson.build b/vala/meson.build
index aacaa71..7117bb1 100644
--- a/vala/meson.build
+++ b/vala/meson.build
@@ -6,8 +6,8 @@ else
     gssdp_gir_dirs = []
 endif
 
-gnome.generate_vapi('gupnp-1.2',
-                    sources : [gir.get(0), 'gupnp-1.2-custom.vala'],
+gnome.generate_vapi(GUPNP_API_NAME,
+                    sources : [gir.get(0), 'gupnp-custom.vala'],
                     packages : [gssdp_vala_package, 'gio-2.0', 'libsoup-2.4', 'libxml-2.0'],
                     gir_dirs : gssdp_gir_dirs,
                     install : true


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