]>
Commit | Line | Data |
---|---|---|
71d7c8d4 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # API documentation | |
33f131d4 | 4 | %bcond_without icu # libicu instead of libunistring [the latter broken since 3.1.1] |
60a48bb4 JB |
5 | %bcond_without libsoup2 # libsoup2 support module |
6 | %bcond_without libsoup3 # libsoup3 support module | |
71d7c8d4 JB |
7 | %bcond_with static_libs # static libraries |
8 | %bcond_without vala # Vala API | |
9 | ||
10 | %define abiver 3.0 | |
11 | Summary: Tracker 3 - an indexing subsystem | |
12 | Summary(pl.UTF-8): Tracker 3 - podsystem indeksujący | |
13 | Name: tracker3 | |
50fa1ae6 JB |
14 | Version: 3.5.3 |
15 | Release: 1 | |
71d7c8d4 JB |
16 | License: GPL v2+ |
17 | Group: Applications | |
50fa1ae6 JB |
18 | Source0: https://download.gnome.org/sources/tracker/3.5/tracker-%{version}.tar.xz |
19 | # Source0-md5: f78a0d145007d9871174be21a49ce9ef | |
71d7c8d4 JB |
20 | URL: https://wiki.gnome.org/Projects/Tracker |
21 | BuildRequires: asciidoc | |
22 | BuildRequires: dbus-devel >= 1.3.1 | |
71d7c8d4 | 23 | BuildRequires: gettext-tools |
50fa1ae6 | 24 | %{?with_apidocs:BuildRequires: gi-docgen} |
71d7c8d4 JB |
25 | BuildRequires: glib2-devel >= 1:2.52.0 |
26 | BuildRequires: gobject-introspection-devel >= 0.10.0 | |
50fa1ae6 | 27 | %{?with_apidocs:BuildRequires: graphviz} |
d797e1f6 JB |
28 | # dist tarballs contain pregenerated docs |
29 | #BuildRequires: hotdoc | |
30 | BuildRequires: json-glib-devel >= 1.4 | |
71d7c8d4 | 31 | %{?with_icu:BuildRequires: libicu-devel >= 4.8.1.1} |
60a48bb4 | 32 | %{?with_libsoup2:BuildRequires: libsoup-devel >= 2.40} |
d797e1f6 | 33 | %{?with_libsoup3:BuildRequires: libsoup3-devel >= 2.99.2} |
71d7c8d4 JB |
34 | BuildRequires: libstemmer-devel |
35 | %{!?with_icu:BuildRequires: libunistring-devel} | |
36 | BuildRequires: libuuid-devel | |
37 | BuildRequires: libxml2-devel >= 1:2.6.31 | |
38 | BuildRequires: libxslt-progs | |
50fa1ae6 | 39 | BuildRequires: meson >= 0.55 |
71d7c8d4 JB |
40 | BuildRequires: ninja >= 1.5 |
41 | BuildRequires: pkgconfig | |
42 | BuildRequires: python3 >= 1:3.2 | |
641b5e05 | 43 | BuildRequires: python3-pygobject3 |
5a9ed503 | 44 | BuildRequires: rpm-build >= 4.6 |
96fe3c5c | 45 | BuildRequires: rpmbuild(macros) >= 2.011 |
5a9ed503 | 46 | BuildRequires: sqlite3-devel >= 3.35.2 |
71d7c8d4 JB |
47 | BuildRequires: tar >= 1:1.22 |
48 | %{?with_vala:BuildRequires: vala >= 2:0.18.0} | |
d797e1f6 | 49 | %{?with_libsoup3:BuildRequires: vala-libsoup3 >= 2.99.2} |
50fa1ae6 | 50 | %{?with_apidocs:BuildRequires: xmlto} |
71d7c8d4 JB |
51 | BuildRequires: xz |
52 | BuildRequires: zlib-devel | |
53 | Requires(post,postun): glib2 >= 1:2.52.0 | |
96fe3c5c | 54 | Requires(post,preun): systemd-units >= 1:250.1 |
71d7c8d4 JB |
55 | Requires: %{name}-libs = %{version}-%{release} |
56 | Requires: dbus >= 1.3.1 | |
96fe3c5c | 57 | Requires: systemd-units >= 1:250.1 |
71d7c8d4 JB |
58 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
59 | ||
60 | %description | |
61 | Tracker is an indexing sub-system and search aggregator. | |
62 | ||
63 | %description -l pl.UTF-8 | |
64 | Tracker jest podsystemem indeksującym i wyszukującym. | |
65 | ||
66 | %package libs | |
67 | Summary: Tracker 3 library | |
68 | Summary(pl.UTF-8): Biblioteka Trackera 3 | |
69 | License: LGPL v2.1+ | |
70 | Group: Libraries | |
71 | Requires: glib2 >= 1:2.52.0 | |
d797e1f6 | 72 | Requires: json-glib >= 1.4 |
60a48bb4 JB |
73 | %{?with_libsoup2:Requires: libsoup >= 2.40} |
74 | %{?with_libsoup3:Requires: libsoup3 >= 2.99.2} | |
71d7c8d4 | 75 | Requires: libxml2 >= 1:2.6.31 |
fd637531 | 76 | Requires: sqlite3-libs >= 3.35.2 |
71d7c8d4 JB |
77 | |
78 | %description libs | |
79 | Tracker 3 library. | |
80 | ||
81 | %description libs -l pl.UTF-8 | |
82 | Biblioteka Trackera 3. | |
83 | ||
84 | %package devel | |
85 | Summary: Header files for Tracker 3 library | |
86 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Trackera 3 | |
87 | License: LGPL v2.1+ | |
88 | Group: Development/Libraries | |
89 | Requires: %{name}-libs = %{version}-%{release} | |
90 | Requires: glib2-devel >= 1:2.52.0 | |
d797e1f6 | 91 | Requires: json-glib-devel >= 1.4 |
71d7c8d4 JB |
92 | Requires: libstemmer-devel |
93 | Requires: libxml2-devel >= 1:2.6.31 | |
94 | ||
95 | %description devel | |
96 | Header files for Tracker 3 library. | |
97 | ||
98 | %description devel -l pl.UTF-8 | |
99 | Pliki nagłówkowe bibliotek Trackera 3. | |
100 | ||
101 | %package static | |
102 | Summary: Static Tracker 3 library | |
103 | Summary(pl.UTF-8): Statyczna biblioteka Trackera 3 | |
104 | License: LGPL v2.1+ | |
105 | Group: Development/Libraries | |
106 | Requires: %{name}-devel = %{version}-%{release} | |
107 | ||
108 | %description static | |
109 | Static Tracker 3 library. | |
110 | ||
111 | %description static -l pl.UTF-8 | |
112 | Statyczna biblioteka Trackera 3. | |
113 | ||
114 | %package testutils | |
115 | Summary: Tracker 3 test utilities | |
116 | Summary(pl.UTF-8): Narzędzia testowe Trackera 3 | |
117 | Group: Development/Tools | |
118 | Requires: %{name}-libs = %{version}-%{release} | |
119 | Requires: python3 >= 1:3.2 | |
120 | Requires: python3-pygobject3 >= 3 | |
121 | ||
122 | %description testutils | |
123 | Tracker 3 test utilities. | |
124 | ||
125 | %description testutils -l pl.UTF-8 | |
126 | Narzędzia testowe Trackera 3. | |
127 | ||
128 | %package apidocs | |
129 | Summary: Tracker 3 library API documentation | |
130 | Summary(pl.UTF-8): Dokumentacja API biblioteki Trackera 3 | |
131 | Group: Documentation | |
132 | Requires: gtk-doc-common | |
2c6584a3 | 133 | BuildArch: noarch |
71d7c8d4 JB |
134 | |
135 | %description apidocs | |
136 | Tracker 3 library API documentation. | |
137 | ||
138 | %description apidocs -l pl.UTF-8 | |
139 | Dokumentacja API biblioteki Trackera 3. | |
140 | ||
141 | %package -n bash-completion-tracker3 | |
142 | Summary: Bash completion for tracker3 command | |
143 | Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia tracker3 | |
144 | Group: Applications/Shells | |
145 | Requires: %{name} = %{version}-%{release} | |
146 | Requires: bash-completion >= 2.0 | |
5a9ed503 | 147 | BuildArch: noarch |
71d7c8d4 JB |
148 | |
149 | %description -n bash-completion-tracker3 | |
150 | Bash completion for tracker3 command. | |
151 | ||
152 | %description -n bash-completion-tracker3 -l pl.UTF-8 | |
153 | Bashowe uzupełnianie parametrów dla polecenia tracker3. | |
154 | ||
155 | %package -n vala-tracker3 | |
156 | Summary: Tracker 3 API for Vala language | |
157 | Summary(pl.UTF-8): API Trackera 3 dla języka Vala | |
158 | Group: Development/Libraries | |
159 | Requires: %{name}-devel = %{version}-%{release} | |
160 | Requires: vala >= 2:0.18.0 | |
2c6584a3 | 161 | BuildArch: noarch |
71d7c8d4 JB |
162 | |
163 | %description -n vala-tracker3 | |
164 | Tracker 3 API for Vala language. | |
165 | ||
166 | %description -n vala-tracker3 -l pl.UTF-8 | |
167 | API Trackera 3 dla języka Vala. | |
168 | ||
169 | %prep | |
170 | %setup -q -n tracker-%{version} | |
171 | ||
172 | %build | |
173 | CPPFLAGS="%{rpmcppflags} -I/usr/include/libstemmer" | |
174 | %meson build \ | |
175 | %{!?with_static_libs:--default-library=shared} \ | |
176 | -Dbash_completion_dir=%{bash_compdir} \ | |
177 | %{!?with_apidocs:-Ddocs=false} \ | |
60a48bb4 | 178 | -Dsoup=%{?with_libsoup2:soup2%{?with_libsoup3:,}}%{?with_libsoup3:soup3} \ |
71d7c8d4 JB |
179 | -Dsystemd_user_services_dir=%{systemduserunitdir} \ |
180 | -Dunicode_support=%{?with_icu:icu}%{!?with_icu:unistring} | |
181 | ||
182 | %ninja_build -C build -j1 | |
183 | ||
184 | %install | |
185 | rm -rf $RPM_BUILD_ROOT | |
186 | ||
187 | %ninja_install -C build | |
188 | ||
189 | %if %{with static_libs} | |
190 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/tracker-%{abiver}/libtracker-*.a | |
191 | %endif | |
192 | ||
50fa1ae6 JB |
193 | %if %{with apidocs} |
194 | # FIXME: where to package gi-docgen generated docs? | |
195 | install -d $RPM_BUILD_ROOT%{_gtkdocdir} | |
196 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/Tracker-* $RPM_BUILD_ROOT%{_gtkdocdir} | |
197 | %endif | |
198 | ||
71d7c8d4 JB |
199 | %find_lang tracker3 |
200 | ||
201 | %clean | |
202 | rm -rf $RPM_BUILD_ROOT | |
203 | ||
96fe3c5c JR |
204 | %post |
205 | %systemd_user_post tracker-xdg-portal-3.service | |
206 | ||
207 | %preun | |
208 | %systemd_user_preun tracker-xdg-portal-3.service | |
209 | ||
71d7c8d4 JB |
210 | %post libs -p /sbin/ldconfig |
211 | %postun libs -p /sbin/ldconfig | |
212 | ||
213 | %files -f tracker3.lang | |
214 | %defattr(644,root,root,755) | |
215 | %attr(755,root,root) %{_bindir}/tracker3 | |
216 | %attr(755,root,root) %{_libexecdir}/tracker-xdg-portal-3 | |
217 | %dir %{_libexecdir}/tracker3 | |
218 | %attr(755,root,root) %{_libexecdir}/tracker3/endpoint | |
219 | %attr(755,root,root) %{_libexecdir}/tracker3/export | |
220 | %attr(755,root,root) %{_libexecdir}/tracker3/help | |
221 | %attr(755,root,root) %{_libexecdir}/tracker3/import | |
222 | %attr(755,root,root) %{_libexecdir}/tracker3/sparql | |
223 | %attr(755,root,root) %{_libexecdir}/tracker3/sql | |
224 | %{_datadir}/dbus-1/services/org.freedesktop.portal.Tracker.service | |
225 | %{_datadir}/tracker3 | |
226 | %{systemduserunitdir}/tracker-xdg-portal-3.service | |
227 | %{_mandir}/man1/tracker-xdg-portal-3.1* | |
228 | %{_mandir}/man1/tracker3-endpoint.1* | |
229 | %{_mandir}/man1/tracker3-export.1* | |
230 | %{_mandir}/man1/tracker3-import.1* | |
231 | %{_mandir}/man1/tracker3-sparql.1* | |
232 | %{_mandir}/man1/tracker3-sql.1* | |
233 | ||
234 | %files libs | |
235 | %defattr(644,root,root,755) | |
236 | %doc AUTHORS COPYING MAINTAINERS NEWS README.md | |
237 | %attr(755,root,root) %{_libdir}/libtracker-sparql-%{abiver}.so.*.*.* | |
238 | %attr(755,root,root) %ghost %{_libdir}/libtracker-sparql-%{abiver}.so.0 | |
239 | %{_libdir}/girepository-1.0/Tracker-%{abiver}.typelib | |
d797e1f6 | 240 | %dir %{_libdir}/tracker-%{abiver} |
60a48bb4 JB |
241 | %if %{with libsoup2} |
242 | %attr(755,root,root) %{_libdir}/tracker-%{abiver}/libtracker-http-soup2.so | |
243 | %endif | |
d797e1f6 | 244 | %if %{with libsoup3} |
60a48bb4 | 245 | %attr(755,root,root) %{_libdir}/tracker-%{abiver}/libtracker-http-soup3.so |
d797e1f6 | 246 | %endif |
50fa1ae6 | 247 | %attr(755,root,root) %{_libdir}/tracker-%{abiver}/libtracker-parser-libicu.so |
71d7c8d4 JB |
248 | |
249 | %files devel | |
250 | %defattr(644,root,root,755) | |
251 | %attr(755,root,root) %{_libdir}/libtracker-sparql-%{abiver}.so | |
252 | %{_includedir}/tracker-%{abiver} | |
253 | %{_pkgconfigdir}/tracker-sparql-%{abiver}.pc | |
254 | %{_datadir}/gir-1.0/Tracker-%{abiver}.gir | |
255 | ||
256 | %if %{with static_libs} | |
257 | %files static | |
258 | %defattr(644,root,root,755) | |
259 | %{_libdir}/libtracker-sparql-%{abiver}.a | |
260 | %endif | |
261 | ||
262 | %files testutils | |
263 | %defattr(644,root,root,755) | |
71d7c8d4 JB |
264 | %dir %{_libdir}/tracker-%{abiver}/trackertestutils |
265 | %attr(755,root,root) %{_libdir}/tracker-%{abiver}/trackertestutils/tracker-sandbox | |
266 | %{_libdir}/tracker-%{abiver}/trackertestutils/*.py | |
267 | %{_pkgconfigdir}/tracker-testutils-%{abiver}.pc | |
268 | ||
269 | %if %{with apidocs} | |
270 | %files apidocs | |
271 | %defattr(644,root,root,755) | |
50fa1ae6 | 272 | %{_gtkdocdir}/Tracker-3.0 |
71d7c8d4 JB |
273 | %endif |
274 | ||
275 | %files -n bash-completion-tracker3 | |
276 | %defattr(644,root,root,755) | |
277 | %{bash_compdir}/tracker3 | |
278 | ||
279 | %if %{with vala} | |
280 | %files -n vala-tracker3 | |
281 | %defattr(644,root,root,755) | |
282 | %{_datadir}/vala/vapi/tracker-sparql-%{abiver}.deps | |
283 | %{_datadir}/vala/vapi/tracker-sparql-%{abiver}.vapi | |
284 | %endif |