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