]> git.pld-linux.org Git - packages/libsolv.git/blob - libsolv.spec
- updated to 0.7.19
[packages/libsolv.git] / libsolv.spec
1 #
2 # Conditional build:
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
8
9 Summary:        Package dependency solver
10 Summary(pl.UTF-8):      Biblioteka do rozwiązywania zależności pakietów
11 Name:           libsolv
12 Version:        0.7.19
13 Release:        1
14 License:        BSD
15 Group:          Libraries
16 #Source0Download: https://github.com/openSUSE/libsolv/releases
17 Source0:        https://github.com/openSUSE/libsolv/archive/%{version}/%{name}-%{version}.tar.gz
18 # Source0-md5:  05adaf6abe6b65a330272642baad82e1
19 Patch0:         ruby.patch
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}
40 BuildRequires:  xz
41 BuildRequires:  xz-devel
42 BuildRequires:  zchunk-devel
43 BuildRequires:  zlib-devel
44 BuildRequires:  zstd-devel
45 %if %{with ruby}
46 BuildRequires:  rpm-rubyprov
47 BuildRequires:  ruby-devel
48 BuildRequires:  swig-ruby
49 %endif
50 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52 %define         specflags       -D_GNU_SOURCE=1
53
54 %description
55 A free package dependency solver using a satisfiability algorithm. The
56 library is based on two major, but independent, blocks:
57
58 - Using a dictionary approach to store and retrieve package and
59   dependency information.
60
61 - Using satisfiability, a well known and researched topic, for
62   resolving package dependencies.
63
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:
68
69 - wykorzystanie podejścia słownikowego do przechowywania i odtwarzania
70   informacji o pakietach i zależnościach,
71
72 - wykorzystanie spełnialności - dobrze znanego i zbadanego tematu do
73   rozwiązywania zależności pakietów.
74
75 %package devel
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}
80 Requires:       rpm-devel
81
82 %description devel
83 Development files for libsolv.
84
85 %description devel -l pl.UTF-8
86 Pliki programistyczne biblioetk libsolv.
87
88 %package static
89 Summary:        Static libsolv libraries
90 Summary(pl.UTF-8):      Statyczne biblioteki libsolv
91 Group:          Development/Libraries
92 Requires:       %{name}-devel = %{version}-%{release}
93
94 %description static
95 Static libsolv libraries.
96
97 %description static -l pl.UTF-8
98 Statyczne biblioteki libsolv.
99
100 %package tools
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}
105 Requires:       bzip2
106 Requires:       coreutils
107 Requires:       gzip
108
109 %description tools
110 Package dependency solver tools.
111
112 %description tools -l pl.UTF-8
113 Narzędzia do rozwiązywania zależności pakietów.
114
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}
120
121 %description -n perl-solv
122 Perl bindings for the libsolv libraries.
123
124 %description -n perl-solv -l pl.UTF-8
125 Wiązania Perla do bibliotek libsolv.
126
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
133
134 %description -n python-solv
135 Python 2.x bindings for the libsolv library.
136
137 %description -n python-solv -l pl.UTF-8
138 Wiązania Pythona 2.x do bibliotek libsolv.
139
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
146
147 %description -n python3-solv
148 Python 3.x bindings for the libsolv library.
149
150 %description -n python3-solv -l pl.UTF-8
151 Wiązania Pythona 3.x do bibliotek libsolv.
152
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}
158
159 %description -n ruby-solv
160 Ruby bindings for the libsolv libraries.
161
162 %description -n ruby-solv -l pl.UTF-8
163 Wiązania języka Ruby do bibliotek libsolv.
164
165 %package -n tcl-solv
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}
170 Requires:       tcl
171
172 %description -n tcl-solv
173 Tcl bindings for the libsolv libraries.
174
175 %description -n tcl-solv -l pl.UTF-8
176 Wiązania języka Tcl do bibliotek libsolv.
177
178 %prep
179 %setup -q
180 %patch0 -p1
181 %patch1 -p1
182 %{?with_rpm5:%patch2 -p1}
183
184 # use system one
185 %{__rm} cmake/modules/FindRuby.cmake
186
187 %build
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 \\\
207         %{nil}
208
209 install -d build %{?with_python3:build-py3}
210 cd build
211 %cmake .. \
212         %{common_opts} \
213         -DENABLE_PERL=ON \
214         -DENABLE_PYTHON=ON \
215         %{?with_ruby:-DENABLE_RUBY=ON} \
216         %{?with_tcl:-DENABLE_TCL=ON} \
217         -DPythonLibs_FIND_VERSION=2 \
218         -DPythonLibs_FIND_VERSION_MAJOR=2 \
219         -DUSE_VENDORDIRS=ON
220
221 %{__make}
222 %if %{with python3}
223 cd ../build-py3
224 %cmake .. \
225         %{common_opts} \
226         -DENABLE_PYTHON=ON \
227         -DPythonLibs_FIND_VERSION=3 \
228         -DPythonLibs_FIND_VERSION_MAJOR=3
229
230 %{__make}
231 %endif
232
233 %install
234 rm -rf $RPM_BUILD_ROOT
235
236 %if %{with python3}
237 %{__make} -C build-py3/bindings/python install \
238         DESTDIR=$RPM_BUILD_ROOT
239 %endif
240
241 %{__make} -C build install \
242         DESTDIR=$RPM_BUILD_ROOT
243
244 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
245 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
246 %py_postclean
247
248 %clean
249 rm -rf $RPM_BUILD_ROOT
250
251 %post   -p /sbin/ldconfig
252 %postun -p /sbin/ldconfig
253
254 %files
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
259
260 %files devel
261 %defattr(644,root,root,755)
262 %attr(755,root,root) %{_libdir}/libsolv.so
263 %attr(755,root,root) %{_libdir}/libsolvext.so
264 %{_includedir}/solv
265 %{_pkgconfigdir}/libsolv.pc
266 %{_pkgconfigdir}/libsolvext.pc
267 %{_datadir}/cmake/Modules/FindLibSolv.cmake
268 %{_mandir}/man3/libsolv*.3*
269
270 %if %{with static_libs}
271 %files static
272 %defattr(644,root,root,755)
273 %{_libdir}/libsolv.a
274 %{_libdir}/libsolvext.a
275 %endif
276
277 %files tools
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*
306
307 %files -n perl-solv
308 %defattr(644,root,root,755)
309 %doc examples/p5solv
310 %attr(755,root,root) %{perl_vendorarch}/solv.so
311 %{perl_vendorarch}/solv.pm
312
313 %files -n python-solv
314 %defattr(644,root,root,755)
315 %doc examples/pysolv
316 %attr(755,root,root) %{py_sitedir}/_solv.so
317 %{py_sitedir}/solv.py[co]
318
319 %if %{with python3}
320 %files -n python3-solv
321 %defattr(644,root,root,755)
322 %doc examples/pysolv
323 %attr(755,root,root) %{py3_sitedir}/_solv.so
324 %{py3_sitedir}/solv.py
325 %endif
326
327 %if %{with ruby}
328 %files -n ruby-solv
329 %defattr(644,root,root,755)
330 %doc examples/rbsolv
331 %attr(755,root,root) %{ruby_vendorarchdir}/solv.so
332 %endif
333
334 %if %{with tcl}
335 %files -n tcl-solv
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
340 %endif
This page took 0.089262 seconds and 4 git commands to generate.