Accepting request 665017 from home:iznogood:branches:Base:System
Needed for future version of fwupd Library for querying compressed XML metadata https://github.com/hughsie/libxmlb 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. OBS-URL: https://build.opensuse.org/request/show/665017 OBS-URL: https://build.opensuse.org/package/show/X11:common:Factory/libxmlb?expand=0&rev=1
This commit is contained in:
commit
cab80b5919
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
3
libxmlb-0.1.6.tar.xz
Normal file
3
libxmlb-0.1.6.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3f45d438d112809c21de1abc91ef5edd65e689868f13ebf16be050a7c3f91ab3
|
||||
size 83399
|
5
libxmlb.changes
Normal file
5
libxmlb.changes
Normal file
@ -0,0 +1,5 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 10 09:32:08 UTC 2019 - bjorn.lie@gmail.com
|
||||
|
||||
- Initial packaging for openSUSE, version 0.1.6.
|
||||
|
123
libxmlb.spec
Normal file
123
libxmlb.spec
Normal file
@ -0,0 +1,123 @@
|
||||
#
|
||||
# spec file for package libxmlb
|
||||
#
|
||||
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2019 Bjørn Lie, Bryne, Norway.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
%define sover 1
|
||||
|
||||
Name: libxmlb
|
||||
Version: 0.1.6
|
||||
Release: 0
|
||||
Summary: Library for querying compressed XML metadata
|
||||
License: LGPL-2.1-or-later
|
||||
Group: Development/Libraries/Other
|
||||
URL: https://github.com/hughsie/libxmlb
|
||||
Source0: %{url}/archive/0.1.6.tar.gz#/%{name}-%{version}.tar.xz
|
||||
|
||||
BuildRequires: meson
|
||||
# Enable when/if libstemmer becomes available in openSUSE (+ in meson call)
|
||||
#BuildRequires: libstemmer-devel
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: pkgconfig(gio-2.0) >= 2.45.8
|
||||
BuildRequires: pkgconfig(gobject-introspection-1.0)
|
||||
BuildRequires: pkgconfig(gtk-doc)
|
||||
BuildRequires: pkgconfig(uuid)
|
||||
# Needed for the self tests
|
||||
BuildRequires: pkgconfig(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 -n %{name}%{sover}
|
||||
Summary: Library for querying compressed XML metadata
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n %{name}%{sover}
|
||||
This package provides the shared library for %{name}.
|
||||
|
||||
%package -n typelib-1_0-Xmlb-1_0
|
||||
Summary: Introspection bindings for %{name}
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n typelib-1_0-Xmlb-1_0
|
||||
This package provides the GObject Introspection bindings for
|
||||
%{name}.
|
||||
|
||||
%package -n xmlb-tool
|
||||
Summary: Optional tool for %{name}
|
||||
|
||||
%description -n xmlb-tool
|
||||
This package provides the optional xb-tool for %{name}.
|
||||
|
||||
%package devel
|
||||
Summary: Development package for %{name}
|
||||
Group: Development/Libraries/Other
|
||||
Requires: %{name}%{sover} = %{version}
|
||||
Requires: typelib-1_0-Xmlb-1_0 = %{version}
|
||||
Requires: xmlb-tool = %{version}
|
||||
|
||||
%description devel
|
||||
Files for development with %{name}.
|
||||
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
%build
|
||||
%meson \
|
||||
-Dgtkdoc=true \
|
||||
-Dintrospection=true \
|
||||
-Dtests=true \
|
||||
# -Dstemmer=true \
|
||||
%{nil}
|
||||
%meson_build
|
||||
|
||||
%check
|
||||
%meson_test
|
||||
|
||||
%install
|
||||
%meson_install
|
||||
|
||||
%post -n %{name}%{sover} -p /sbin/ldconfig
|
||||
%postun -n %{name}%{sover} -p /sbin/ldconfig
|
||||
|
||||
%files -n %{name}%{sover}
|
||||
%license LICENSE
|
||||
%{_libdir}/%{name}.so.%{sover}*
|
||||
|
||||
%files -n typelib-1_0-Xmlb-1_0
|
||||
%{_libdir}/girepository-1.0/*.typelib
|
||||
|
||||
%files -n xmlb-tool
|
||||
%doc README.md NEWS
|
||||
%{_libexecdir}/xb-tool
|
||||
|
||||
%files devel
|
||||
%doc %{_datadir}/gtk-doc/html/%{name}
|
||||
%{_datadir}/gir-1.0/*.gir
|
||||
%{_includedir}/%{name}-%{sover}/
|
||||
%{_libdir}/%{name}.so
|
||||
%{_libdir}/pkgconfig/xmlb.pc
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user