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