From 8800a9c427f7d203178e430c5728aa6aff7814ed Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Thu, 4 Oct 2018 18:00:31 +0100 Subject: [PATCH] Initial import (1636169) --- .gitignore | 1 + libxmlb.spec | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 79 insertions(+) create mode 100644 .gitignore create mode 100644 libxmlb.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3ae666c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/libxmlb-0.1.0.tar.xz diff --git a/libxmlb.spec b/libxmlb.spec new file mode 100644 index 0000000..f58740c --- /dev/null +++ b/libxmlb.spec @@ -0,0 +1,77 @@ +%global glib2_version 2.45.8 + +Summary: Library for querying compressed XML metadata +Name: libxmlb +Version: 0.1.0 +Release: 1%{?dist} +License: LGPLv2+ +URL: https://github.com/hughsie/libxmlb +Source0: http://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz + +BuildRequires: glib2-devel >= %{glib2_version} +BuildRequires: gtk-doc +BuildRequires: libuuid-devel +BuildRequires: meson +BuildRequires: gobject-introspection-devel + +# needed for the self tests +BuildRequires: shared-mime-info + +Requires: glib2%{?_isa} >= %{glib2_version} +Requires: shared-mime-info + +%description +XML is slow to parse and strings inside the document cannot be memory mapped as +they do not have a trailing NUL char. The libxmlb library takes XML source, and +converts it to a structured binary representation with a deduplicated string +table -- where the strings have the NULs included. + +This allows an application to mmap the binary XML file, do an XPath query and +return some strings without actually parsing the entire document. This is all +done using (almost) zero allocations and no actual copying of the binary data. + +%package devel +Summary: Development package for %{name} +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +Files for development with %{name}. + +%prep +%setup -q + +%build + +%meson \ + -Dgtkdoc=true \ + -Dtests=true + +%meson_build + +%check +%meson_test + +%install +%meson_install + +%files +%doc README.md +%license LICENSE +%{_libexecdir}/xb-tool +%dir %{_libdir}/girepository-1.0 +%{_libdir}/girepository-1.0/*.typelib +%{_libdir}/libxmlb.so.1* + +%files devel +%dir %{_datadir}/gir-1.0 +%{_datadir}/gir-1.0/*.gir +%dir %{_datadir}/gtk-doc +%dir %{_datadir}/gtk-doc/html +%{_datadir}/gtk-doc/html/libxmlb +%{_includedir}/libxmlb-1 +%{_libdir}/libxmlb.so +%{_libdir}/pkgconfig/xmlb.pc + +%changelog +* Thu Oct 04 2018 Richard Hughes 0.1.0-1 +- Initial release for Fedora package review diff --git a/sources b/sources new file mode 100644 index 0000000..e1473d0 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (libxmlb-0.1.0.tar.xz) = e3ebe411ecfe4b8f81fd6051eeb38961e3befa64d1d78d9efa3e78c589b4593bb48ef297893e33daefe17d7a9fa227995e1e1211c00e851496b06fd0d4e96814