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