3 %bcond_without apidocs # API documentation
5 Summary: Library to create or query compressed XML files
6 Summary(pl.UTF-8): Biblioteka do tworzenia i odpytywania skompresowanych plików XML
12 Source0: https://people.freedesktop.org/~hughsient/releases/%{name}-%{version}.tar.xz
13 # Source0-md5: 356fbf3295b91901f2e932e812e3a969
14 URL: https://github.com/hughsie/libxmlb
15 BuildRequires: glib2-devel >= 1:2.45.8
16 BuildRequires: gobject-introspection-devel
17 %{?with_apidocs:BuildRequires: gtk-doc}
18 BuildRequires: libstemmer-devel
19 BuildRequires: libuuid-devel
20 BuildRequires: meson >= 0.47.0
22 BuildRequires: rpmbuild(macros) >= 1.727
23 BuildRequires: tar >= 1:1.22
25 Requires: glib2 >= 1:2.45.8
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 XML is slow to parse and strings inside the document cannot be memory
30 mapped as they do not have a trailing NUL char. The libxmlb library
31 takes XML source, and converts it to a structured binary
32 representation with a deduplicated string table - where the strings
33 have the NULs included.
35 This allows an application to mmap the binary XML file, do an XPath
36 query and return some strings without actually parsing the entire
37 document. This is all done using (almost) zero allocations and no
38 actual copying of the binary data.
40 %description -l pl.UTF-8
41 XML jest wolny do analizy, a łańcuchy znaków wewnątrz dokumentu nie
42 mogą być odwzorowane w pamięci, ponieważ nie mają końcowych znaków
43 NUL. Biblioteka libxmlb pobiera źródło XML i przekształca je do
44 strukturalnej reprezentacji binarnej z zdeduplikowaną tablicą
45 łańcuchów znaków - w której łańcuchy mają końcowy znak NUL.
47 Pozwala to aplikacjom odwzorować w pamięci binarny plik XML, wykonać
48 zapytanie XPath i zwrócić jakieś łańcuchy znaków bez analizy całego
49 dokumentu. Jest to wykonywane (prawie) bez przydzielania pamięci ani
50 kopiowania danych binarnych.
53 Summary: Header files for libxmlb library
54 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libxmlb
55 Group: Development/Libraries
56 Requires: %{name} = %{version}-%{release}
57 Requires: glib2-devel >= 1:2.45.8
58 Requires: libstemmer-devel
61 Header files for libxmlb library.
63 %description devel -l pl.UTF-8
64 Pliki nagłówkowe biblioteki libxmlb.
67 Summary: Static libxmlb library
68 Summary(pl.UTF-8): Statyczna biblioteka libxmlb
69 Group: Development/Libraries
70 Requires: %{name}-devel = %{version}-%{release}
73 Static libxmlb library.
75 %description static -l pl.UTF-8
76 Statyczna biblioteka libxmlb.
79 Summary: API documentation for libxmlb library
80 Summary(pl.UTF-8): Dokumentacja API biblioteki libxmlb
82 %if "%{_rpmversion}" >= "5"
87 API documentation for libxmlb library.
89 %description apidocs -l pl.UTF-8
90 Dokumentacja API biblioteki libxmlb.
96 CPPFLAGS="%{rpmcppflags} -I/usr/include/libstemmer"
98 %{!?with_apidocs:-Dgtkdoc=false}
100 %meson_build -C build
103 rm -rf $RPM_BUILD_ROOT
105 %meson_install -C build
108 rm -rf $RPM_BUILD_ROOT
110 %post -p /sbin/ldconfig
111 %postun -p /sbin/ldconfig
114 %defattr(644,root,root,755)
115 %doc MAINTAINERS NEWS README.md
116 %attr(755,root,root) %{_libdir}/libxmlb.so.*.*.*
117 %attr(755,root,root) %ghost %{_libdir}/libxmlb.so.1
118 %{_libdir}/girepository-1.0/Xmlb-1.0.typelib
119 %attr(755,root,root) %{_libexecdir}/xb-tool
122 %defattr(644,root,root,755)
123 %attr(755,root,root) %{_libdir}/libxmlb.so
124 %{_includedir}/libxmlb-1
125 %{_datadir}/gir-1.0/Xmlb-1.0.gir
126 %{_pkgconfigdir}/xmlb.pc
129 %defattr(644,root,root,755)
134 %defattr(644,root,root,755)
135 %{_gtkdocdir}/libxmlb