]>
Commit | Line | Data |
---|---|---|
48e6f7d6 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # static libraries | |
4 | %bcond_without python3 # Python 3.x bindings | |
409c8105 | 5 | %bcond_with rpm5 # rpm5 fork instead of rpm.org |
c3036d16 | 6 | %bcond_without ruby # Ruby bindings |
f3674f2d | 7 | %bcond_without tcl # Tcl bindings |
c3036d16 | 8 | |
48e6f7d6 JB |
9 | Summary: Package dependency solver |
10 | Summary(pl.UTF-8): Biblioteka do rozwiązywania zależności pakietów | |
11 | Name: libsolv | |
988a1ec7 | 12 | Version: 0.7.29 |
e6f30c6c | 13 | Release: 1 |
48e6f7d6 JB |
14 | License: BSD |
15 | Group: Libraries | |
6aaf0d53 | 16 | #Source0Download: https://github.com/openSUSE/libsolv/tags |
ddf7b6ba | 17 | Source0: https://github.com/openSUSE/libsolv/archive/%{version}/%{name}-%{version}.tar.gz |
988a1ec7 | 18 | # Source0-md5: 659da9b911166f562f64349871ad20c2 |
951d8ff0 | 19 | Patch0: ruby.patch |
8163445e | 20 | Patch2: %{name}-rpm5.patch |
ed361b0e | 21 | Patch3: uname-cpuinfo-deps.patch |
48e6f7d6 JB |
22 | URL: https://github.com/openSUSE/libsolv |
23 | BuildRequires: bzip2-devel | |
38386207 | 24 | BuildRequires: cmake >= 2.8.5 |
48e6f7d6 JB |
25 | BuildRequires: db-devel |
26 | BuildRequires: expat-devel | |
48e6f7d6 JB |
27 | BuildRequires: perl-devel |
28 | BuildRequires: pkgconfig | |
29 | BuildRequires: python-devel >= 2 | |
2352ba5c | 30 | BuildRequires: python-modules >= 2 |
4263e78f | 31 | %{?with_python3:BuildRequires: python3-devel >= 1:3} |
7fe69439 | 32 | BuildRequires: rpm-devel |
48e6f7d6 JB |
33 | BuildRequires: rpm-perlprov |
34 | BuildRequires: rpm-pythonprov | |
409c8105 | 35 | BuildRequires: rpmbuild(macros) >= 1.745 |
c3036d16 ER |
36 | BuildRequires: swig-perl |
37 | BuildRequires: swig-python | |
f3674f2d | 38 | %{?with_tcl:BuildRequires: swig-tcl} |
48e6f7d6 | 39 | BuildRequires: tar >= 1:1.22 |
f3674f2d | 40 | %{?with_tcl:BuildRequires: tcl-devel} |
48e6f7d6 JB |
41 | BuildRequires: xz |
42 | BuildRequires: xz-devel | |
38386207 | 43 | BuildRequires: zchunk-devel |
48e6f7d6 | 44 | BuildRequires: zlib-devel |
38386207 | 45 | BuildRequires: zstd-devel |
c3036d16 ER |
46 | %if %{with ruby} |
47 | BuildRequires: rpm-rubyprov | |
48 | BuildRequires: ruby-devel | |
49 | BuildRequires: swig-ruby | |
50 | %endif | |
48e6f7d6 JB |
51 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
52 | ||
e8a70a90 AM |
53 | %define specflags -D_GNU_SOURCE=1 |
54 | ||
48e6f7d6 JB |
55 | %description |
56 | A free package dependency solver using a satisfiability algorithm. The | |
57 | library is based on two major, but independent, blocks: | |
58 | ||
59 | - Using a dictionary approach to store and retrieve package and | |
60 | dependency information. | |
61 | ||
62 | - Using satisfiability, a well known and researched topic, for | |
63 | resolving package dependencies. | |
64 | ||
65 | %description -l pl.UTF-8 | |
66 | Wolnodostępna biblioteka do rozwiązywania zależności pakietów przy | |
67 | użyciu algorytmu spełnialności. Biblioteka jest podzielona na dwa | |
68 | główne, niezależne bloki: | |
69 | ||
c3036d16 ER |
70 | - wykorzystanie podejścia słownikowego do przechowywania i odtwarzania |
71 | informacji o pakietach i zależnościach, | |
48e6f7d6 JB |
72 | |
73 | - wykorzystanie spełnialności - dobrze znanego i zbadanego tematu do | |
74 | rozwiązywania zależności pakietów. | |
75 | ||
76 | %package devel | |
77 | Summary: Header files for libsolv libraries | |
78 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek libsolv | |
79 | Group: Development/Libraries | |
80 | Requires: %{name} = %{version}-%{release} | |
7fe69439 | 81 | Requires: rpm-devel |
48e6f7d6 JB |
82 | |
83 | %description devel | |
84 | Development files for libsolv. | |
85 | ||
86 | %description devel -l pl.UTF-8 | |
87 | Pliki programistyczne biblioetk libsolv. | |
88 | ||
89 | %package static | |
90 | Summary: Static libsolv libraries | |
91 | Summary(pl.UTF-8): Statyczne biblioteki libsolv | |
92 | Group: Development/Libraries | |
93 | Requires: %{name}-devel = %{version}-%{release} | |
94 | ||
95 | %description static | |
96 | Static libsolv libraries. | |
97 | ||
98 | %description static -l pl.UTF-8 | |
99 | Statyczne biblioteki libsolv. | |
100 | ||
101 | %package tools | |
102 | Summary: Package dependency solver tools | |
103 | Summary(pl.UTF-8): Narzędzia do rozwiązywania zależności pakietów | |
104 | Group: Applications/System | |
105 | Requires: %{name} = %{version}-%{release} | |
106 | Requires: bzip2 | |
107 | Requires: coreutils | |
108 | Requires: gzip | |
109 | ||
110 | %description tools | |
111 | Package dependency solver tools. | |
112 | ||
113 | %description tools -l pl.UTF-8 | |
114 | Narzędzia do rozwiązywania zależności pakietów. | |
115 | ||
116 | %package -n perl-solv | |
117 | Summary: Perl bindings for the libsolv libraries | |
118 | Summary(pl.UTF-8): Wiązania Perla do bibliotek libsolv | |
119 | Group: Development/Languages/Perl | |
120 | Requires: %{name} = %{version}-%{release} | |
121 | ||
122 | %description -n perl-solv | |
123 | Perl bindings for the libsolv libraries. | |
124 | ||
125 | %description -n perl-solv -l pl.UTF-8 | |
126 | Wiązania Perla do bibliotek libsolv. | |
127 | ||
128 | %package -n python-solv | |
129 | Summary: Python 2.x bindings for the libsolv library | |
130 | Summary(pl.UTF-8): Wiązania Pythona 2.x do bibliotek libsolv | |
131 | Group: Development/Languages/Python | |
132 | Requires: %{name} = %{version}-%{release} | |
133 | Requires: python-libs | |
134 | ||
135 | %description -n python-solv | |
136 | Python 2.x bindings for the libsolv library. | |
137 | ||
138 | %description -n python-solv -l pl.UTF-8 | |
139 | Wiązania Pythona 2.x do bibliotek libsolv. | |
140 | ||
141 | %package -n python3-solv | |
142 | Summary: Python 3.x bindings for the libsolv library | |
143 | Summary(pl.UTF-8): Wiązania Pythona 2.x do bibliotek libsolv | |
144 | Group: Development/Languages/Python | |
145 | Requires: %{name} = %{version}-%{release} | |
146 | Requires: python-libs | |
147 | ||
148 | %description -n python3-solv | |
149 | Python 3.x bindings for the libsolv library. | |
150 | ||
151 | %description -n python3-solv -l pl.UTF-8 | |
152 | Wiązania Pythona 3.x do bibliotek libsolv. | |
153 | ||
154 | %package -n ruby-solv | |
155 | Summary: Ruby bindings for the libsolv libraries | |
156 | Summary(pl.UTF-8): Wiązania języka Ruby do bibliotek libsolv | |
157 | Group: Development/Languages | |
158 | Requires: %{name} = %{version}-%{release} | |
159 | ||
160 | %description -n ruby-solv | |
161 | Ruby bindings for the libsolv libraries. | |
162 | ||
163 | %description -n ruby-solv -l pl.UTF-8 | |
164 | Wiązania języka Ruby do bibliotek libsolv. | |
165 | ||
f3674f2d JB |
166 | %package -n tcl-solv |
167 | Summary: Tcl bindings for the libsolv libraries | |
168 | Summary(pl.UTF-8): Wiązania języka Tcl do bibliotek libsolv | |
169 | Group: Development/Languages | |
170 | Requires: %{name} = %{version}-%{release} | |
171 | Requires: tcl | |
172 | ||
173 | %description -n tcl-solv | |
174 | Tcl bindings for the libsolv libraries. | |
175 | ||
176 | %description -n tcl-solv -l pl.UTF-8 | |
177 | Wiązania języka Tcl do bibliotek libsolv. | |
178 | ||
48e6f7d6 | 179 | %prep |
c087059a | 180 | %setup -q |
951d8ff0 | 181 | %patch0 -p1 |
7fe69439 | 182 | %{?with_rpm5:%patch2 -p1} |
ed361b0e | 183 | %patch3 -p1 |
48e6f7d6 | 184 | |
a43c9d7a | 185 | # use system one |
ce97d5b0 | 186 | %{__rm} cmake/modules/FindRuby.cmake |
a43c9d7a | 187 | |
48e6f7d6 | 188 | %build |
8163445e JB |
189 | %define common_opts \\\ |
190 | -DENABLE_APPDATA=ON \\\ | |
191 | -DENABLE_BZIP2_COMPRESSION=ON \\\ | |
f5a13d2b | 192 | -DENABLE_COMPLEX_DEPS=ON \\\ |
8163445e JB |
193 | -DENABLE_HELIXREPO=ON \\\ |
194 | -DENABLE_LZMA_COMPRESSION=ON \\\ | |
195 | -DENABLE_PUBKEY=ON \\\ | |
196 | -DENABLE_RPMDB=ON \\\ | |
efdbc54e | 197 | %{?with_rpm5:-DRPM5=ON} \\\ |
ccd8528e | 198 | %{?with_rpm5:-DENABLE_RPMDB_BDB=ON} \\\ |
efdbc54e | 199 | %{?with_rpm5:-DENABLE_RPMPKG=ON} \\\ |
ccd8528e JR |
200 | %{!?with_rpm5:-DENABLE_RPMDB_LIBRPM=ON} \\\ |
201 | %{!?with_rpm5:-DENABLE_RPMPKG_LIBRPM=ON} \\\ | |
8163445e JB |
202 | -DENABLE_RPMDB_BYRPMHEADER=ON \\\ |
203 | -DENABLE_RPMMD=ON \\\ | |
204 | %{?with_static_libs:-DENABLE_STATIC=ON} \\\ | |
38386207 JB |
205 | -DENABLE_ZCHUNK_COMPRESSION=ON \\\ |
206 | -DENABLE_ZSTD_COMPRESSION=ON \\\ | |
38386207 | 207 | -DWITH_SYSTEM_ZCHUNK=ON \\\ |
8163445e JB |
208 | %{nil} |
209 | ||
48e6f7d6 JB |
210 | install -d build %{?with_python3:build-py3} |
211 | cd build | |
212 | %cmake .. \ | |
8163445e | 213 | %{common_opts} \ |
48e6f7d6 | 214 | -DENABLE_PERL=ON \ |
48e6f7d6 | 215 | -DENABLE_PYTHON=ON \ |
c3036d16 | 216 | %{?with_ruby:-DENABLE_RUBY=ON} \ |
f3674f2d | 217 | %{?with_tcl:-DENABLE_TCL=ON} \ |
48e6f7d6 | 218 | -DPythonLibs_FIND_VERSION=2 \ |
ce97d5b0 | 219 | -DPythonLibs_FIND_VERSION_MAJOR=2 \ |
48e6f7d6 JB |
220 | -DUSE_VENDORDIRS=ON |
221 | ||
222 | %{__make} | |
223 | %if %{with python3} | |
224 | cd ../build-py3 | |
225 | %cmake .. \ | |
8163445e | 226 | %{common_opts} \ |
48e6f7d6 | 227 | -DENABLE_PYTHON=ON \ |
48e6f7d6 | 228 | -DPythonLibs_FIND_VERSION=3 \ |
8163445e | 229 | -DPythonLibs_FIND_VERSION_MAJOR=3 |
48e6f7d6 JB |
230 | |
231 | %{__make} | |
232 | %endif | |
233 | ||
234 | %install | |
235 | rm -rf $RPM_BUILD_ROOT | |
236 | ||
237 | %if %{with python3} | |
238 | %{__make} -C build-py3/bindings/python install \ | |
239 | DESTDIR=$RPM_BUILD_ROOT | |
240 | %endif | |
241 | ||
242 | %{__make} -C build install \ | |
243 | DESTDIR=$RPM_BUILD_ROOT | |
244 | ||
245 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} | |
246 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
247 | %py_postclean | |
248 | ||
249 | %clean | |
250 | rm -rf $RPM_BUILD_ROOT | |
251 | ||
252 | %post -p /sbin/ldconfig | |
253 | %postun -p /sbin/ldconfig | |
254 | ||
255 | %files | |
256 | %defattr(644,root,root,755) | |
8c8e63d4 JR |
257 | %doc CREDITS LICENSE.BSD NEWS README |
258 | %attr(755,root,root) %{_libdir}/libsolv.so.1 | |
259 | %attr(755,root,root) %{_libdir}/libsolvext.so.1 | |
48e6f7d6 JB |
260 | |
261 | %files devel | |
262 | %defattr(644,root,root,755) | |
48e6f7d6 JB |
263 | %attr(755,root,root) %{_libdir}/libsolv.so |
264 | %attr(755,root,root) %{_libdir}/libsolvext.so | |
265 | %{_includedir}/solv | |
f3674f2d | 266 | %{_pkgconfigdir}/libsolv.pc |
05212f1a | 267 | %{_pkgconfigdir}/libsolvext.pc |
48e6f7d6 JB |
268 | %{_datadir}/cmake/Modules/FindLibSolv.cmake |
269 | %{_mandir}/man3/libsolv*.3* | |
270 | ||
271 | %if %{with static_libs} | |
272 | %files static | |
273 | %defattr(644,root,root,755) | |
274 | %{_libdir}/libsolv.a | |
275 | %{_libdir}/libsolvext.a | |
276 | %endif | |
277 | ||
278 | %files tools | |
279 | %defattr(644,root,root,755) | |
c3036d16 | 280 | %attr(755,root,root) %{_bindir}/appdata2solv |
48e6f7d6 JB |
281 | %attr(755,root,root) %{_bindir}/deltainfoxml2solv |
282 | %attr(755,root,root) %{_bindir}/dumpsolv | |
1735d117 | 283 | %attr(755,root,root) %{_bindir}/helix2solv |
48e6f7d6 JB |
284 | %attr(755,root,root) %{_bindir}/installcheck |
285 | %attr(755,root,root) %{_bindir}/mergesolv | |
8c8e63d4 | 286 | %attr(755,root,root) %{_bindir}/repo2solv |
48e6f7d6 JB |
287 | %attr(755,root,root) %{_bindir}/repomdxml2solv |
288 | %attr(755,root,root) %{_bindir}/rpmdb2solv | |
289 | %attr(755,root,root) %{_bindir}/rpmmd2solv | |
290 | %attr(755,root,root) %{_bindir}/rpms2solv | |
48e6f7d6 JB |
291 | %attr(755,root,root) %{_bindir}/testsolv |
292 | %attr(755,root,root) %{_bindir}/updateinfoxml2solv | |
c087059a JR |
293 | %{_mandir}/man1/appdata2solv.1* |
294 | %{_mandir}/man1/deltainfoxml2solv.1* | |
295 | %{_mandir}/man1/dumpsolv.1* | |
1735d117 | 296 | %{_mandir}/man1/helix2solv.1* |
c087059a JR |
297 | %{_mandir}/man1/installcheck.1* |
298 | %{_mandir}/man1/mergesolv.1* | |
8c8e63d4 | 299 | %{_mandir}/man1/repo2solv.1* |
c087059a JR |
300 | %{_mandir}/man1/repomdxml2solv.1* |
301 | %{_mandir}/man1/rpmdb2solv.1* | |
302 | %{_mandir}/man1/rpmmd2solv.1* | |
303 | %{_mandir}/man1/rpms2solv.1* | |
8c8e63d4 | 304 | %{_mandir}/man1/solv.1* |
c087059a JR |
305 | %{_mandir}/man1/testsolv.1* |
306 | %{_mandir}/man1/updateinfoxml2solv.1* | |
48e6f7d6 JB |
307 | |
308 | %files -n perl-solv | |
309 | %defattr(644,root,root,755) | |
310 | %doc examples/p5solv | |
311 | %attr(755,root,root) %{perl_vendorarch}/solv.so | |
312 | %{perl_vendorarch}/solv.pm | |
313 | ||
314 | %files -n python-solv | |
315 | %defattr(644,root,root,755) | |
316 | %doc examples/pysolv | |
317 | %attr(755,root,root) %{py_sitedir}/_solv.so | |
318 | %{py_sitedir}/solv.py[co] | |
319 | ||
320 | %if %{with python3} | |
321 | %files -n python3-solv | |
322 | %defattr(644,root,root,755) | |
323 | %doc examples/pysolv | |
324 | %attr(755,root,root) %{py3_sitedir}/_solv.so | |
325 | %{py3_sitedir}/solv.py | |
326 | %endif | |
327 | ||
c3036d16 | 328 | %if %{with ruby} |
48e6f7d6 JB |
329 | %files -n ruby-solv |
330 | %defattr(644,root,root,755) | |
331 | %doc examples/rbsolv | |
332 | %attr(755,root,root) %{ruby_vendorarchdir}/solv.so | |
c3036d16 | 333 | %endif |
f3674f2d JB |
334 | |
335 | %if %{with tcl} | |
336 | %files -n tcl-solv | |
337 | %defattr(644,root,root,755) | |
338 | %doc examples/tclsolv | |
339 | %attr(755,root,root) %{_prefix}/lib/tcl8/8.*/solv-%{version}.so | |
340 | %{_prefix}/lib/tcl8/8.*/solv-%{version}.tm | |
341 | %endif |