]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without apidocs # API documentation | |
4 | %bcond_with sse # SSE instructions | |
5 | %bcond_with sse2 # SSE2 instructions | |
6 | %bcond_without static_libs # static library | |
7 | ||
8 | %ifarch pentium4 %{x8664} x32 | |
9 | %define with_sse2 1 | |
10 | %endif | |
11 | %ifarch pentium3 pentium4 %{x8664} x32 | |
12 | %define with_sse 1 | |
13 | %endif | |
14 | Summary: The Xapian Probabilistic Information Retrieval Library | |
15 | Summary(pl.UTF-8): Xapian - biblioteka uzyskiwania informacji probabilistycznych | |
16 | Name: xapian-core | |
17 | Version: 1.4.18 | |
18 | Release: 1 | |
19 | License: GPL v2+ | |
20 | Group: Applications/Databases | |
21 | Source0: https://oligarchy.co.uk/xapian/%{version}/%{name}-%{version}.tar.xz | |
22 | # Source0-md5: dd1b30f9b307b06fab319d3258fe65ee | |
23 | URL: https://xapian.org/ | |
24 | BuildRequires: libstdc++-devel >= 6:4.7 | |
25 | BuildRequires: libuuid-devel | |
26 | BuildRequires: rpmbuild(macros) >= 1.752 | |
27 | BuildRequires: tar >= 1:1.22 | |
28 | BuildRequires: xz | |
29 | BuildRequires: zlib-devel | |
30 | Requires: %{name}-libs = %{version}-%{release} | |
31 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
32 | ||
33 | %description | |
34 | Xapian is an Open Source Probabilistic Information Retrieval Library. | |
35 | It offers a highly adaptable toolkit that allows developers to easily | |
36 | add advanced indexing and search facilities to applications. | |
37 | ||
38 | %description -l pl.UTF-8 | |
39 | Xapian to mająca otwarte źródła biblioteka do uzyskiwania informacji | |
40 | probabilistycznych. Oferuje wysoce adoptowalne narzędzia pozwalające | |
41 | programistom łatwo dodawać do aplikacji zaawansowane możliwości | |
42 | indeksowania i wyszukiwania. | |
43 | ||
44 | %package libs | |
45 | Summary: Xapian search engine library | |
46 | Summary(pl.UTF-8): Biblioteka silnika wyszukiwania Xapian | |
47 | Group: Libraries | |
48 | ||
49 | %description libs | |
50 | Xapian is an Open Source Probabilistic Information Retrieval | |
51 | framework. It offers a highly adaptable toolkit that allows developers | |
52 | to easily add advanced indexing and search facilities to applications. | |
53 | This package provides the library for applications using Xapian | |
54 | functionality. | |
55 | ||
56 | %description libs -l pl.UTF-8 | |
57 | Xapian to mająca otwarte źródła biblioteka do uzyskiwania informacji | |
58 | probabilistycznych. Oferuje wysoce adoptowalne narzędzia pozwalające | |
59 | programistom łatwo dodawać do aplikacji zaawansowane możliwości | |
60 | indeksowania i wyszukiwania. Ten pakiet udostępnia bibliotekę dla | |
61 | aplikacji wykorzystujących funkcjonalność Xapiana. | |
62 | ||
63 | %package devel | |
64 | Summary: Files needed for building packages which use Xapian | |
65 | Summary(pl.UTF-8): Pliki niezbędne do tworzenia pakietów wykorzystujących Xapiana | |
66 | Group: Development/Libraries | |
67 | Requires: %{name}-libs = %{version}-%{release} | |
68 | Requires: libstdc++-devel >= 6:4.7 | |
69 | Requires: libuuid-devel | |
70 | Requires: zlib-devel | |
71 | ||
72 | %description devel | |
73 | Xapian is an Open Source Probabilistic Information Retrieval | |
74 | framework. It offers a highly adaptable toolkit that allows developers | |
75 | to easily add advanced indexing and search facilities to applications. | |
76 | This package provides the files needed for building packages which use | |
77 | Xapian. | |
78 | ||
79 | %description devel -l pl.UTF-8 | |
80 | Xapian to mająca otwarte źródła biblioteka do uzyskiwania informacji | |
81 | probabilistycznych. Oferuje wysoce adoptowalne narzędzia pozwalające | |
82 | programistom łatwo dodawać do aplikacji zaawansowane możliwości | |
83 | indeksowania i wyszukiwania. Ten pakiet zawiera pliki niezbędne do | |
84 | tworzenia pakietów wykorzystujących Xapiana. | |
85 | ||
86 | %package static | |
87 | Summary: Static Xapian library | |
88 | Summary(pl.UTF-8): Statyczna biblioteka Xapian | |
89 | Group: Development/Libraries | |
90 | Requires: %{name}-devel = %{version}-%{release} | |
91 | ||
92 | %description static | |
93 | Static Xapian library. | |
94 | ||
95 | %description static -l pl.UTF-8 | |
96 | Statyczna biblioteka Xapian. | |
97 | ||
98 | %package apidocs | |
99 | Summary: Xapian API documentation | |
100 | Summary(pl.UTF-8): Dokumentacja API biblioteki Xapian | |
101 | Group: Documentation | |
102 | BuildArch: noarch | |
103 | ||
104 | %description apidocs | |
105 | API and internal documentation for Xapian library. | |
106 | ||
107 | %description apidocs -l pl.UTF-8 | |
108 | Dokumentacja API i wewnętrzna biblioteki Xapian. | |
109 | ||
110 | %prep | |
111 | %setup -q | |
112 | ||
113 | cp -a examples _examples | |
114 | %{__rm} _examples/Makefile* | |
115 | ||
116 | %build | |
117 | %configure \ | |
118 | --enable-sse=%{!?with_sse:no}%{?with_sse:sse%{?with_sse2:2}} \ | |
119 | --enable-static%{!?with_static_libs:=no} | |
120 | %{__make} | |
121 | ||
122 | %install | |
123 | rm -rf $RPM_BUILD_ROOT | |
124 | ||
125 | %{__make} install \ | |
126 | docdir=%{_docdir}/%{name}-apidocs-%{version} \ | |
127 | DESTDIR=$RPM_BUILD_ROOT | |
128 | ||
129 | %{__make} -C docs install \ | |
130 | docdir=%{_docdir}/%{name}-apidocs-%{version} \ | |
131 | DESTDIR=$RPM_BUILD_ROOT | |
132 | ||
133 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
134 | cp -a ChangeLog.examples _examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
135 | ||
136 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libxapian.la | |
137 | ||
138 | %clean | |
139 | rm -rf $RPM_BUILD_ROOT | |
140 | ||
141 | %post libs -p /sbin/ldconfig | |
142 | %postun libs -p /sbin/ldconfig | |
143 | ||
144 | %files | |
145 | %defattr(644,root,root,755) | |
146 | %doc AUTHORS ChangeLog* HACKING NEWS PLATFORMS README | |
147 | %attr(755,root,root) %{_bindir}/copydatabase | |
148 | %attr(755,root,root) %{_bindir}/quest | |
149 | %attr(755,root,root) %{_bindir}/simpleexpand | |
150 | %attr(755,root,root) %{_bindir}/simpleindex | |
151 | %attr(755,root,root) %{_bindir}/simplesearch | |
152 | %attr(755,root,root) %{_bindir}/xapian-check | |
153 | %attr(755,root,root) %{_bindir}/xapian-compact | |
154 | %attr(755,root,root) %{_bindir}/xapian-delve | |
155 | %attr(755,root,root) %{_bindir}/xapian-metadata | |
156 | %attr(755,root,root) %{_bindir}/xapian-pos | |
157 | %attr(755,root,root) %{_bindir}/xapian-progsrv | |
158 | %attr(755,root,root) %{_bindir}/xapian-replicate | |
159 | %attr(755,root,root) %{_bindir}/xapian-replicate-server | |
160 | %attr(755,root,root) %{_bindir}/xapian-tcpsrv | |
161 | %{_datadir}/xapian-core | |
162 | %{_mandir}/man1/copydatabase.1* | |
163 | %{_mandir}/man1/quest.1* | |
164 | %{_mandir}/man1/xapian-check.1* | |
165 | %{_mandir}/man1/xapian-compact.1* | |
166 | %{_mandir}/man1/xapian-config.1* | |
167 | %{_mandir}/man1/xapian-delve.1* | |
168 | %{_mandir}/man1/xapian-metadata.1* | |
169 | %{_mandir}/man1/xapian-pos.1* | |
170 | %{_mandir}/man1/xapian-progsrv.1* | |
171 | %{_mandir}/man1/xapian-replicate.1* | |
172 | %{_mandir}/man1/xapian-replicate-server.1* | |
173 | %{_mandir}/man1/xapian-tcpsrv.1* | |
174 | ||
175 | %files libs | |
176 | %defattr(644,root,root,755) | |
177 | %attr(755,root,root) %{_libdir}/libxapian.so.*.*.* | |
178 | %attr(755,root,root) %ghost %{_libdir}/libxapian.so.30 | |
179 | ||
180 | %files devel | |
181 | %defattr(644,root,root,755) | |
182 | %attr(755,root,root) %{_bindir}/xapian-config | |
183 | %attr(755,root,root) %{_libdir}/libxapian.so | |
184 | %{_libdir}/cmake/xapian | |
185 | %{_includedir}/xapian | |
186 | %{_includedir}/xapian.h | |
187 | %{_pkgconfigdir}/xapian-core.pc | |
188 | %{_aclocaldir}/xapian.m4 | |
189 | %{_examplesdir}/%{name}-%{version} | |
190 | ||
191 | %if %{with static_libs} | |
192 | %files static | |
193 | %defattr(644,root,root,755) | |
194 | %{_libdir}/libxapian.a | |
195 | %endif | |
196 | ||
197 | %if %{with apidocs} | |
198 | %files apidocs | |
199 | %defattr(644,root,root,755) | |
200 | %dir %{_docdir}/%{name}-apidocs-%{version} | |
201 | %{_docdir}/%{name}-apidocs-%{version}/*.html | |
202 | %{_docdir}/%{name}-apidocs-%{version}/apidoc | |
203 | %endif |