]>
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 | |
d45b1e2e | 14 | Version: 3.7.1 |
50fa1ae6 | 15 | Release: 1 |
71d7c8d4 JB |
16 | License: GPL v2+ |
17 | Group: Applications | |
54ee60f3 | 18 | Source0: https://download.gnome.org/sources/tracker/3.7/tracker-%{version}.tar.xz |
d45b1e2e | 19 | # Source0-md5: 63357a4966867fa86b7f899283de075e |
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 | |
e8f911f0 | 39 | BuildRequires: meson >= 0.62 |
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 |
f5b111f6 | 45 | BuildRequires: rpmbuild(macros) >= 2.029 |
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 | |
2c6584a3 | 132 | BuildArch: noarch |
71d7c8d4 JB |
133 | |
134 | %description apidocs | |
135 | Tracker 3 library API documentation. | |
136 | ||
137 | %description apidocs -l pl.UTF-8 | |
138 | Dokumentacja API biblioteki Trackera 3. | |
139 | ||
140 | %package -n bash-completion-tracker3 | |
141 | Summary: Bash completion for tracker3 command | |
142 | Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia tracker3 | |
143 | Group: Applications/Shells | |
144 | Requires: %{name} = %{version}-%{release} | |
54ee60f3 | 145 | Requires: bash-completion >= 1:2.0 |
5a9ed503 | 146 | BuildArch: noarch |
71d7c8d4 JB |
147 | |
148 | %description -n bash-completion-tracker3 | |
149 | Bash completion for tracker3 command. | |
150 | ||
151 | %description -n bash-completion-tracker3 -l pl.UTF-8 | |
152 | Bashowe uzupełnianie parametrów dla polecenia tracker3. | |
153 | ||
154 | %package -n vala-tracker3 | |
155 | Summary: Tracker 3 API for Vala language | |
156 | Summary(pl.UTF-8): API Trackera 3 dla języka Vala | |
157 | Group: Development/Libraries | |
158 | Requires: %{name}-devel = %{version}-%{release} | |
159 | Requires: vala >= 2:0.18.0 | |
2c6584a3 | 160 | BuildArch: noarch |
71d7c8d4 JB |
161 | |
162 | %description -n vala-tracker3 | |
163 | Tracker 3 API for Vala language. | |
164 | ||
165 | %description -n vala-tracker3 -l pl.UTF-8 | |
166 | API Trackera 3 dla języka Vala. | |
167 | ||
168 | %prep | |
169 | %setup -q -n tracker-%{version} | |
170 | ||
171 | %build | |
172 | CPPFLAGS="%{rpmcppflags} -I/usr/include/libstemmer" | |
173 | %meson build \ | |
174 | %{!?with_static_libs:--default-library=shared} \ | |
175 | -Dbash_completion_dir=%{bash_compdir} \ | |
176 | %{!?with_apidocs:-Ddocs=false} \ | |
60a48bb4 | 177 | -Dsoup=%{?with_libsoup2:soup2%{?with_libsoup3:,}}%{?with_libsoup3:soup3} \ |
71d7c8d4 JB |
178 | -Dsystemd_user_services_dir=%{systemduserunitdir} \ |
179 | -Dunicode_support=%{?with_icu:icu}%{!?with_icu:unistring} | |
180 | ||
181 | %ninja_build -C build -j1 | |
182 | ||
183 | %install | |
184 | rm -rf $RPM_BUILD_ROOT | |
185 | ||
186 | %ninja_install -C build | |
187 | ||
188 | %if %{with static_libs} | |
189 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/tracker-%{abiver}/libtracker-*.a | |
190 | %endif | |
191 | ||
50fa1ae6 | 192 | %if %{with apidocs} |
f5b111f6 JB |
193 | install -d $RPM_BUILD_ROOT%{_gidocdir} |
194 | %{__mv} $RPM_BUILD_ROOT%{_docdir}/Tracker-* $RPM_BUILD_ROOT%{_gidocdir} | |
50fa1ae6 JB |
195 | %endif |
196 | ||
71d7c8d4 JB |
197 | %find_lang tracker3 |
198 | ||
199 | %clean | |
200 | rm -rf $RPM_BUILD_ROOT | |
201 | ||
96fe3c5c JR |
202 | %post |
203 | %systemd_user_post tracker-xdg-portal-3.service | |
204 | ||
205 | %preun | |
206 | %systemd_user_preun tracker-xdg-portal-3.service | |
207 | ||
71d7c8d4 JB |
208 | %post libs -p /sbin/ldconfig |
209 | %postun libs -p /sbin/ldconfig | |
210 | ||
211 | %files -f tracker3.lang | |
212 | %defattr(644,root,root,755) | |
213 | %attr(755,root,root) %{_bindir}/tracker3 | |
54ee60f3 JB |
214 | %attr(755,root,root) %{_bindir}/tracker3-endpoint |
215 | %attr(755,root,root) %{_bindir}/tracker3-export | |
216 | %attr(755,root,root) %{_bindir}/tracker3-help | |
217 | %attr(755,root,root) %{_bindir}/tracker3-import | |
218 | %attr(755,root,root) %{_bindir}/tracker3-sparql | |
219 | %attr(755,root,root) %{_bindir}/tracker3-sql | |
71d7c8d4 | 220 | %attr(755,root,root) %{_libexecdir}/tracker-xdg-portal-3 |
71d7c8d4 JB |
221 | %{_datadir}/dbus-1/services/org.freedesktop.portal.Tracker.service |
222 | %{_datadir}/tracker3 | |
223 | %{systemduserunitdir}/tracker-xdg-portal-3.service | |
224 | %{_mandir}/man1/tracker-xdg-portal-3.1* | |
225 | %{_mandir}/man1/tracker3-endpoint.1* | |
226 | %{_mandir}/man1/tracker3-export.1* | |
227 | %{_mandir}/man1/tracker3-import.1* | |
228 | %{_mandir}/man1/tracker3-sparql.1* | |
229 | %{_mandir}/man1/tracker3-sql.1* | |
230 | ||
231 | %files libs | |
232 | %defattr(644,root,root,755) | |
233 | %doc AUTHORS COPYING MAINTAINERS NEWS README.md | |
234 | %attr(755,root,root) %{_libdir}/libtracker-sparql-%{abiver}.so.*.*.* | |
235 | %attr(755,root,root) %ghost %{_libdir}/libtracker-sparql-%{abiver}.so.0 | |
236 | %{_libdir}/girepository-1.0/Tracker-%{abiver}.typelib | |
d797e1f6 | 237 | %dir %{_libdir}/tracker-%{abiver} |
60a48bb4 JB |
238 | %if %{with libsoup2} |
239 | %attr(755,root,root) %{_libdir}/tracker-%{abiver}/libtracker-http-soup2.so | |
240 | %endif | |
d797e1f6 | 241 | %if %{with libsoup3} |
60a48bb4 | 242 | %attr(755,root,root) %{_libdir}/tracker-%{abiver}/libtracker-http-soup3.so |
d797e1f6 | 243 | %endif |
50fa1ae6 | 244 | %attr(755,root,root) %{_libdir}/tracker-%{abiver}/libtracker-parser-libicu.so |
71d7c8d4 JB |
245 | |
246 | %files devel | |
247 | %defattr(644,root,root,755) | |
248 | %attr(755,root,root) %{_libdir}/libtracker-sparql-%{abiver}.so | |
249 | %{_includedir}/tracker-%{abiver} | |
250 | %{_pkgconfigdir}/tracker-sparql-%{abiver}.pc | |
251 | %{_datadir}/gir-1.0/Tracker-%{abiver}.gir | |
252 | ||
253 | %if %{with static_libs} | |
254 | %files static | |
255 | %defattr(644,root,root,755) | |
256 | %{_libdir}/libtracker-sparql-%{abiver}.a | |
257 | %endif | |
258 | ||
259 | %files testutils | |
260 | %defattr(644,root,root,755) | |
71d7c8d4 | 261 | %dir %{_libdir}/tracker-%{abiver}/trackertestutils |
e8f911f0 | 262 | %attr(755,root,root) %{_libdir}/tracker-%{abiver}/trackertestutils/tracker-await-file |
71d7c8d4 JB |
263 | %attr(755,root,root) %{_libdir}/tracker-%{abiver}/trackertestutils/tracker-sandbox |
264 | %{_libdir}/tracker-%{abiver}/trackertestutils/*.py | |
e8f911f0 | 265 | %{_libdir}/tracker-%{abiver}/trackertestutils/await_file |
71d7c8d4 JB |
266 | %{_pkgconfigdir}/tracker-testutils-%{abiver}.pc |
267 | ||
268 | %if %{with apidocs} | |
269 | %files apidocs | |
270 | %defattr(644,root,root,755) | |
f5b111f6 | 271 | %{_gidocdir}/Tracker-3.0 |
71d7c8d4 JB |
272 | %endif |
273 | ||
274 | %files -n bash-completion-tracker3 | |
275 | %defattr(644,root,root,755) | |
276 | %{bash_compdir}/tracker3 | |
277 | ||
278 | %if %{with vala} | |
279 | %files -n vala-tracker3 | |
280 | %defattr(644,root,root,755) | |
281 | %{_datadir}/vala/vapi/tracker-sparql-%{abiver}.deps | |
282 | %{_datadir}/vala/vapi/tracker-sparql-%{abiver}.vapi | |
283 | %endif |