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: 663e6d0b618ab88ce4c1e30b0e2cdfa1
20 Patch1: %{name}-python.patch
21 URL: https://github.com/openSUSE/libsolv
22 BuildRequires: bzip2-devel
23 BuildRequires: cmake >= 2.4
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: zlib-devel
43 BuildRequires: rpm-rubyprov
44 BuildRequires: ruby-devel
45 BuildRequires: swig-ruby
47 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50 A free package dependency solver using a satisfiability algorithm. The
51 library is based on two major, but independent, blocks:
53 - Using a dictionary approach to store and retrieve package and
54 dependency information.
56 - Using satisfiability, a well known and researched topic, for
57 resolving package dependencies.
59 %description -l pl.UTF-8
60 Wolnodostępna biblioteka do rozwiązywania zależności pakietów przy
61 użyciu algorytmu spełnialności. Biblioteka jest podzielona na dwa
62 główne, niezależne bloki:
64 - wykorzystanie podejścia słownikowego do przechowywania i odtwarzania
65 informacji o pakietach i zależnościach,
67 - wykorzystanie spełnialności - dobrze znanego i zbadanego tematu do
68 rozwiązywania zależności pakietów.
71 Summary: Header files for libsolv libraries
72 Summary(pl.UTF-8): Pliki nagłówkowe bibliotek libsolv
73 Group: Development/Libraries
74 Requires: %{name} = %{version}-%{release}
75 Requires: rpm-devel >= 5
78 Development files for libsolv.
80 %description devel -l pl.UTF-8
81 Pliki programistyczne biblioetk libsolv.
84 Summary: Static libsolv libraries
85 Summary(pl.UTF-8): Statyczne biblioteki libsolv
86 Group: Development/Libraries
87 Requires: %{name}-devel = %{version}-%{release}
90 Static libsolv libraries.
92 %description static -l pl.UTF-8
93 Statyczne biblioteki libsolv.
96 Summary: Package dependency solver tools
97 Summary(pl.UTF-8): Narzędzia do rozwiązywania zależności pakietów
98 Group: Applications/System
99 Requires: %{name} = %{version}-%{release}
105 Package dependency solver tools.
107 %description tools -l pl.UTF-8
108 Narzędzia do rozwiązywania zależności pakietów.
110 %package -n perl-solv
111 Summary: Perl bindings for the libsolv libraries
112 Summary(pl.UTF-8): Wiązania Perla do bibliotek libsolv
113 Group: Development/Languages/Perl
114 Requires: %{name} = %{version}-%{release}
116 %description -n perl-solv
117 Perl bindings for the libsolv libraries.
119 %description -n perl-solv -l pl.UTF-8
120 Wiązania Perla do bibliotek libsolv.
122 %package -n python-solv
123 Summary: Python 2.x bindings for the libsolv library
124 Summary(pl.UTF-8): Wiązania Pythona 2.x do bibliotek libsolv
125 Group: Development/Languages/Python
126 Requires: %{name} = %{version}-%{release}
127 Requires: python-libs
129 %description -n python-solv
130 Python 2.x bindings for the libsolv library.
132 %description -n python-solv -l pl.UTF-8
133 Wiązania Pythona 2.x do bibliotek libsolv.
135 %package -n python3-solv
136 Summary: Python 3.x bindings for the libsolv library
137 Summary(pl.UTF-8): Wiązania Pythona 2.x do bibliotek libsolv
138 Group: Development/Languages/Python
139 Requires: %{name} = %{version}-%{release}
140 Requires: python-libs
142 %description -n python3-solv
143 Python 3.x bindings for the libsolv library.
145 %description -n python3-solv -l pl.UTF-8
146 Wiązania Pythona 3.x do bibliotek libsolv.
148 %package -n ruby-solv
149 Summary: Ruby bindings for the libsolv libraries
150 Summary(pl.UTF-8): Wiązania języka Ruby do bibliotek libsolv
151 Group: Development/Languages
152 Requires: %{name} = %{version}-%{release}
154 %description -n ruby-solv
155 Ruby bindings for the libsolv libraries.
157 %description -n ruby-solv -l pl.UTF-8
158 Wiązania języka Ruby do bibliotek libsolv.
161 Summary: Tcl bindings for the libsolv libraries
162 Summary(pl.UTF-8): Wiązania języka Tcl do bibliotek libsolv
163 Group: Development/Languages
164 Requires: %{name} = %{version}-%{release}
167 %description -n tcl-solv
168 Tcl bindings for the libsolv libraries.
170 %description -n tcl-solv -l pl.UTF-8
171 Wiązania języka Tcl do bibliotek libsolv.
179 %{__rm} cmake/modules/FindRuby.cmake
182 install -d build %{?with_python3:build-py3}
185 -DENABLE_APPDATA=ON \
186 -DENABLE_BZIP2_COMPRESSION=ON \
187 -DENABLE_HELIXREPO=ON \
188 -DENABLE_LZMA_COMPRESSION=ON \
193 -DENABLE_RPMDB_BYRPMHEADER=ON \
195 %{?with_ruby:-DENABLE_RUBY=ON} \
196 %{?with_static_libs:-DENABLE_STATIC=ON} \
197 %{?with_tcl:-DENABLE_TCL=ON} \
198 -DPythonLibs_FIND_VERSION=2 \
199 -DPythonLibs_FIND_VERSION_MAJOR=2 \
207 -DENABLE_APPDATA=ON \
208 -DENABLE_BZIP2_COMPRESSION=ON \
209 -DENABLE_LZMA_COMPRESSION=ON \
214 -DENABLE_RPMDB_BYRPMHEADER=ON \
215 -DPythonLibs_FIND_VERSION=3 \
216 -DPythonLibs_FIND_VERSION_MAJOR=3 \
223 rm -rf $RPM_BUILD_ROOT
226 %{__make} -C build-py3/bindings/python install \
227 DESTDIR=$RPM_BUILD_ROOT
230 %{__make} -C build install \
231 DESTDIR=$RPM_BUILD_ROOT
233 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
234 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
238 rm -rf $RPM_BUILD_ROOT
240 %post -p /sbin/ldconfig
241 %postun -p /sbin/ldconfig
244 %defattr(644,root,root,755)
245 %doc BUGS CREDITS LICENSE.BSD NEWS README
246 %attr(755,root,root) %{_libdir}/libsolv.so.0
247 %attr(755,root,root) %{_libdir}/libsolvext.so.0
250 %defattr(644,root,root,755)
251 %attr(755,root,root) %{_libdir}/libsolv.so
252 %attr(755,root,root) %{_libdir}/libsolvext.so
254 %{_pkgconfigdir}/libsolv.pc
255 %{_pkgconfigdir}/libsolvext.pc
256 %{_datadir}/cmake/Modules/FindLibSolv.cmake
257 %{_mandir}/man3/libsolv*.3*
259 %if %{with static_libs}
261 %defattr(644,root,root,755)
263 %{_libdir}/libsolvext.a
267 %defattr(644,root,root,755)
268 %attr(755,root,root) %{_bindir}/appdata2solv
269 %attr(755,root,root) %{_bindir}/deltainfoxml2solv
270 %attr(755,root,root) %{_bindir}/dumpsolv
271 %attr(755,root,root) %{_bindir}/helix2solv
272 %attr(755,root,root) %{_bindir}/installcheck
273 %attr(755,root,root) %{_bindir}/mergesolv
274 %attr(755,root,root) %{_bindir}/repo2solv.sh
275 %attr(755,root,root) %{_bindir}/repomdxml2solv
276 %attr(755,root,root) %{_bindir}/rpmdb2solv
277 %attr(755,root,root) %{_bindir}/rpmmd2solv
278 %attr(755,root,root) %{_bindir}/rpms2solv
279 %attr(755,root,root) %{_bindir}/testsolv
280 %attr(755,root,root) %{_bindir}/updateinfoxml2solv
281 %{_mandir}/man1/appdata2solv.1*
282 %{_mandir}/man1/deltainfoxml2solv.1*
283 %{_mandir}/man1/dumpsolv.1*
284 %{_mandir}/man1/helix2solv.1*
285 %{_mandir}/man1/installcheck.1*
286 %{_mandir}/man1/mergesolv.1*
287 %{_mandir}/man1/repomdxml2solv.1*
288 %{_mandir}/man1/rpmdb2solv.1*
289 %{_mandir}/man1/rpmmd2solv.1*
290 %{_mandir}/man1/rpms2solv.1*
291 %{_mandir}/man1/testsolv.1*
292 %{_mandir}/man1/updateinfoxml2solv.1*
295 %defattr(644,root,root,755)
297 %attr(755,root,root) %{perl_vendorarch}/solv.so
298 %{perl_vendorarch}/solv.pm
300 %files -n python-solv
301 %defattr(644,root,root,755)
303 %attr(755,root,root) %{py_sitedir}/_solv.so
304 %{py_sitedir}/solv.py[co]
307 %files -n python3-solv
308 %defattr(644,root,root,755)
310 %attr(755,root,root) %{py3_sitedir}/_solv.so
311 %{py3_sitedir}/solv.py
316 %defattr(644,root,root,755)
318 %attr(755,root,root) %{ruby_vendorarchdir}/solv.so
323 %defattr(644,root,root,755)
324 %doc examples/tclsolv
325 %attr(755,root,root) %{_prefix}/lib/tcl8/8.*/solv-%{version}.so
326 %{_prefix}/lib/tcl8/8.*/solv-%{version}.tm