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 %include /usr/lib/rpm/macros.perl
9 Summary: Package dependency solver
10 Summary(pl.UTF-8): Biblioteka do rozwiązywania zależności pakietów
16 Source0: https://github.com/openSUSE/libsolv/archive/%{version}/%{name}-%{version}.tar.gz
17 # Source0-md5: b1fe10e51190a138767aedf010525032
19 Patch1: %{name}-python.patch
20 URL: https://github.com/openSUSE/libsolv
21 BuildRequires: bzip2-devel
22 BuildRequires: cmake >= 2.4
23 BuildRequires: db-devel
24 BuildRequires: expat-devel
25 BuildRequires: perl-devel
26 BuildRequires: pkgconfig
27 BuildRequires: python-devel >= 2
28 %{?with_python3:BuildRequires: python3-devel >= 3}
29 BuildRequires: rpm-devel >= 5
30 BuildRequires: rpm-perlprov
31 BuildRequires: rpm-pythonprov
32 BuildRequires: rpmbuild(macros) >= 1.219
33 BuildRequires: swig-perl
34 BuildRequires: swig-python
35 %{?with_tcl:BuildRequires: swig-tcl}
36 BuildRequires: tar >= 1:1.22
37 %{?with_tcl:BuildRequires: tcl-devel}
39 BuildRequires: xz-devel
40 BuildRequires: zlib-devel
42 BuildRequires: rpm-rubyprov
43 BuildRequires: ruby-devel
44 BuildRequires: swig-ruby
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 A free package dependency solver using a satisfiability algorithm. The
50 library is based on two major, but independent, blocks:
52 - Using a dictionary approach to store and retrieve package and
53 dependency information.
55 - Using satisfiability, a well known and researched topic, for
56 resolving package dependencies.
58 %description -l pl.UTF-8
59 Wolnodostępna biblioteka do rozwiązywania zależności pakietów przy
60 użyciu algorytmu spełnialności. Biblioteka jest podzielona na dwa
61 główne, niezależne bloki:
63 - wykorzystanie podejścia słownikowego do przechowywania i odtwarzania
64 informacji o pakietach i zależnościach,
66 - wykorzystanie spełnialności - dobrze znanego i zbadanego tematu do
67 rozwiązywania zależności pakietów.
70 Summary: Header files for libsolv libraries
71 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek libsolv
72 Group: Development/Libraries
73 Requires: %{name} = %{version}-%{release}
74 Requires: rpm-devel >= 5
77 Development files for libsolv.
79 %description devel -l pl.UTF-8
80 Pliki programistyczne biblioetk libsolv.
83 Summary: Static libsolv libraries
84 Summary(pl.UTF-8): Statyczne biblioteki libsolv
85 Group: Development/Libraries
86 Requires: %{name}-devel = %{version}-%{release}
89 Static libsolv libraries.
91 %description static -l pl.UTF-8
92 Statyczne biblioteki libsolv.
95 Summary: Package dependency solver tools
96 Summary(pl.UTF-8): Narzędzia do rozwiązywania zależności pakietów
97 Group: Applications/System
98 Requires: %{name} = %{version}-%{release}
104 Package dependency solver tools.
106 %description tools -l pl.UTF-8
107 Narzędzia do rozwiązywania zależności pakietów.
109 %package -n perl-solv
110 Summary: Perl bindings for the libsolv libraries
111 Summary(pl.UTF-8): Wiązania Perla do bibliotek libsolv
112 Group: Development/Languages/Perl
113 Requires: %{name} = %{version}-%{release}
115 %description -n perl-solv
116 Perl bindings for the libsolv libraries.
118 %description -n perl-solv -l pl.UTF-8
119 Wiązania Perla do bibliotek libsolv.
121 %package -n python-solv
122 Summary: Python 2.x bindings for the libsolv library
123 Summary(pl.UTF-8): Wiązania Pythona 2.x do bibliotek libsolv
124 Group: Development/Languages/Python
125 Requires: %{name} = %{version}-%{release}
126 Requires: python-libs
128 %description -n python-solv
129 Python 2.x bindings for the libsolv library.
131 %description -n python-solv -l pl.UTF-8
132 Wiązania Pythona 2.x do bibliotek libsolv.
134 %package -n python3-solv
135 Summary: Python 3.x bindings for the libsolv library
136 Summary(pl.UTF-8): Wiązania Pythona 2.x do bibliotek libsolv
137 Group: Development/Languages/Python
138 Requires: %{name} = %{version}-%{release}
139 Requires: python-libs
141 %description -n python3-solv
142 Python 3.x bindings for the libsolv library.
144 %description -n python3-solv -l pl.UTF-8
145 Wiązania Pythona 3.x do bibliotek libsolv.
147 %package -n ruby-solv
148 Summary: Ruby bindings for the libsolv libraries
149 Summary(pl.UTF-8): Wiązania języka Ruby do bibliotek libsolv
150 Group: Development/Languages
151 Requires: %{name} = %{version}-%{release}
153 %description -n ruby-solv
154 Ruby bindings for the libsolv libraries.
156 %description -n ruby-solv -l pl.UTF-8
157 Wiązania języka Ruby do bibliotek libsolv.
160 Summary: Tcl bindings for the libsolv libraries
161 Summary(pl.UTF-8): Wiązania języka Tcl do bibliotek libsolv
162 Group: Development/Languages
163 Requires: %{name} = %{version}-%{release}
166 %description -n tcl-solv
167 Tcl bindings for the libsolv libraries.
169 %description -n tcl-solv -l pl.UTF-8
170 Wiązania języka Tcl do bibliotek libsolv.
178 %{__rm} cmake/modules/FindRuby.cmake
181 install -d build %{?with_python3:build-py3}
184 -DENABLE_APPDATA=ON \
185 -DENABLE_BZIP2_COMPRESSION=ON \
186 -DENABLE_HELIXREPO=ON \
187 -DENABLE_LZMA_COMPRESSION=ON \
192 -DENABLE_RPMDB_BYRPMHEADER=ON \
194 %{?with_ruby:-DENABLE_RUBY=ON} \
195 %{?with_static_libs:-DENABLE_STATIC=ON} \
196 %{?with_tcl:-DENABLE_TCL=ON} \
197 -DPythonLibs_FIND_VERSION=2 \
198 -DPythonLibs_FIND_VERSION_MAJOR=2 \
206 -DENABLE_APPDATA=ON \
207 -DENABLE_BZIP2_COMPRESSION=ON \
208 -DENABLE_LZMA_COMPRESSION=ON \
213 -DENABLE_RPMDB_BYRPMHEADER=ON \
214 -DPythonLibs_FIND_VERSION=3 \
215 -DPythonLibs_FIND_VERSION_MAJOR=3 \
222 rm -rf $RPM_BUILD_ROOT
225 %{__make} -C build-py3/bindings/python install \
226 DESTDIR=$RPM_BUILD_ROOT
229 %{__make} -C build install \
230 DESTDIR=$RPM_BUILD_ROOT
232 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
233 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
237 rm -rf $RPM_BUILD_ROOT
239 %post -p /sbin/ldconfig
240 %postun -p /sbin/ldconfig
243 %defattr(644,root,root,755)
244 %doc BUGS CREDITS LICENSE.BSD NEWS README
245 %attr(755,root,root) %{_libdir}/libsolv.so.0
246 %attr(755,root,root) %{_libdir}/libsolvext.so.0
249 %defattr(644,root,root,755)
250 %attr(755,root,root) %{_libdir}/libsolv.so
251 %attr(755,root,root) %{_libdir}/libsolvext.so
253 %{_pkgconfigdir}/libsolv.pc
254 %{_datadir}/cmake/Modules/FindLibSolv.cmake
255 %{_mandir}/man3/libsolv*.3*
257 %if %{with static_libs}
259 %defattr(644,root,root,755)
261 %{_libdir}/libsolvext.a
265 %defattr(644,root,root,755)
266 %attr(755,root,root) %{_bindir}/appdata2solv
267 %attr(755,root,root) %{_bindir}/deltainfoxml2solv
268 %attr(755,root,root) %{_bindir}/dumpsolv
269 %attr(755,root,root) %{_bindir}/helix2solv
270 %attr(755,root,root) %{_bindir}/installcheck
271 %attr(755,root,root) %{_bindir}/mergesolv
272 %attr(755,root,root) %{_bindir}/repo2solv.sh
273 %attr(755,root,root) %{_bindir}/repomdxml2solv
274 %attr(755,root,root) %{_bindir}/rpmdb2solv
275 %attr(755,root,root) %{_bindir}/rpmmd2solv
276 %attr(755,root,root) %{_bindir}/rpms2solv
277 %attr(755,root,root) %{_bindir}/testsolv
278 %attr(755,root,root) %{_bindir}/updateinfoxml2solv
279 %{_mandir}/man1/appdata2solv.1*
280 %{_mandir}/man1/deltainfoxml2solv.1*
281 %{_mandir}/man1/dumpsolv.1*
282 %{_mandir}/man1/helix2solv.1*
283 %{_mandir}/man1/installcheck.1*
284 %{_mandir}/man1/mergesolv.1*
285 %{_mandir}/man1/repomdxml2solv.1*
286 %{_mandir}/man1/rpmdb2solv.1*
287 %{_mandir}/man1/rpmmd2solv.1*
288 %{_mandir}/man1/rpms2solv.1*
289 %{_mandir}/man1/testsolv.1*
290 %{_mandir}/man1/updateinfoxml2solv.1*
293 %defattr(644,root,root,755)
295 %attr(755,root,root) %{perl_vendorarch}/solv.so
296 %{perl_vendorarch}/solv.pm
298 %files -n python-solv
299 %defattr(644,root,root,755)
301 %attr(755,root,root) %{py_sitedir}/_solv.so
302 %{py_sitedir}/solv.py[co]
305 %files -n python3-solv
306 %defattr(644,root,root,755)
308 %attr(755,root,root) %{py3_sitedir}/_solv.so
309 %{py3_sitedir}/solv.py
314 %defattr(644,root,root,755)
316 %attr(755,root,root) %{ruby_vendorarchdir}/solv.so
321 %defattr(644,root,root,755)
322 %doc examples/tclsolv
323 %attr(755,root,root) %{_prefix}/lib/tcl8/8.*/solv-%{version}.so
324 %{_prefix}/lib/tcl8/8.*/solv-%{version}.tm