]> git.pld-linux.org Git - packages/libsolv.git/blob - libsolv.spec
- updated to 0.7.16
[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_without  ruby            # Ruby bindings
6 %bcond_without  tcl             # Tcl bindings
7
8 Summary:        Package dependency solver
9 Summary(pl.UTF-8):      Biblioteka do rozwiązywania zależności pakietów
10 Name:           libsolv
11 Version:        0.7.16
12 Release:        1
13 License:        BSD
14 Group:          Libraries
15 #Source0Download: https://github.com/openSUSE/libsolv/releases
16 Source0:        https://github.com/openSUSE/libsolv/archive/%{version}/%{name}-%{version}.tar.gz
17 # Source0-md5:  65a205694b45f9c7c28e25a9ccac8726
18 Patch0:         ruby.patch
19 Patch1:         %{name}-python.patch
20 Patch2:         %{name}-rpm5.patch
21 URL:            https://github.com/openSUSE/libsolv
22 BuildRequires:  bzip2-devel
23 BuildRequires:  cmake >= 2.8.5
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}
39 BuildRequires:  xz
40 BuildRequires:  xz-devel
41 BuildRequires:  zchunk-devel
42 BuildRequires:  zlib-devel
43 BuildRequires:  zstd-devel
44 %if %{with ruby}
45 BuildRequires:  rpm-rubyprov
46 BuildRequires:  ruby-devel
47 BuildRequires:  swig-ruby
48 %endif
49 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
50
51 %define         specflags       -D_GNU_SOURCE=1
52
53 %description
54 A free package dependency solver using a satisfiability algorithm. The
55 library is based on two major, but independent, blocks:
56
57 - Using a dictionary approach to store and retrieve package and
58   dependency information.
59
60 - Using satisfiability, a well known and researched topic, for
61   resolving package dependencies.
62
63 %description -l pl.UTF-8
64 Wolnodostępna biblioteka do rozwiązywania zależności pakietów przy
65 użyciu algorytmu spełnialności. Biblioteka jest podzielona na dwa
66 główne, niezależne bloki:
67
68 - wykorzystanie podejścia słownikowego do przechowywania i odtwarzania
69   informacji o pakietach i zależnościach,
70
71 - wykorzystanie spełnialności - dobrze znanego i zbadanego tematu do
72   rozwiązywania zależności pakietów.
73
74 %package devel
75 Summary:        Header files for libsolv libraries
76 Summary(pl.UTF-8):      Pliki nagłówkowe bibliotek libsolv
77 Group:          Development/Libraries
78 Requires:       %{name} = %{version}-%{release}
79 Requires:       rpm-devel >= 5
80
81 %description devel
82 Development files for libsolv.
83
84 %description devel -l pl.UTF-8
85 Pliki programistyczne biblioetk libsolv.
86
87 %package static
88 Summary:        Static libsolv libraries
89 Summary(pl.UTF-8):      Statyczne biblioteki libsolv
90 Group:          Development/Libraries
91 Requires:       %{name}-devel = %{version}-%{release}
92
93 %description static
94 Static libsolv libraries.
95
96 %description static -l pl.UTF-8
97 Statyczne biblioteki libsolv.
98
99 %package tools
100 Summary:        Package dependency solver tools
101 Summary(pl.UTF-8):      Narzędzia do rozwiązywania zależności pakietów
102 Group:          Applications/System
103 Requires:       %{name} = %{version}-%{release}
104 Requires:       bzip2
105 Requires:       coreutils
106 Requires:       gzip
107
108 %description tools
109 Package dependency solver tools.
110
111 %description tools -l pl.UTF-8
112 Narzędzia do rozwiązywania zależności pakietów.
113
114 %package -n perl-solv
115 Summary:        Perl bindings for the libsolv libraries
116 Summary(pl.UTF-8):      Wiązania Perla do bibliotek libsolv
117 Group:          Development/Languages/Perl
118 Requires:       %{name} = %{version}-%{release}
119
120 %description -n perl-solv
121 Perl bindings for the libsolv libraries.
122
123 %description -n perl-solv -l pl.UTF-8
124 Wiązania Perla do bibliotek libsolv.
125
126 %package -n python-solv
127 Summary:        Python 2.x bindings for the libsolv library
128 Summary(pl.UTF-8):      Wiązania Pythona 2.x do bibliotek libsolv
129 Group:          Development/Languages/Python
130 Requires:       %{name} = %{version}-%{release}
131 Requires:       python-libs
132
133 %description -n python-solv
134 Python 2.x bindings for the libsolv library.
135
136 %description -n python-solv -l pl.UTF-8
137 Wiązania Pythona 2.x do bibliotek libsolv.
138
139 %package -n python3-solv
140 Summary:        Python 3.x bindings for the libsolv library
141 Summary(pl.UTF-8):      Wiązania Pythona 2.x do bibliotek libsolv
142 Group:          Development/Languages/Python
143 Requires:       %{name} = %{version}-%{release}
144 Requires:       python-libs
145
146 %description -n python3-solv
147 Python 3.x bindings for the libsolv library.
148
149 %description -n python3-solv -l pl.UTF-8
150 Wiązania Pythona 3.x do bibliotek libsolv.
151
152 %package -n ruby-solv
153 Summary:        Ruby bindings for the libsolv libraries
154 Summary(pl.UTF-8):      Wiązania języka Ruby do bibliotek libsolv
155 Group:          Development/Languages
156 Requires:       %{name} = %{version}-%{release}
157
158 %description -n ruby-solv
159 Ruby bindings for the libsolv libraries.
160
161 %description -n ruby-solv -l pl.UTF-8
162 Wiązania języka Ruby do bibliotek libsolv.
163
164 %package -n tcl-solv
165 Summary:        Tcl bindings for the libsolv libraries
166 Summary(pl.UTF-8):      Wiązania języka Tcl do bibliotek libsolv
167 Group:          Development/Languages
168 Requires:       %{name} = %{version}-%{release}
169 Requires:       tcl
170
171 %description -n tcl-solv
172 Tcl bindings for the libsolv libraries.
173
174 %description -n tcl-solv -l pl.UTF-8
175 Wiązania języka Tcl do bibliotek libsolv.
176
177 %prep
178 %setup -q
179 %patch0 -p1
180 %patch1 -p1
181 %patch2 -p1
182
183 # use system one
184 %{__rm} cmake/modules/FindRuby.cmake
185
186 %build
187 # TODO: -DENABLE_RPMDB_LIBRPM=ON (instead of -DENABLE_RPMDB_BDB), -DENABLE_RPMPKG_LIBRPM=ON after switch to rpm.org (rpm5 is not supported)
188
189 %define common_opts \\\
190         -DENABLE_APPDATA=ON \\\
191         -DENABLE_BZIP2_COMPRESSION=ON \\\
192         -DENABLE_COMPLEX_DEPS=ON \\\
193         -DENABLE_HELIXREPO=ON \\\
194         -DENABLE_LZMA_COMPRESSION=ON \\\
195         -DENABLE_PUBKEY=ON \\\
196         -DENABLE_RPMDB=ON \\\
197         -DENABLE_RPMDB_BDB=ON \\\
198         -DENABLE_RPMDB_BYRPMHEADER=ON \\\
199         -DENABLE_RPMMD=ON \\\
200         -DENABLE_RPMPKG=ON \\\
201         %{?with_static_libs:-DENABLE_STATIC=ON} \\\
202         -DENABLE_ZCHUNK_COMPRESSION=ON \\\
203         -DENABLE_ZSTD_COMPRESSION=ON \\\
204         -DRPM5=ON \\\
205         -DWITH_SYSTEM_ZCHUNK=ON \\\
206         %{nil}
207
208 install -d build %{?with_python3:build-py3}
209 cd build
210 %cmake .. \
211         %{common_opts} \
212         -DENABLE_PERL=ON \
213         -DENABLE_PYTHON=ON \
214         %{?with_ruby:-DENABLE_RUBY=ON} \
215         %{?with_tcl:-DENABLE_TCL=ON} \
216         -DPythonLibs_FIND_VERSION=2 \
217         -DPythonLibs_FIND_VERSION_MAJOR=2 \
218         -DUSE_VENDORDIRS=ON
219
220 %{__make}
221 %if %{with python3}
222 cd ../build-py3
223 %cmake .. \
224         %{common_opts} \
225         -DENABLE_PYTHON=ON \
226         -DPythonLibs_FIND_VERSION=3 \
227         -DPythonLibs_FIND_VERSION_MAJOR=3
228
229 %{__make}
230 %endif
231
232 %install
233 rm -rf $RPM_BUILD_ROOT
234
235 %if %{with python3}
236 %{__make} -C build-py3/bindings/python install \
237         DESTDIR=$RPM_BUILD_ROOT
238 %endif
239
240 %{__make} -C build install \
241         DESTDIR=$RPM_BUILD_ROOT
242
243 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
244 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
245 %py_postclean
246
247 %clean
248 rm -rf $RPM_BUILD_ROOT
249
250 %post   -p /sbin/ldconfig
251 %postun -p /sbin/ldconfig
252
253 %files
254 %defattr(644,root,root,755)
255 %doc CREDITS LICENSE.BSD NEWS README
256 %attr(755,root,root) %{_libdir}/libsolv.so.1
257 %attr(755,root,root) %{_libdir}/libsolvext.so.1
258
259 %files devel
260 %defattr(644,root,root,755)
261 %attr(755,root,root) %{_libdir}/libsolv.so
262 %attr(755,root,root) %{_libdir}/libsolvext.so
263 %{_includedir}/solv
264 %{_pkgconfigdir}/libsolv.pc
265 %{_pkgconfigdir}/libsolvext.pc
266 %{_datadir}/cmake/Modules/FindLibSolv.cmake
267 %{_mandir}/man3/libsolv*.3*
268
269 %if %{with static_libs}
270 %files static
271 %defattr(644,root,root,755)
272 %{_libdir}/libsolv.a
273 %{_libdir}/libsolvext.a
274 %endif
275
276 %files tools
277 %defattr(644,root,root,755)
278 %attr(755,root,root) %{_bindir}/appdata2solv
279 %attr(755,root,root) %{_bindir}/deltainfoxml2solv
280 %attr(755,root,root) %{_bindir}/dumpsolv
281 %attr(755,root,root) %{_bindir}/helix2solv
282 %attr(755,root,root) %{_bindir}/installcheck
283 %attr(755,root,root) %{_bindir}/mergesolv
284 %attr(755,root,root) %{_bindir}/repo2solv
285 %attr(755,root,root) %{_bindir}/repomdxml2solv
286 %attr(755,root,root) %{_bindir}/rpmdb2solv
287 %attr(755,root,root) %{_bindir}/rpmmd2solv
288 %attr(755,root,root) %{_bindir}/rpms2solv
289 %attr(755,root,root) %{_bindir}/testsolv
290 %attr(755,root,root) %{_bindir}/updateinfoxml2solv
291 %{_mandir}/man1/appdata2solv.1*
292 %{_mandir}/man1/deltainfoxml2solv.1*
293 %{_mandir}/man1/dumpsolv.1*
294 %{_mandir}/man1/helix2solv.1*
295 %{_mandir}/man1/installcheck.1*
296 %{_mandir}/man1/mergesolv.1*
297 %{_mandir}/man1/repo2solv.1*
298 %{_mandir}/man1/repomdxml2solv.1*
299 %{_mandir}/man1/rpmdb2solv.1*
300 %{_mandir}/man1/rpmmd2solv.1*
301 %{_mandir}/man1/rpms2solv.1*
302 %{_mandir}/man1/solv.1*
303 %{_mandir}/man1/testsolv.1*
304 %{_mandir}/man1/updateinfoxml2solv.1*
305
306 %files -n perl-solv
307 %defattr(644,root,root,755)
308 %doc examples/p5solv
309 %attr(755,root,root) %{perl_vendorarch}/solv.so
310 %{perl_vendorarch}/solv.pm
311
312 %files -n python-solv
313 %defattr(644,root,root,755)
314 %doc examples/pysolv
315 %attr(755,root,root) %{py_sitedir}/_solv.so
316 %{py_sitedir}/solv.py[co]
317
318 %if %{with python3}
319 %files -n python3-solv
320 %defattr(644,root,root,755)
321 %doc examples/pysolv
322 %attr(755,root,root) %{py3_sitedir}/_solv.so
323 %{py3_sitedir}/solv.py
324 %endif
325
326 %if %{with ruby}
327 %files -n ruby-solv
328 %defattr(644,root,root,755)
329 %doc examples/rbsolv
330 %attr(755,root,root) %{ruby_vendorarchdir}/solv.so
331 %endif
332
333 %if %{with tcl}
334 %files -n tcl-solv
335 %defattr(644,root,root,755)
336 %doc examples/tclsolv
337 %attr(755,root,root) %{_prefix}/lib/tcl8/8.*/solv-%{version}.so
338 %{_prefix}/lib/tcl8/8.*/solv-%{version}.tm
339 %endif
This page took 0.269707 seconds and 3 git commands to generate.