Repository navigation
Expand file tree
/
Copy pathlibxmlb.spec
More file actions
154 lines (130 loc) · 4.31 KB
/
Copy pathlibxmlb.spec
File metadata and controls
154 lines (130 loc) · 4.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#
# Conditional build:
%bcond_without apidocs # API documentation
%bcond_without static_libs # static library
%bcond_without stemmer # stemmer support
#
Summary: Library to create or query compressed XML files
Summary(pl.UTF-8): Biblioteka do tworzenia i odpytywania skompresowanych plików XML
Name: libxmlb
Version: 0.3.30
Release: 1
License: LGPL v2.1+
Group: Libraries
#Source0Download: https://github.com/hughsie/libxmlb/releases
Source0: https://github.com/hughsie/libxmlb/releases/download/%{version}/%{name}-%{version}.tar.xz
# Source0-md5: 1a9b4b01c8d92690b426c40098232e2a
URL: https://github.com/hughsie/libxmlb
BuildRequires: glib2-devel >= 1:2.68.0
BuildRequires: gobject-introspection-devel
%{?with_apidocs:BuildRequires: gtk-doc}
%{?with_stemmer:BuildRequires: libstemmer-devel}
BuildRequires: libuuid-devel
BuildRequires: meson >= 0.60.0
BuildRequires: ninja >= 1.5
BuildRequires: pkgconfig
BuildRequires: python3 >= 1:3
BuildRequires: rpm-build >= 4.6
BuildRequires: rpmbuild(macros) >= 2.042
BuildRequires: tar >= 1:1.22
BuildRequires: xz
BuildRequires: xz-devel
BuildRequires: zstd-devel
Requires: glib2%{?_isa} >= 1:2.68.0
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%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.
%description -l pl.UTF-8
XML jest wolny do analizy, a łańcuchy znaków wewnątrz dokumentu nie
mogą być odwzorowane w pamięci, ponieważ nie mają końcowych znaków
NUL. Biblioteka libxmlb pobiera źródło XML i przekształca je do
strukturalnej reprezentacji binarnej z zdeduplikowaną tablicą
łańcuchów znaków - w której łańcuchy mają końcowy znak NUL.
Pozwala to aplikacjom odwzorować w pamięci binarny plik XML, wykonać
zapytanie XPath i zwrócić jakieś łańcuchy znaków bez analizy całego
dokumentu. Jest to wykonywane (prawie) bez przydzielania pamięci ani
kopiowania danych binarnych.
%package devel
Summary: Header files for libxmlb library
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libxmlb
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: glib2-devel%{?_isa} >= 1:2.68.0
Requires: libstemmer-devel%{?_isa}
Requires: xz-devel%{?_isa}
Requires: zstd-devel%{?_isa}
%description devel
Header files for libxmlb library.
%description devel -l pl.UTF-8
Pliki nagłówkowe biblioteki libxmlb.
%package static
Summary: Static libxmlb library
Summary(pl.UTF-8): Statyczna biblioteka libxmlb
Group: Development/Libraries
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
%description static
Static libxmlb library.
%description static -l pl.UTF-8
Statyczna biblioteka libxmlb.
%package apidocs
Summary: API documentation for libxmlb library
Summary(pl.UTF-8): Dokumentacja API biblioteki libxmlb
Group: Documentation
BuildArch: noarch
%description apidocs
API documentation for libxmlb library.
%description apidocs -l pl.UTF-8
Dokumentacja API biblioteki libxmlb.
%prep
%setup -q
%build
%if %{with stemmer}
CPPFLAGS="%{rpmcppflags} -I/usr/include/libstemmer"
%endif
%meson \
%{!?with_static_libs:--default-library=shared} \
%{!?with_apidocs:-Dgtkdoc=false} \
-Dlzma=enabled \
%{?with_stemmer:-Dstemmer=true} \
-Dtests=false \
-Dzstd=enabled
%meson_build
%install
rm -rf $RPM_BUILD_ROOT
%meson_install
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(644,root,root,755)
%doc MAINTAINERS NEWS README.md SECURITY.md
%attr(755,root,root) %{_bindir}/xb-tool
%{_libdir}/libxmlb.so.*.*.*
%ghost %{_libdir}/libxmlb.so.2
%{_libdir}/girepository-1.0/Xmlb-2.0.typelib
%{_mandir}/man1/xb-tool.1*
%files devel
%defattr(644,root,root,755)
%{_libdir}/libxmlb.so
%{_includedir}/libxmlb-2
%{_datadir}/gir-1.0/Xmlb-2.0.gir
%{_pkgconfigdir}/xmlb.pc
%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libxmlb.a
%endif
%if %{with apidocs}
%files apidocs
%defattr(644,root,root,755)
%{_gtkdocdir}/libxmlb
%endif