]> git.pld-linux.org Git - packages/gxml.git/commitdiff
- updated to 0.10.0 (note: new soname and API version) auto/th/gxml-0.10.0-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 24 Sep 2016 08:30:27 +0000 (10:30 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 24 Sep 2016 08:30:27 +0000 (10:30 +0200)
- added missing patch (missing files from git), bug770449,docs patches (build fixes)

gxml-bug770449.patch [new file with mode: 0644]
gxml-docs.patch [new file with mode: 0644]
gxml-missing.patch [new file with mode: 0644]
gxml.spec

diff --git a/gxml-bug770449.patch b/gxml-bug770449.patch
new file mode 100644 (file)
index 0000000..1a3478d
--- /dev/null
@@ -0,0 +1,13 @@
+--- gxml-0.10.0/gxml/libxml-NamedAttrMap.vala.orig     2016-02-22 20:23:53.000000000 +0100
++++ gxml-0.10.0/gxml/libxml-NamedAttrMap.vala  2016-09-23 20:55:54.587484135 +0200
+@@ -32,8 +32,8 @@
+        * {@link Gee.Iterable} interfaces.
+        */
+       public abstract class AbstractNamedAttrMap : Object,
+-              Traversable<Entry<string,GXml.Attribute>>,
+-              Iterable<Entry<string,GXml.Attribute>>
++              Traversable<Entry>,
++              Iterable<Entry>
+       {
+               protected xElement elem;
diff --git a/gxml-docs.patch b/gxml-docs.patch
new file mode 100644 (file)
index 0000000..327dc53
--- /dev/null
@@ -0,0 +1,76 @@
+--- gxml-0.10.0/gxml/gxml-init.vala.orig       2015-11-04 20:13:59.000000000 +0100
++++ gxml-0.10.0/gxml/gxml-init.vala    2016-09-23 21:49:12.100780960 +0200
+@@ -1,4 +1,4 @@
+-/**\r
++/*
+  *  GXml
+  *
+  *  Authors:
+@@ -6,21 +6,21 @@
+  *       Daniel Espinosa <esodan@gmail.com>
+  *
+  *
+- *  Copyright (c) 2015 Daniel Espinosa\r
+- *  \r
+- *  This library is free software; you can redistribute it and/or\r
+- *  modify it under the terms of the GNU Lesser General Public\r
+- *  License as published by the Free Software Foundation; either\r
+- *  version 3 of the License, or (at your option) any later version.\r
+- *  \r
+- *  This library is distributed in the hope that it will be useful,\r
+- *  but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+- *  Lesser General Public License for more details.\r
+- *  \r
+- *  You should have received a copy of the GNU Lesser General Public\r
+- *  License along with this library; if not, write to the Free Software\r
+- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
++ *  Copyright (c) 2015 Daniel Espinosa
++ *  
++ *  This library is free software; you can redistribute it and/or
++ *  modify it under the terms of the GNU Lesser General Public
++ *  License as published by the Free Software Foundation; either
++ *  version 3 of the License, or (at your option) any later version.
++ *  
++ *  This library is distributed in the hope that it will be useful,
++ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *  Lesser General Public License for more details.
++ *  
++ *  You should have received a copy of the GNU Lesser General Public
++ *  License along with this library; if not, write to the Free Software
++ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+  */
+ namespace GXml {
+   class Init {
+@@ -33,4 +33,4 @@
+       }
+     }
+   }
+-}
+\ No newline at the end of file
++}
+--- gxml-0.10.0/docs/valadoc/gtk-doc/Makefile.am.orig  2015-11-04 20:13:59.000000000 +0100
++++ gxml-0.10.0/docs/valadoc/gtk-doc/Makefile.am       2016-09-23 21:38:45.854121445 +0200
+@@ -12,7 +12,8 @@
+       --pkg gee-0.8 \
+       --vapidir=$(top_srcdir)/gxml \
+       --vapidir=$(top_srcdir)/vapi \
+-      $(top_srcdir)/vapi/xlibxml-1.0.vapi
++      $(top_srcdir)/vapi/xlibxml-1.0.vapi \
++      $(top_srcdir)/vapi/config.vapi
+ sources= \
+       $(top_srcdir)/gxml/*.vala
+--- gxml-0.10.0/docs/valadoc/gir-docs/Makefile.am.orig 2015-07-08 20:11:44.000000000 +0200
++++ gxml-0.10.0/docs/valadoc/gir-docs/Makefile.am      2016-09-23 21:51:31.140779742 +0200
+@@ -12,7 +12,8 @@
+       --pkg gee-0.8 \
+       --vapidir=$(top_srcdir)/gxml \
+       --vapidir=$(top_srcdir)/vapi \
+-      $(top_srcdir)/vapi/xlibxml-1.0.vapi
++      $(top_srcdir)/vapi/xlibxml-1.0.vapi \
++      $(top_srcdir)/vapi/config.vapi
+ sources= \
+       $(top_srcdir)/gxml/*.vala
diff --git a/gxml-missing.patch b/gxml-missing.patch
new file mode 100644 (file)
index 0000000..8aff0e4
--- /dev/null
@@ -0,0 +1,125 @@
+--- gxml-0.10.0/docs/mallard/C.orig/gxml-serializable-objectmodel.page 1970-01-01 01:00:00.000000000 +0100
++++ gxml-0.10.0/docs/mallard/C/gxml-serializable-objectmodel.page      2016-09-23 21:21:52.000799682 +0200
+@@ -0,0 +1,19 @@
++<page xmlns="http://projectmallard.org/1.0/"
++       type="topic" id="gxml-serializable-objectmodel">
++
++  <info>
++    <revision pkgversion="0.4" version="0.1" date="2014-09-18" status="incomplete" />
++    <credit type="author">
++      <name>Daniel Espinosa</name>
++      <email>esodan@gmail.com</email>
++    </credit>
++    <license>
++      <p>Creative Commons Share Alike 3.0</p>
++    </license>
++    <link type="topic" xref="index" >Home</link>
++  </info>
++
++  <title>SerializableObjectModel implementation</title>
++  <p><code>SerializableObjectModel</code> is a class implementing <code>Serializable</code> interface. This implementation consider each object as a XML node, represented in GXml as a <code>GXml.Element</code> and its properties is represented by <code>GXml.Attr</code>. Each property, if it is a <code>Serializable</code> object, is represented as child nodes.</p>
++  <p>If a object's value property must be represented as a XML node content, then it requires to override <code>serialize_use_xml_node_value()</code> and set value at <code>serialized_xml_node_value</code>, as decribed at <link type="topic" xref="gxml-serializable#gxml-serializable-node-contents">Node content</link>.</p>
++</page>
+--- gxml-0.10.0/docs/mallard/C.orig/gxml-serializable.page     1970-01-01 01:00:00.000000000 +0100
++++ gxml-0.10.0/docs/mallard/C/gxml-serializable.page  2016-09-23 21:21:52.000799682 +0200
+@@ -0,0 +1,72 @@
++<page xmlns="http://projectmallard.org/1.0/"
++       type="topic" id="gxml-serializable">
++
++  <info>
++    <revision pkgversion="0.4" version="0.1" date="2014-09-18" status="incomplete" />
++    <credit type="author">
++      <name>Daniel Espinosa</name>
++      <email>esodan@gmail.com</email>
++    </credit>
++    <license>
++      <p>Creative Commons Share Alike 3.0</p>
++    </license>
++    <link type="topic" xref="index" />
++  </info>
++
++  <title>Serializable Interface</title>
++  <p>Implementors of this interface, could define or override the way you want to represent your class in a XML file.</p>
++  <section id="gxml-serializable-properties">
++              <title>Serializable properties</title>
++              <p>You can get control on class's properties to be serialized to XML. Allowing to provide ones, storing runtime information and ones to be stored in XML. By default, all object's properties are serialized. In order to skip properties from serialization process you must add its canonical name as key and its canonical name as value, to <code>ignored_serializable_properties</code> store.</p>
++              <p>Implementator must use <code>ignored_serializable_properties</code> property to check if a property should be serialized. This allows to dynamically remove, on convenience, properties on serialization. You can use <code>list_serializable_properties()</code> method as a convenient function, using its default implementation, or even override it at your convenience to automate dynamic serializable properties at run time; just make sure to skip the unwanted properties.</p>
++              <p>There are more methods to avoid properties serialization, like to override <code>init_properties</code> default implementation. It stores all <code>Serializale</code>'s properties to be ignored by default; you must ensure to initialize correctly, by calling <code>default_init_properties()</code> method before any other code in your overrided method.</p>
++      <section id="gxml-serializable-unknown_properties">
++  <title>Unknown XML elements</title>
++      <p>XML allows great flexibility, providing different ways to represent the same information. This is a problem when you try to deserialize them.</p>
++      <p>In order to deserialize correctly, you must create your XML, both by serializing a <code>Serializable</code> object or by hand writing. By using the former, you can add extra information, like nodes or properties, but most of them could be ignored or lost on deserialization/serialization process. To avoid data lost, you can override <code>get_enable_unknown_serializable_property ()</code> method in order to return true, your implementation or the ones in GXml, will store all unknown properties and nodes on deserialization and must serialize again back to the XML file. Even you are allowed to get this unknown objects by iterating on <code>unknown_serializable_property</code> hash table.</p>
++      </section>
++  <section id="gxml-serializable-property-name">
++  <title>Property's name</title>
++  <p>When serialize a class property, by default it uses its name given  on class declaration, but is less common to see XML node mproperties with name like <code>your_property</code>, but more common is to use <code>YourProperty</code>. In order to use this kind of names, your implementation should use properties' nick name and override <code>property_use_nick()</code> method to return true. This should instruct your code to use this method to use property's nick name. This is the default in GXml default implementations.</p>
++  <p>In order to set node's name, you should override <code>node_name()</code> method.</p>
++  </section>
++  </section>
++  <section id="gxml-serializable-node-contents">
++  <title>XML node's content</title>
++  <p>By default GXml's implementations doesn't deseriaze/serialize XML node contents. In order to enable it, you must override <code>serialize_use_xml_node_value()</code> method to return true and store XML node's content to <code>serialized_xml_node_value</code> property.</p>
++  <p>Implementors could set up methods to provide a clean easy to use API to set nodes contents. In most cases, users would like to set a value through a getter or setter or through a property in the class. If you use a property, you should add it to <code>ignored_serializable_properties</code> in order to see its value in a XML node property.</p>
++  </section>
++  <section id="gxml-serializable-node-name">
++  <title>XML node name</title>
++  <p>On serialization XML node's name could be set to use a prety one. By default, node's name is the class name; becareful because name could be <code>GXmlSerializable</code>, while may you prefer to use just 'Serializable'.</p>
++  <p>In order to set node's name, you should override <code>node_name()</code> method.</p>
++  </section>
++  <section id="gxml-serializable-serialize">
++  <title>Serialize</title>
++  <p><code>Serializable</code> interface allows you to implement your own <code>serialize()</code> method. Your implementation should take a <code>GXml.Node</code> and serialize over it. Given <code>GXml.Node</code>, could be an <code>GXml.Element</code> or a <code>GXml.Document</code>, your implementaiton should take care about this and return XML nodes representing your class object.</p>
++  </section>
++  <section id="gxml-serializable-serialize-property">
++  <title>Serialize a property</title>
++  <p><code>Serializable</code> interface allows you to implement your own <code>serialize_property()</code> method. Your implementation should take a <code>GXml.Element</code> to serialize on your property. Your implementation could detect the property to serialize and get its value, from given <code>GLib.ParamSpec</code>. Your serialization could be add a <code>GXml.Attr</code> or child <code>GXml.Element</code> to the given <code>GXml.Element</code> or set a contents to it; its your choice.</p>
++  </section>
++  <section id="gxml-serializable-deserialize">
++  <title>Deserialize</title>
++  <p><code>Serializable</code> interface allows you to implement your own <code>deserialize()</code> method. Your implementation should take a <code>GXml.Node</code> and deserialize from it. Given <code>GXml.Node</code>, could be an <code>GXml.Element</code> or a <code>GXml.Document</code>, your implementaiton should take care about this and return XML nodes representing your class object.</p>
++  <p>Your implementation could take <code>GXml.Element</code>'s name to detect the property to set up or detect the root element in a <code>GXml.Document</code> to use. Then you can iterate over all node's properties and set up your object properties; you can use <code>gvalue_to_string()</code> to transform most common value types from string to the required value's type.</p>
++  <section id="gxml-serializable-deserialize-supportedtypes">
++  <title>Supported types</title>
++  <p><code>Serializable</code> interface support a number of data types to convert from its string representation. These are supported types:</p>
++  <list>
++    <item><p>integers: int8, int64, uint, long, ulong, char, uchar</p></item>
++    <item><p>boolean</p></item>
++    <item><p>floats: float, double</p></item>
++    <item><p>enumerations</p></item>
++  </list>
++  <section id="gxml-serializable-deserialize-enums">
++  <p>Enumerations have a set of utility methods to better represent on serialisation/deserialization.</p>
++  <p>Enumerations could be converted to string using its definition on <code>GLib.EnumClass</code>, by taking its nick name directly or converting to its camel case representation.</p>
++  <p>Any enumeration value type in a <code>GLib.Object</code>'s property could be deserialized from its definition given on <code>GLib.EnumClass</code> (name and nick) or from its camel case representation.</p>
++  </section>
++  </section>
++  </section>
++</page>
+--- gxml-0.10.0/docs/mallard/C.orig/index.page 1970-01-01 01:00:00.000000000 +0100
++++ gxml-0.10.0/docs/mallard/C/index.page      2016-09-23 21:21:52.000799682 +0200
+@@ -0,0 +1,25 @@
++<page xmlns="http://projectmallard.org/1.0/"
++      type="guide" id="index">
++
++  <info>
++    <revision pkgversion="0.4" version="0.1" date="2014-09-18" status="incomplete"/>
++    <credit type="author">
++      <name>Daniel Espinosa</name>
++      <email>esodan@gmail.com</email>
++    </credit>
++    <license>
++      <p>Creative Commons Share Alike 3.0</p>
++    </license>
++  </info>
++
++  <title>
++    GXml Serialization Framework Manual
++  </title>
++  <p>
++  This guide provides examples and applications of GXml's Serialization Framework.
++  </p>
++  <p>GXml Serialization Framework allows <code>GLib.Object</code> objects to be serialized to XML files.</p>
++  <p>It has a <code>Serializable</code> interface to be implemented by a <code>GLib.Object</code> class, allowing great flexibility on how the object must be represented in XML format.</p>
++  <p>Today GXml have two implementations, one of them is <code>SerializableObjectModel</code>, using a model where each object is a XML node and a each object's property is a XML node property.</p>
++  <p>Serialization Framework have containers implementations, allowing to store <code>Serializable</code> objects in arrays, hash tables and multikey stores.</p>
++</page>
index fac9dd3e72da99cc9361e3323643b5915c96ab78..31d7eeec504dceed7b076bc2c7395054f899a549 100644 (file)
--- a/gxml.spec
+++ b/gxml.spec
@@ -1,17 +1,20 @@
 #
 # Conditional build:
 #
 # Conditional build:
-%bcond_with    apidocs         # API documentation [doesn't build up to 0.8.0 release]
+%bcond_without apidocs         # API documentation
 %bcond_without static_libs     # static library
 
 Summary:       GXml - GObject API that wraps around libxml2
 Summary(pl.UTF-8):     GXml - API GObject obudowujące libxml2
 Name:          gxml
 %bcond_without static_libs     # static library
 
 Summary:       GXml - GObject API that wraps around libxml2
 Summary(pl.UTF-8):     GXml - API GObject obudowujące libxml2
 Name:          gxml
-Version:       0.8.2
-Release:       2
+Version:       0.10.0
+Release:       1
 License:       LGPL v2.1+
 Group:         Libraries
 License:       LGPL v2.1+
 Group:         Libraries
-Source0:       http://ftp.gnome.org/pub/GNOME/sources/gxml/0.8/%{name}-%{version}.tar.xz
-# Source0-md5: 77af0fb4e1e178b60fc898b8beeaabfe
+Source0:       http://ftp.gnome.org/pub/GNOME/sources/gxml/0.10/%{name}-%{version}.tar.xz
+# Source0-md5: a268a60a6bc9fbad3f0fd580a0a93538
+Patch0:                %{name}-bug770449.patch
+Patch1:                %{name}-missing.patch
+Patch2:                %{name}-docs.patch
 URL:           https://github.com/GNOME/gxml
 BuildRequires: autoconf >= 2.65
 BuildRequires: automake >= 1:1.11
 URL:           https://github.com/GNOME/gxml
 BuildRequires: autoconf >= 2.65
 BuildRequires: automake >= 1:1.11
@@ -82,8 +85,22 @@ Vala API for GXml library.
 %description -n vala-gxml -l pl.UTF-8
 API języka Vala dla biblioteki GXml.
 
 %description -n vala-gxml -l pl.UTF-8
 API języka Vala dla biblioteki GXml.
 
+%package apidocs
+Summary:       API documentation for GXml library
+Summary(pl.UTF-8):     Dokumentacja API biblioteki GXml
+Group:         Documentation
+
+%description apidocs
+API documentation for GXml library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki GXml.
+
 %prep
 %setup -q
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
 
 %build
 %{__intltoolize}
 
 %build
 %{__intltoolize}
@@ -93,25 +110,31 @@ API języka Vala dla biblioteki GXml.
 %{__autoheader}
 %{__automake}
 %configure \
 %{__autoheader}
 %{__automake}
 %configure \
-       --enable-gi-system-install \
        --disable-silent-rules \
        %{?with_static_libs:--enable-static} \
        %{?with_apidocs:--enable-docs --enable-gtk-docs --enable-valadoc}
        --disable-silent-rules \
        %{?with_static_libs:--enable-static} \
        %{?with_apidocs:--enable-docs --enable-gtk-docs --enable-valadoc}
-# --enable-gir-docs --enable-devhelp-docs ???
+# --enable-devhelp-docs is almost the same as gtk-docs html, but built with valadoc(?) and installed to devhelp dirs
+# --enable-gir-docs ???
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
-       DESTDIR=$RPM_BUILD_ROOT
+       DESTDIR=$RPM_BUILD_ROOT \
+       gxmlgtkdocdir=%{_gtkdocdir}/gxml
 
 # obsoleted by pkg-config
 
 # obsoleted by pkg-config
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/libgxml-0.6.la
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libgxml-0.10.la
 # packaged as %doc
 %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc
 
 # packaged as %doc
 %{__rm} -r $RPM_BUILD_ROOT%{_prefix}/doc
 
-%find_lang GXml
+# what a mess... gtk-doc XML intermediate files are installed to html dir...
+%{__rm} -r $RPM_BUILD_ROOT%{_gtkdocdir}/gxml/*.{bottom,top,stamp,txt,types,xml}
+cp -p docs/valadoc/gtk-doc/gtk-doc/gxml/html/* $RPM_BUILD_ROOT%{_gtkdocdir}/gxml
+
+# "GXml" gettext domain, "gxml" gnome help
+%find_lang GXml --with-gnome --all-name
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -122,24 +145,30 @@ rm -rf $RPM_BUILD_ROOT
 %files -f GXml.lang
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog NEWS README
 %files -f GXml.lang
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog NEWS README
-%attr(755,root,root) %{_libdir}/libgxml-0.6.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libgxml-0.6.so.8
-%{_libdir}/girepository-1.0/GXml-0.6.typelib
+%attr(755,root,root) %{_libdir}/libgxml-0.10.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libgxml-0.10.so.10
+%{_libdir}/girepository-1.0/GXml-0.10.typelib
 
 %files devel
 %defattr(644,root,root,755)
 
 %files devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libgxml-0.6.so
-%{_includedir}/gxml-0.6
-%{_datadir}/gir-1.0/GXml-0.6.gir
-%{_pkgconfigdir}/gxml-0.6.pc
+%attr(755,root,root) %{_libdir}/libgxml-0.10.so
+%{_includedir}/gxml-0.10
+%{_datadir}/gir-1.0/GXml-0.10.gir
+%{_pkgconfigdir}/gxml-0.10.pc
 
 %if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
 
 %if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
-%{_libdir}/libgxml-0.6.a
+%{_libdir}/libgxml-0.10.a
 %endif
 
 %files -n vala-gxml
 %defattr(644,root,root,755)
 %endif
 
 %files -n vala-gxml
 %defattr(644,root,root,755)
-%{_datadir}/vala/vapi/gxml-0.6.deps
-%{_datadir}/vala/vapi/gxml-0.6.vapi
+%{_datadir}/vala/vapi/gxml-0.10.deps
+%{_datadir}/vala/vapi/gxml-0.10.vapi
+
+%if %{with apidocs}
+%files apidocs
+%defattr(644,root,root,755)
+%{_gtkdocdir}/gxml
+%endif
This page took 0.075341 seconds and 4 git commands to generate.