3 %bcond_without static_libs # static libraries
4 %bcond_without python3 # Python 3.x bindings
5 %bcond_without ruby # Ruby bindings
6 %bcond_without tcl # Tcl bindings
8 Summary: Package dependency solver
9 Summary(pl.UTF-8): Biblioteka do rozwiązywania zależności pakietów
15 #Source0Download: https://github.com/openSUSE/libsolv/releases
16 Source0: https://github.com/openSUSE/libsolv/archive/%{version}/%{name}-%{version}.tar.gz
17 # Source0-md5: 65a205694b45f9c7c28e25a9ccac8726
19 Patch1: %{name}-python.patch
20 Patch2: %{name}-rpm5.patch
21 URL: https://github.com/openSUSE/libsolv
22 BuildRequires: bzip2-devel
23 BuildRequires: cmake >= 2.8.5
24 BuildRequires: db-devel
25 BuildRequires: expat-devel
26 BuildRequires: perl-devel
27 BuildRequires: pkgconfig
28 BuildRequires: python-devel >= 2
29 %{?with_python3:BuildRequires: python3-devel >= 3}
30 BuildRequires: rpm-devel >= 5
31 BuildRequires: rpm-perlprov
32 BuildRequires: rpm-pythonprov
33 BuildRequires: rpmbuild(macros) >= 1.219
34 BuildRequires: swig-perl
35 BuildRequires: swig-python
36 %{?with_tcl:BuildRequires: swig-tcl}
37 BuildRequires: tar >= 1:1.22
38 %{?with_tcl:BuildRequires: tcl-devel}
40 BuildRequires: xz-devel
41 BuildRequires: zchunk-devel
42 BuildRequires: zlib-devel
43 BuildRequires: zstd-devel
45 BuildRequires: rpm-rubyprov
46 BuildRequires: ruby-devel
47 BuildRequires: swig-ruby
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51 %define specflags -D_GNU_SOURCE=1
54 A free package dependency solver using a satisfiability algorithm. The
55 library is based on two major, but independent, blocks:
57 - Using a dictionary approach to store and retrieve package and
58 dependency information.
60 - Using satisfiability, a well known and researched topic, for
61 resolving package dependencies.
63 %description -l pl.UTF-8
64 Wolnodostępna biblioteka do rozwiązywania zależności pakietów przy
65 użyciu algorytmu spełnialności. Biblioteka jest podzielona na dwa
66 główne, niezależne bloki:
68 - wykorzystanie podejścia słownikowego do przechowywania i odtwarzania
69 informacji o pakietach i zależnościach,
71 - wykorzystanie spełnialności - dobrze znanego i zbadanego tematu do
72 rozwiązywania zależności pakietów.
75 Summary: Header files for libsolv libraries
76 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek libsolv
77 Group: Development/Libraries
78 Requires: %{name} = %{version}-%{release}
79 Requires: rpm-devel >= 5
82 Development files for libsolv.
84 %description devel -l pl.UTF-8
85 Pliki programistyczne biblioetk libsolv.
88 Summary: Static libsolv libraries
89 Summary(pl.UTF-8): Statyczne biblioteki libsolv
90 Group: Development/Libraries
91 Requires: %{name}-devel = %{version}-%{release}
94 Static libsolv libraries.
96 %description static -l pl.UTF-8
97 Statyczne biblioteki libsolv.
100 Summary: Package dependency solver tools
101 Summary(pl.UTF-8): Narzędzia do rozwiązywania zależności pakietów
102 Group: Applications/System
103 Requires: %{name} = %{version}-%{release}
109 Package dependency solver tools.
111 %description tools -l pl.UTF-8
112 Narzędzia do rozwiązywania zależności pakietów.
114 %package -n perl-solv
115 Summary: Perl bindings for the libsolv libraries
116 Summary(pl.UTF-8): Wiązania Perla do bibliotek libsolv
117 Group: Development/Languages/Perl
118 Requires: %{name} = %{version}-%{release}
120 %description -n perl-solv
121 Perl bindings for the libsolv libraries.
123 %description -n perl-solv -l pl.UTF-8
124 Wiązania Perla do bibliotek libsolv.
126 %package -n python-solv
127 Summary: Python 2.x bindings for the libsolv library
128 Summary(pl.UTF-8): Wiązania Pythona 2.x do bibliotek libsolv
129 Group: Development/Languages/Python
130 Requires: %{name} = %{version}-%{release}
131 Requires: python-libs
133 %description -n python-solv
134 Python 2.x bindings for the libsolv library.
136 %description -n python-solv -l pl.UTF-8
137 Wiązania Pythona 2.x do bibliotek libsolv.
139 %package -n python3-solv
140 Summary: Python 3.x bindings for the libsolv library
141 Summary(pl.UTF-8): Wiązania Pythona 2.x do bibliotek libsolv
142 Group: Development/Languages/Python
143 Requires: %{name} = %{version}-%{release}
144 Requires: python-libs
146 %description -n python3-solv
147 Python 3.x bindings for the libsolv library.
149 %description -n python3-solv -l pl.UTF-8
150 Wiązania Pythona 3.x do bibliotek libsolv.
152 %package -n ruby-solv
153 Summary: Ruby bindings for the libsolv libraries
154 Summary(pl.UTF-8): Wiązania języka Ruby do bibliotek libsolv
155 Group: Development/Languages
156 Requires: %{name} = %{version}-%{release}
158 %description -n ruby-solv
159 Ruby bindings for the libsolv libraries.
161 %description -n ruby-solv -l pl.UTF-8
162 Wiązania języka Ruby do bibliotek libsolv.
165 Summary: Tcl bindings for the libsolv libraries
166 Summary(pl.UTF-8): Wiązania języka Tcl do bibliotek libsolv
167 Group: Development/Languages
168 Requires: %{name} = %{version}-%{release}
171 %description -n tcl-solv
172 Tcl bindings for the libsolv libraries.
174 %description -n tcl-solv -l pl.UTF-8
175 Wiązania języka Tcl do bibliotek libsolv.
184 %{__rm} cmake/modules/FindRuby.cmake
187 # TODO: -DENABLE_RPMDB_LIBRPM=ON (instead of -DENABLE_RPMDB_BDB), -DENABLE_RPMPKG_LIBRPM=ON after switch to rpm.org (rpm5 is not supported)
189 %define common_opts \\\
190 -DENABLE_APPDATA=ON \\\
191 -DENABLE_BZIP2_COMPRESSION=ON \\\
192 -DENABLE_COMPLEX_DEPS=ON \\\
193 -DENABLE_HELIXREPO=ON \\\
194 -DENABLE_LZMA_COMPRESSION=ON \\\
195 -DENABLE_PUBKEY=ON \\\
196 -DENABLE_RPMDB=ON \\\
197 -DENABLE_RPMDB_BDB=ON \\\
198 -DENABLE_RPMDB_BYRPMHEADER=ON \\\
199 -DENABLE_RPMMD=ON \\\
200 -DENABLE_RPMPKG=ON \\\
201 %{?with_static_libs:-DENABLE_STATIC=ON} \\\
202 -DENABLE_ZCHUNK_COMPRESSION=ON \\\
203 -DENABLE_ZSTD_COMPRESSION=ON \\\
205 -DWITH_SYSTEM_ZCHUNK=ON \\\
208 install -d build %{?with_python3:build-py3}
214 %{?with_ruby:-DENABLE_RUBY=ON} \
215 %{?with_tcl:-DENABLE_TCL=ON} \
216 -DPythonLibs_FIND_VERSION=2 \
217 -DPythonLibs_FIND_VERSION_MAJOR=2 \
226 -DPythonLibs_FIND_VERSION=3 \
227 -DPythonLibs_FIND_VERSION_MAJOR=3
233 rm -rf $RPM_BUILD_ROOT
236 %{__make} -C build-py3/bindings/python install \
237 DESTDIR=$RPM_BUILD_ROOT
240 %{__make} -C build install \
241 DESTDIR=$RPM_BUILD_ROOT
243 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
244 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
248 rm -rf $RPM_BUILD_ROOT
250 %post -p /sbin/ldconfig
251 %postun -p /sbin/ldconfig
254 %defattr(644,root,root,755)
255 %doc CREDITS LICENSE.BSD NEWS README
256 %attr(755,root,root) %{_libdir}/libsolv.so.1
257 %attr(755,root,root) %{_libdir}/libsolvext.so.1
260 %defattr(644,root,root,755)
261 %attr(755,root,root) %{_libdir}/libsolv.so
262 %attr(755,root,root) %{_libdir}/libsolvext.so
264 %{_pkgconfigdir}/libsolv.pc
265 %{_pkgconfigdir}/libsolvext.pc
266 %{_datadir}/cmake/Modules/FindLibSolv.cmake
267 %{_mandir}/man3/libsolv*.3*
269 %if %{with static_libs}
271 %defattr(644,root,root,755)
273 %{_libdir}/libsolvext.a
277 %defattr(644,root,root,755)
278 %attr(755,root,root) %{_bindir}/appdata2solv
279 %attr(755,root,root) %{_bindir}/deltainfoxml2solv
280 %attr(755,root,root) %{_bindir}/dumpsolv
281 %attr(755,root,root) %{_bindir}/helix2solv
282 %attr(755,root,root) %{_bindir}/installcheck
283 %attr(755,root,root) %{_bindir}/mergesolv
284 %attr(755,root,root) %{_bindir}/repo2solv
285 %attr(755,root,root) %{_bindir}/repomdxml2solv
286 %attr(755,root,root) %{_bindir}/rpmdb2solv
287 %attr(755,root,root) %{_bindir}/rpmmd2solv
288 %attr(755,root,root) %{_bindir}/rpms2solv
289 %attr(755,root,root) %{_bindir}/testsolv
290 %attr(755,root,root) %{_bindir}/updateinfoxml2solv
291 %{_mandir}/man1/appdata2solv.1*
292 %{_mandir}/man1/deltainfoxml2solv.1*
293 %{_mandir}/man1/dumpsolv.1*
294 %{_mandir}/man1/helix2solv.1*
295 %{_mandir}/man1/installcheck.1*
296 %{_mandir}/man1/mergesolv.1*
297 %{_mandir}/man1/repo2solv.1*
298 %{_mandir}/man1/repomdxml2solv.1*
299 %{_mandir}/man1/rpmdb2solv.1*
300 %{_mandir}/man1/rpmmd2solv.1*
301 %{_mandir}/man1/rpms2solv.1*
302 %{_mandir}/man1/solv.1*
303 %{_mandir}/man1/testsolv.1*
304 %{_mandir}/man1/updateinfoxml2solv.1*
307 %defattr(644,root,root,755)
309 %attr(755,root,root) %{perl_vendorarch}/solv.so
310 %{perl_vendorarch}/solv.pm
312 %files -n python-solv
313 %defattr(644,root,root,755)
315 %attr(755,root,root) %{py_sitedir}/_solv.so
316 %{py_sitedir}/solv.py[co]
319 %files -n python3-solv
320 %defattr(644,root,root,755)
322 %attr(755,root,root) %{py3_sitedir}/_solv.so
323 %{py3_sitedir}/solv.py
328 %defattr(644,root,root,755)
330 %attr(755,root,root) %{ruby_vendorarchdir}/solv.so
335 %defattr(644,root,root,755)
336 %doc examples/tclsolv
337 %attr(755,root,root) %{_prefix}/lib/tcl8/8.*/solv-%{version}.so
338 %{_prefix}/lib/tcl8/8.*/solv-%{version}.tm