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 #Source0Download: https://github.com/openSUSE/libsolv/releases
17 Source0: https://github.com/openSUSE/libsolv/archive/%{version}/%{name}-%{version}.tar.gz
18 # Source0-md5: b61f8268a60086ae6fbf7a3454d669cb
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.4
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 >= 5
32 BuildRequires: rpm-perlprov
33 BuildRequires: rpm-pythonprov
34 BuildRequires: rpmbuild(macros) >= 1.219
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: zlib-devel
44 BuildRequires: rpm-rubyprov
45 BuildRequires: ruby-devel
46 BuildRequires: swig-ruby
48 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51 A free package dependency solver using a satisfiability algorithm. The
52 library is based on two major, but independent, blocks:
54 - Using a dictionary approach to store and retrieve package and
55 dependency information.
57 - Using satisfiability, a well known and researched topic, for
58 resolving package dependencies.
60 %description -l pl.UTF-8
61 Wolnodostępna biblioteka do rozwiązywania zależności pakietów przy
62 użyciu algorytmu spełnialności. Biblioteka jest podzielona na dwa
63 główne, niezależne bloki:
65 - wykorzystanie podejścia słownikowego do przechowywania i odtwarzania
66 informacji o pakietach i zależnościach,
68 - wykorzystanie spełnialności - dobrze znanego i zbadanego tematu do
69 rozwiązywania zależności pakietów.
72 Summary: Header files for libsolv libraries
73 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek libsolv
74 Group: Development/Libraries
75 Requires: %{name} = %{version}-%{release}
76 Requires: rpm-devel >= 5
79 Development files for libsolv.
81 %description devel -l pl.UTF-8
82 Pliki programistyczne biblioetk libsolv.
85 Summary: Static libsolv libraries
86 Summary(pl.UTF-8): Statyczne biblioteki libsolv
87 Group: Development/Libraries
88 Requires: %{name}-devel = %{version}-%{release}
91 Static libsolv libraries.
93 %description static -l pl.UTF-8
94 Statyczne biblioteki libsolv.
97 Summary: Package dependency solver tools
98 Summary(pl.UTF-8): Narzędzia do rozwiązywania zależności pakietów
99 Group: Applications/System
100 Requires: %{name} = %{version}-%{release}
106 Package dependency solver tools.
108 %description tools -l pl.UTF-8
109 Narzędzia do rozwiązywania zależności pakietów.
111 %package -n perl-solv
112 Summary: Perl bindings for the libsolv libraries
113 Summary(pl.UTF-8): Wiązania Perla do bibliotek libsolv
114 Group: Development/Languages/Perl
115 Requires: %{name} = %{version}-%{release}
117 %description -n perl-solv
118 Perl bindings for the libsolv libraries.
120 %description -n perl-solv -l pl.UTF-8
121 Wiązania Perla do bibliotek libsolv.
123 %package -n python-solv
124 Summary: Python 2.x bindings for the libsolv library
125 Summary(pl.UTF-8): Wiązania Pythona 2.x do bibliotek libsolv
126 Group: Development/Languages/Python
127 Requires: %{name} = %{version}-%{release}
128 Requires: python-libs
130 %description -n python-solv
131 Python 2.x bindings for the libsolv library.
133 %description -n python-solv -l pl.UTF-8
134 Wiązania Pythona 2.x do bibliotek libsolv.
136 %package -n python3-solv
137 Summary: Python 3.x bindings for the libsolv library
138 Summary(pl.UTF-8): Wiązania Pythona 2.x do bibliotek libsolv
139 Group: Development/Languages/Python
140 Requires: %{name} = %{version}-%{release}
141 Requires: python-libs
143 %description -n python3-solv
144 Python 3.x bindings for the libsolv library.
146 %description -n python3-solv -l pl.UTF-8
147 Wiązania Pythona 3.x do bibliotek libsolv.
149 %package -n ruby-solv
150 Summary: Ruby bindings for the libsolv libraries
151 Summary(pl.UTF-8): Wiązania języka Ruby do bibliotek libsolv
152 Group: Development/Languages
153 Requires: %{name} = %{version}-%{release}
155 %description -n ruby-solv
156 Ruby bindings for the libsolv libraries.
158 %description -n ruby-solv -l pl.UTF-8
159 Wiązania języka Ruby do bibliotek libsolv.
162 Summary: Tcl bindings for the libsolv libraries
163 Summary(pl.UTF-8): Wiązania języka Tcl do bibliotek libsolv
164 Group: Development/Languages
165 Requires: %{name} = %{version}-%{release}
168 %description -n tcl-solv
169 Tcl bindings for the libsolv libraries.
171 %description -n tcl-solv -l pl.UTF-8
172 Wiązania języka Tcl do bibliotek libsolv.
181 %{__rm} cmake/modules/FindRuby.cmake
184 # TODO: -DENABLE_RPMDB_LIBRPM=ON -DENABLE_RPMPKG_LIBRPM=ON (rpm5 not supported)
186 %define common_opts \\\
187 -DENABLE_APPDATA=ON \\\
188 -DENABLE_BZIP2_COMPRESSION=ON \\\
189 -DENABLE_HELIXREPO=ON \\\
190 -DENABLE_LZMA_COMPRESSION=ON \\\
191 -DENABLE_PUBKEY=ON \\\
192 -DENABLE_RPMDB=ON \\\
193 -DENABLE_RPMDB_BYRPMHEADER=ON \\\
194 -DENABLE_RPMMD=ON \\\
195 %{?with_static_libs:-DENABLE_STATIC=ON} \\\
199 install -d build %{?with_python3:build-py3}
205 %{?with_ruby:-DENABLE_RUBY=ON} \
206 %{?with_tcl:-DENABLE_TCL=ON} \
207 -DPythonLibs_FIND_VERSION=2 \
208 -DPythonLibs_FIND_VERSION_MAJOR=2 \
217 -DPythonLibs_FIND_VERSION=3 \
218 -DPythonLibs_FIND_VERSION_MAJOR=3
224 rm -rf $RPM_BUILD_ROOT
227 %{__make} -C build-py3/bindings/python install \
228 DESTDIR=$RPM_BUILD_ROOT
231 %{__make} -C build install \
232 DESTDIR=$RPM_BUILD_ROOT
234 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
235 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
239 rm -rf $RPM_BUILD_ROOT
241 %post -p /sbin/ldconfig
242 %postun -p /sbin/ldconfig
245 %defattr(644,root,root,755)
246 %doc BUGS CREDITS LICENSE.BSD NEWS README
247 %attr(755,root,root) %{_libdir}/libsolv.so.0
248 %attr(755,root,root) %{_libdir}/libsolvext.so.0
251 %defattr(644,root,root,755)
252 %attr(755,root,root) %{_libdir}/libsolv.so
253 %attr(755,root,root) %{_libdir}/libsolvext.so
255 %{_pkgconfigdir}/libsolv.pc
256 %{_pkgconfigdir}/libsolvext.pc
257 %{_datadir}/cmake/Modules/FindLibSolv.cmake
258 %{_mandir}/man3/libsolv*.3*
260 %if %{with static_libs}
262 %defattr(644,root,root,755)
264 %{_libdir}/libsolvext.a
268 %defattr(644,root,root,755)
269 %attr(755,root,root) %{_bindir}/appdata2solv
270 %attr(755,root,root) %{_bindir}/deltainfoxml2solv
271 %attr(755,root,root) %{_bindir}/dumpsolv
272 %attr(755,root,root) %{_bindir}/helix2solv
273 %attr(755,root,root) %{_bindir}/installcheck
274 %attr(755,root,root) %{_bindir}/mergesolv
275 %attr(755,root,root) %{_bindir}/repo2solv.sh
276 %attr(755,root,root) %{_bindir}/repomdxml2solv
277 %attr(755,root,root) %{_bindir}/rpmdb2solv
278 %attr(755,root,root) %{_bindir}/rpmmd2solv
279 %attr(755,root,root) %{_bindir}/rpms2solv
280 %attr(755,root,root) %{_bindir}/testsolv
281 %attr(755,root,root) %{_bindir}/updateinfoxml2solv
282 %{_mandir}/man1/appdata2solv.1*
283 %{_mandir}/man1/deltainfoxml2solv.1*
284 %{_mandir}/man1/dumpsolv.1*
285 %{_mandir}/man1/helix2solv.1*
286 %{_mandir}/man1/installcheck.1*
287 %{_mandir}/man1/mergesolv.1*
288 %{_mandir}/man1/repomdxml2solv.1*
289 %{_mandir}/man1/rpmdb2solv.1*
290 %{_mandir}/man1/rpmmd2solv.1*
291 %{_mandir}/man1/rpms2solv.1*
292 %{_mandir}/man1/testsolv.1*
293 %{_mandir}/man1/updateinfoxml2solv.1*
296 %defattr(644,root,root,755)
298 %attr(755,root,root) %{perl_vendorarch}/solv.so
299 %{perl_vendorarch}/solv.pm
301 %files -n python-solv
302 %defattr(644,root,root,755)
304 %attr(755,root,root) %{py_sitedir}/_solv.so
305 %{py_sitedir}/solv.py[co]
308 %files -n python3-solv
309 %defattr(644,root,root,755)
311 %attr(755,root,root) %{py3_sitedir}/_solv.so
312 %{py3_sitedir}/solv.py
317 %defattr(644,root,root,755)
319 %attr(755,root,root) %{ruby_vendorarchdir}/solv.so
324 %defattr(644,root,root,755)
325 %doc examples/tclsolv
326 %attr(755,root,root) %{_prefix}/lib/tcl8/8.*/solv-%{version}.so
327 %{_prefix}/lib/tcl8/8.*/solv-%{version}.tm