]> git.pld-linux.org Git - packages/libxmlb.git/blob - libxmlb.spec
f34d3132e6ef3f0bf4a1dfcf82a0a6e3bd33801e
[packages/libxmlb.git] / libxmlb.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # API documentation
4 #
5 Summary:        Library to create or query compressed XML files
6 Summary(pl.UTF-8):      Biblioteka do tworzenia i odpytywania skompresowanych plików XML
7 Name:           libxmlb
8 Version:        0.1.7
9 Release:        1
10 License:        LGPL v2.1+
11 Group:          Libraries
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
21 BuildRequires:  ninja
22 BuildRequires:  rpmbuild(macros) >= 1.727
23 BuildRequires:  tar >= 1:1.22
24 BuildRequires:  xz
25 Requires:       glib2 >= 1:2.45.8
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27
28 %description
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.
34
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.
39
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.
46
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.
51
52 %package devel
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
59
60 %description devel
61 Header files for libxmlb library.
62
63 %description devel -l pl.UTF-8
64 Pliki nagłówkowe biblioteki libxmlb.
65
66 %package static
67 Summary:        Static libxmlb library
68 Summary(pl.UTF-8):      Statyczna biblioteka libxmlb
69 Group:          Development/Libraries
70 Requires:       %{name}-devel = %{version}-%{release}
71
72 %description static
73 Static libxmlb library.
74
75 %description static -l pl.UTF-8
76 Statyczna biblioteka libxmlb.
77
78 %package apidocs
79 Summary:        API documentation for libxmlb library
80 Summary(pl.UTF-8):      Dokumentacja API biblioteki libxmlb
81 Group:          Documentation
82 %if "%{_rpmversion}" >= "5"
83 BuildArch:      noarch
84 %endif
85
86 %description apidocs
87 API documentation for libxmlb library.
88
89 %description apidocs -l pl.UTF-8
90 Dokumentacja API biblioteki libxmlb.
91
92 %prep
93 %setup -q
94
95 %build
96 CPPFLAGS="%{rpmcppflags} -I/usr/include/libstemmer"
97 %meson build \
98         %{!?with_apidocs:-Dgtkdoc=false}
99
100 %meson_build -C build
101
102 %install
103 rm -rf $RPM_BUILD_ROOT
104
105 %meson_install -C build
106
107 %clean
108 rm -rf $RPM_BUILD_ROOT
109
110 %post   -p /sbin/ldconfig
111 %postun -p /sbin/ldconfig
112
113 %files
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
120
121 %files devel
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
127
128 %files static
129 %defattr(644,root,root,755)
130 %{_libdir}/libxmlb.a
131
132 %if %{with apidocs}
133 %files apidocs
134 %defattr(644,root,root,755)
135 %{_gtkdocdir}/libxmlb
136 %endif
This page took 0.036406 seconds and 2 git commands to generate.