]> git.pld-linux.org Git - packages/libsolv.git/blob - libsolv.spec
- updated to 0.6.28
[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.28
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:  663e6d0b618ab88ce4c1e30b0e2cdfa1
19 Patch0:         ruby.patch
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}
39 BuildRequires:  xz
40 BuildRequires:  xz-devel
41 BuildRequires:  zlib-devel
42 %if %{with ruby}
43 BuildRequires:  rpm-rubyprov
44 BuildRequires:  ruby-devel
45 BuildRequires:  swig-ruby
46 %endif
47 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49 %description
50 A free package dependency solver using a satisfiability algorithm. The
51 library is based on two major, but independent, blocks:
52
53 - Using a dictionary approach to store and retrieve package and
54   dependency information.
55
56 - Using satisfiability, a well known and researched topic, for
57   resolving package dependencies.
58
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:
63
64 - wykorzystanie podejścia słownikowego do przechowywania i odtwarzania
65   informacji o pakietach i zależnościach,
66
67 - wykorzystanie spełnialności - dobrze znanego i zbadanego tematu do
68   rozwiązywania zależności pakietów.
69
70 %package devel
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
76
77 %description devel
78 Development files for libsolv.
79
80 %description devel -l pl.UTF-8
81 Pliki programistyczne biblioetk libsolv.
82
83 %package static
84 Summary:        Static libsolv libraries
85 Summary(pl.UTF-8):      Statyczne biblioteki libsolv
86 Group:          Development/Libraries
87 Requires:       %{name}-devel = %{version}-%{release}
88
89 %description static
90 Static libsolv libraries.
91
92 %description static -l pl.UTF-8
93 Statyczne biblioteki libsolv.
94
95 %package tools
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}
100 Requires:       bzip2
101 Requires:       coreutils
102 Requires:       gzip
103
104 %description tools
105 Package dependency solver tools.
106
107 %description tools -l pl.UTF-8
108 Narzędzia do rozwiązywania zależności pakietów.
109
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}
115
116 %description -n perl-solv
117 Perl bindings for the libsolv libraries.
118
119 %description -n perl-solv -l pl.UTF-8
120 Wiązania Perla do bibliotek libsolv.
121
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
128
129 %description -n python-solv
130 Python 2.x bindings for the libsolv library.
131
132 %description -n python-solv -l pl.UTF-8
133 Wiązania Pythona 2.x do bibliotek libsolv.
134
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
141
142 %description -n python3-solv
143 Python 3.x bindings for the libsolv library.
144
145 %description -n python3-solv -l pl.UTF-8
146 Wiązania Pythona 3.x do bibliotek libsolv.
147
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}
153
154 %description -n ruby-solv
155 Ruby bindings for the libsolv libraries.
156
157 %description -n ruby-solv -l pl.UTF-8
158 Wiązania języka Ruby do bibliotek libsolv.
159
160 %package -n tcl-solv
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}
165 Requires:       tcl
166
167 %description -n tcl-solv
168 Tcl bindings for the libsolv libraries.
169
170 %description -n tcl-solv -l pl.UTF-8
171 Wiązania języka Tcl do bibliotek libsolv.
172
173 %prep
174 %setup -q
175 %patch0 -p1
176 %patch1 -p1
177
178 # use system one
179 %{__rm} cmake/modules/FindRuby.cmake
180
181 %build
182 install -d build %{?with_python3:build-py3}
183 cd build
184 %cmake .. \
185         -DENABLE_APPDATA=ON \
186         -DENABLE_BZIP2_COMPRESSION=ON \
187         -DENABLE_HELIXREPO=ON \
188         -DENABLE_LZMA_COMPRESSION=ON \
189         -DENABLE_PERL=ON \
190         -DENABLE_PUBKEY=ON \
191         -DENABLE_PYTHON=ON \
192         -DENABLE_RPMDB=ON \
193         -DENABLE_RPMDB_BYRPMHEADER=ON \
194         -DENABLE_RPMMD=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 \
200         -DRPM5=ON \
201         -DUSE_VENDORDIRS=ON
202
203 %{__make}
204 %if %{with python3}
205 cd ../build-py3
206 %cmake .. \
207         -DENABLE_APPDATA=ON \
208         -DENABLE_BZIP2_COMPRESSION=ON \
209         -DENABLE_LZMA_COMPRESSION=ON \
210         -DENABLE_PUBKEY=ON \
211         -DENABLE_PYTHON=ON \
212         -DENABLE_RPMDB=ON \
213         -DENABLE_RPMMD=ON \
214         -DENABLE_RPMDB_BYRPMHEADER=ON \
215         -DPythonLibs_FIND_VERSION=3 \
216         -DPythonLibs_FIND_VERSION_MAJOR=3 \
217         -DRPM5=ON
218
219 %{__make}
220 %endif
221
222 %install
223 rm -rf $RPM_BUILD_ROOT
224
225 %if %{with python3}
226 %{__make} -C build-py3/bindings/python install \
227         DESTDIR=$RPM_BUILD_ROOT
228 %endif
229
230 %{__make} -C build install \
231         DESTDIR=$RPM_BUILD_ROOT
232
233 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
234 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
235 %py_postclean
236
237 %clean
238 rm -rf $RPM_BUILD_ROOT
239
240 %post   -p /sbin/ldconfig
241 %postun -p /sbin/ldconfig
242
243 %files
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
248
249 %files devel
250 %defattr(644,root,root,755)
251 %attr(755,root,root) %{_libdir}/libsolv.so
252 %attr(755,root,root) %{_libdir}/libsolvext.so
253 %{_includedir}/solv
254 %{_pkgconfigdir}/libsolv.pc
255 %{_pkgconfigdir}/libsolvext.pc
256 %{_datadir}/cmake/Modules/FindLibSolv.cmake
257 %{_mandir}/man3/libsolv*.3*
258
259 %if %{with static_libs}
260 %files static
261 %defattr(644,root,root,755)
262 %{_libdir}/libsolv.a
263 %{_libdir}/libsolvext.a
264 %endif
265
266 %files tools
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*
293
294 %files -n perl-solv
295 %defattr(644,root,root,755)
296 %doc examples/p5solv
297 %attr(755,root,root) %{perl_vendorarch}/solv.so
298 %{perl_vendorarch}/solv.pm
299
300 %files -n python-solv
301 %defattr(644,root,root,755)
302 %doc examples/pysolv
303 %attr(755,root,root) %{py_sitedir}/_solv.so
304 %{py_sitedir}/solv.py[co]
305
306 %if %{with python3}
307 %files -n python3-solv
308 %defattr(644,root,root,755)
309 %doc examples/pysolv
310 %attr(755,root,root) %{py3_sitedir}/_solv.so
311 %{py3_sitedir}/solv.py
312 %endif
313
314 %if %{with ruby}
315 %files -n ruby-solv
316 %defattr(644,root,root,755)
317 %doc examples/rbsolv
318 %attr(755,root,root) %{ruby_vendorarchdir}/solv.so
319 %endif
320
321 %if %{with tcl}
322 %files -n tcl-solv
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
327 %endif
This page took 0.172976 seconds and 3 git commands to generate.