3 %bcond_without static_libs # static libraries
4 %bcond_without python3 # Python 3.x bindings
5 %bcond_with rpm5 # rpm5 fork instead of rpm.org
6 %bcond_without ruby # Ruby bindings
7 %bcond_without tcl # Tcl bindings
9 Summary: Package dependency solver
10 Summary(pl.UTF-8): Biblioteka do rozwiązywania zależności pakietów
16 #Source0Download: https://github.com/openSUSE/libsolv/releases
17 Source0: https://github.com/openSUSE/libsolv/archive/%{version}/%{name}-%{version}.tar.gz
18 # Source0-md5: 0c0394275be0c5eff1e76abacfb28705
20 Patch1: %{name}-python.patch
21 Patch2: %{name}-rpm5.patch
22 URL: https://github.com/openSUSE/libsolv
23 BuildRequires: bzip2-devel
24 BuildRequires: cmake >= 2.8.5
25 BuildRequires: db-devel
26 BuildRequires: expat-devel
27 BuildRequires: perl-devel
28 BuildRequires: pkgconfig
29 BuildRequires: python-devel >= 2
30 %{?with_python3:BuildRequires: python3-devel >= 3}
31 BuildRequires: rpm-devel
32 BuildRequires: rpm-perlprov
33 BuildRequires: rpm-pythonprov
34 BuildRequires: rpmbuild(macros) >= 1.745
35 BuildRequires: swig-perl
36 BuildRequires: swig-python
37 %{?with_tcl:BuildRequires: swig-tcl}
38 BuildRequires: tar >= 1:1.22
39 %{?with_tcl:BuildRequires: tcl-devel}
41 BuildRequires: xz-devel
42 BuildRequires: zchunk-devel
43 BuildRequires: zlib-devel
44 BuildRequires: zstd-devel
46 BuildRequires: rpm-rubyprov
47 BuildRequires: ruby-devel
48 BuildRequires: swig-ruby
50 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 %define specflags -D_GNU_SOURCE=1
55 A free package dependency solver using a satisfiability algorithm. The
56 library is based on two major, but independent, blocks:
58 - Using a dictionary approach to store and retrieve package and
59 dependency information.
61 - Using satisfiability, a well known and researched topic, for
62 resolving package dependencies.
64 %description -l pl.UTF-8
65 Wolnodostępna biblioteka do rozwiązywania zależności pakietów przy
66 użyciu algorytmu spełnialności. Biblioteka jest podzielona na dwa
67 główne, niezależne bloki:
69 - wykorzystanie podejścia słownikowego do przechowywania i odtwarzania
70 informacji o pakietach i zależnościach,
72 - wykorzystanie spełnialności - dobrze znanego i zbadanego tematu do
73 rozwiązywania zależności pakietów.
76 Summary: Header files for libsolv libraries
77 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek libsolv
78 Group: Development/Libraries
79 Requires: %{name} = %{version}-%{release}
83 Development files for libsolv.
85 %description devel -l pl.UTF-8
86 Pliki programistyczne biblioetk libsolv.
89 Summary: Static libsolv libraries
90 Summary(pl.UTF-8): Statyczne biblioteki libsolv
91 Group: Development/Libraries
92 Requires: %{name}-devel = %{version}-%{release}
95 Static libsolv libraries.
97 %description static -l pl.UTF-8
98 Statyczne biblioteki libsolv.
101 Summary: Package dependency solver tools
102 Summary(pl.UTF-8): Narzędzia do rozwiązywania zależności pakietów
103 Group: Applications/System
104 Requires: %{name} = %{version}-%{release}
110 Package dependency solver tools.
112 %description tools -l pl.UTF-8
113 Narzędzia do rozwiązywania zależności pakietów.
115 %package -n perl-solv
116 Summary: Perl bindings for the libsolv libraries
117 Summary(pl.UTF-8): Wiązania Perla do bibliotek libsolv
118 Group: Development/Languages/Perl
119 Requires: %{name} = %{version}-%{release}
121 %description -n perl-solv
122 Perl bindings for the libsolv libraries.
124 %description -n perl-solv -l pl.UTF-8
125 Wiązania Perla do bibliotek libsolv.
127 %package -n python-solv
128 Summary: Python 2.x bindings for the libsolv library
129 Summary(pl.UTF-8): Wiązania Pythona 2.x do bibliotek libsolv
130 Group: Development/Languages/Python
131 Requires: %{name} = %{version}-%{release}
132 Requires: python-libs
134 %description -n python-solv
135 Python 2.x bindings for the libsolv library.
137 %description -n python-solv -l pl.UTF-8
138 Wiązania Pythona 2.x do bibliotek libsolv.
140 %package -n python3-solv
141 Summary: Python 3.x bindings for the libsolv library
142 Summary(pl.UTF-8): Wiązania Pythona 2.x do bibliotek libsolv
143 Group: Development/Languages/Python
144 Requires: %{name} = %{version}-%{release}
145 Requires: python-libs
147 %description -n python3-solv
148 Python 3.x bindings for the libsolv library.
150 %description -n python3-solv -l pl.UTF-8
151 Wiązania Pythona 3.x do bibliotek libsolv.
153 %package -n ruby-solv
154 Summary: Ruby bindings for the libsolv libraries
155 Summary(pl.UTF-8): Wiązania języka Ruby do bibliotek libsolv
156 Group: Development/Languages
157 Requires: %{name} = %{version}-%{release}
159 %description -n ruby-solv
160 Ruby bindings for the libsolv libraries.
162 %description -n ruby-solv -l pl.UTF-8
163 Wiązania języka Ruby do bibliotek libsolv.
166 Summary: Tcl bindings for the libsolv libraries
167 Summary(pl.UTF-8): Wiązania języka Tcl do bibliotek libsolv
168 Group: Development/Languages
169 Requires: %{name} = %{version}-%{release}
172 %description -n tcl-solv
173 Tcl bindings for the libsolv libraries.
175 %description -n tcl-solv -l pl.UTF-8
176 Wiązania języka Tcl do bibliotek libsolv.
182 %{?with_rpm5:%patch2 -p1}
185 %{__rm} cmake/modules/FindRuby.cmake
188 %define common_opts \\\
189 -DENABLE_APPDATA=ON \\\
190 -DENABLE_BZIP2_COMPRESSION=ON \\\
191 -DENABLE_COMPLEX_DEPS=ON \\\
192 -DENABLE_HELIXREPO=ON \\\
193 -DENABLE_LZMA_COMPRESSION=ON \\\
194 -DENABLE_PUBKEY=ON \\\
195 -DENABLE_RPMDB=ON \\\
196 %{?with_rpm5:-DRPM5=ON} \\\
197 %{?with_rpm5:-DENABLE_RPMDB_BDB=ON} \\\
198 %{?with_rpm5:-DENABLE_RPMPKG=ON} \\\
199 %{!?with_rpm5:-DENABLE_RPMDB_LIBRPM=ON} \\\
200 %{!?with_rpm5:-DENABLE_RPMPKG_LIBRPM=ON} \\\
201 -DENABLE_RPMDB_BYRPMHEADER=ON \\\
202 -DENABLE_RPMMD=ON \\\
203 %{?with_static_libs:-DENABLE_STATIC=ON} \\\
204 -DENABLE_ZCHUNK_COMPRESSION=ON \\\
205 -DENABLE_ZSTD_COMPRESSION=ON \\\
206 -DWITH_SYSTEM_ZCHUNK=ON \\\
209 install -d build %{?with_python3:build-py3}
215 %{?with_ruby:-DENABLE_RUBY=ON} \
216 %{?with_tcl:-DENABLE_TCL=ON} \
217 -DPythonLibs_FIND_VERSION=2 \
218 -DPythonLibs_FIND_VERSION_MAJOR=2 \
227 -DPythonLibs_FIND_VERSION=3 \
228 -DPythonLibs_FIND_VERSION_MAJOR=3
234 rm -rf $RPM_BUILD_ROOT
237 %{__make} -C build-py3/bindings/python install \
238 DESTDIR=$RPM_BUILD_ROOT
241 %{__make} -C build install \
242 DESTDIR=$RPM_BUILD_ROOT
244 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
245 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
249 rm -rf $RPM_BUILD_ROOT
251 %post -p /sbin/ldconfig
252 %postun -p /sbin/ldconfig
255 %defattr(644,root,root,755)
256 %doc CREDITS LICENSE.BSD NEWS README
257 %attr(755,root,root) %{_libdir}/libsolv.so.1
258 %attr(755,root,root) %{_libdir}/libsolvext.so.1
261 %defattr(644,root,root,755)
262 %attr(755,root,root) %{_libdir}/libsolv.so
263 %attr(755,root,root) %{_libdir}/libsolvext.so
265 %{_pkgconfigdir}/libsolv.pc
266 %{_pkgconfigdir}/libsolvext.pc
267 %{_datadir}/cmake/Modules/FindLibSolv.cmake
268 %{_mandir}/man3/libsolv*.3*
270 %if %{with static_libs}
272 %defattr(644,root,root,755)
274 %{_libdir}/libsolvext.a
278 %defattr(644,root,root,755)
279 %attr(755,root,root) %{_bindir}/appdata2solv
280 %attr(755,root,root) %{_bindir}/deltainfoxml2solv
281 %attr(755,root,root) %{_bindir}/dumpsolv
282 %attr(755,root,root) %{_bindir}/helix2solv
283 %attr(755,root,root) %{_bindir}/installcheck
284 %attr(755,root,root) %{_bindir}/mergesolv
285 %attr(755,root,root) %{_bindir}/repo2solv
286 %attr(755,root,root) %{_bindir}/repomdxml2solv
287 %attr(755,root,root) %{_bindir}/rpmdb2solv
288 %attr(755,root,root) %{_bindir}/rpmmd2solv
289 %attr(755,root,root) %{_bindir}/rpms2solv
290 %attr(755,root,root) %{_bindir}/testsolv
291 %attr(755,root,root) %{_bindir}/updateinfoxml2solv
292 %{_mandir}/man1/appdata2solv.1*
293 %{_mandir}/man1/deltainfoxml2solv.1*
294 %{_mandir}/man1/dumpsolv.1*
295 %{_mandir}/man1/helix2solv.1*
296 %{_mandir}/man1/installcheck.1*
297 %{_mandir}/man1/mergesolv.1*
298 %{_mandir}/man1/repo2solv.1*
299 %{_mandir}/man1/repomdxml2solv.1*
300 %{_mandir}/man1/rpmdb2solv.1*
301 %{_mandir}/man1/rpmmd2solv.1*
302 %{_mandir}/man1/rpms2solv.1*
303 %{_mandir}/man1/solv.1*
304 %{_mandir}/man1/testsolv.1*
305 %{_mandir}/man1/updateinfoxml2solv.1*
308 %defattr(644,root,root,755)
310 %attr(755,root,root) %{perl_vendorarch}/solv.so
311 %{perl_vendorarch}/solv.pm
313 %files -n python-solv
314 %defattr(644,root,root,755)
316 %attr(755,root,root) %{py_sitedir}/_solv.so
317 %{py_sitedir}/solv.py[co]
320 %files -n python3-solv
321 %defattr(644,root,root,755)
323 %attr(755,root,root) %{py3_sitedir}/_solv.so
324 %{py3_sitedir}/solv.py
329 %defattr(644,root,root,755)
331 %attr(755,root,root) %{ruby_vendorarchdir}/solv.so
336 %defattr(644,root,root,755)
337 %doc examples/tclsolv
338 %attr(755,root,root) %{_prefix}/lib/tcl8/8.*/solv-%{version}.so
339 %{_prefix}/lib/tcl8/8.*/solv-%{version}.tm