]> git.pld-linux.org Git - packages/libsolv.git/blob - libsolv.spec
- release 3 (by relup.sh)
[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.1
13 Release:        3
14 License:        BSD
15 Group:          Libraries
16 # git clone https://github.com/openSUSE/libsolv.git
17 Source0:        http://pkgs.fedoraproject.org/repo/pkgs/libsolv/%{name}-%{gitrev}.tar.xz/79166e5d759b1c879bca4d167c02fc62/libsolv-%{gitrev}.tar.xz
18 # Source0-md5:  79166e5d759b1c879bca4d167c02fc62
19 Patch0:         ruby.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 -n %{name}
159 %patch0 -p1
160
161 %build
162 install -d build %{?with_python3:build-py3}
163 cd build
164 %cmake .. \
165         -DENABLE_APPDATA=ON \
166         -DENABLE_BZIP2_COMPRESSON=ON \
167         -DENABLE_LZMA_COMPRESSON=ON \
168         -DENABLE_PERL=ON \
169         -DENABLE_PUBKEY=ON \
170         -DENABLE_PYTHON=ON \
171         -DENABLE_RPMDB=ON \
172         -DENABLE_RPMDB_BYRPMHEADER=ON \
173         -DENABLE_RPMMD=ON \
174         %{?with_ruby:-DENABLE_RUBY=ON} \
175         %{?with_static_libs:-DENABLE_STATIC=ON} \
176         -DPythonLibs_FIND_VERSION=2 \
177         -DRPM5=ON \
178         -DUSE_VENDORDIRS=ON
179
180 %{__make}
181 %if %{with python3}
182 cd ../build-py3
183 %cmake .. \
184         -DENABLE_APPDATA=ON \
185         -DENABLE_BZIP2_COMPRESSON=ON \
186         -DENABLE_LZMA_COMPRESSON=ON \
187         -DENABLE_PUBKEY=ON \
188         -DENABLE_PYTHON=ON \
189         -DENABLE_RPMDB=ON \
190         -DENABLE_RPMMD=ON \
191         -DENABLE_RPMDB_BYRPMHEADER=ON \
192         -DPythonLibs_FIND_VERSION=3 \
193         -DRPM5=ON
194
195 %{__make}
196 %endif
197
198 %install
199 rm -rf $RPM_BUILD_ROOT
200
201 %if %{with python3}
202 %{__make} -C build-py3/bindings/python install \
203         DESTDIR=$RPM_BUILD_ROOT
204 %endif
205
206 %{__make} -C build install \
207         DESTDIR=$RPM_BUILD_ROOT
208
209 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
210 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
211 %py_postclean
212
213 %clean
214 rm -rf $RPM_BUILD_ROOT
215
216 %post   -p /sbin/ldconfig
217 %postun -p /sbin/ldconfig
218
219 %files
220 %defattr(644,root,root,755)
221 %doc BUGS CREDITS LICENSE.BSD README
222 %attr(755,root,root) %{_libdir}/libsolv.so.0
223 %attr(755,root,root) %{_libdir}/libsolvext.so.0
224
225 %files devel
226 %defattr(644,root,root,755)
227 %doc examples/solv.c
228 %attr(755,root,root) %{_libdir}/libsolv.so
229 %attr(755,root,root) %{_libdir}/libsolvext.so
230 %{_includedir}/solv
231 %{_datadir}/cmake/Modules/FindLibSolv.cmake
232 %{_mandir}/man3/libsolv*.3*
233
234 %if %{with static_libs}
235 %files static
236 %defattr(644,root,root,755)
237 %{_libdir}/libsolv.a
238 %{_libdir}/libsolvext.a
239 %endif
240
241 %files tools
242 %defattr(644,root,root,755)
243 %attr(755,root,root) %{_bindir}/appdata2solv
244 %attr(755,root,root) %{_bindir}/deltainfoxml2solv
245 %attr(755,root,root) %{_bindir}/dumpsolv
246 %attr(755,root,root) %{_bindir}/installcheck
247 %attr(755,root,root) %{_bindir}/mergesolv
248 %attr(755,root,root) %{_bindir}/repo2solv.sh
249 %attr(755,root,root) %{_bindir}/repomdxml2solv
250 %attr(755,root,root) %{_bindir}/rpmdb2solv
251 %attr(755,root,root) %{_bindir}/rpmmd2solv
252 %attr(755,root,root) %{_bindir}/rpms2solv
253 %attr(755,root,root) %{_bindir}/solv
254 %attr(755,root,root) %{_bindir}/testsolv
255 %attr(755,root,root) %{_bindir}/updateinfoxml2solv
256
257 %files -n perl-solv
258 %defattr(644,root,root,755)
259 %doc examples/p5solv
260 %attr(755,root,root) %{perl_vendorarch}/solv.so
261 %{perl_vendorarch}/solv.pm
262
263 %files -n python-solv
264 %defattr(644,root,root,755)
265 %doc examples/pysolv
266 %attr(755,root,root) %{py_sitedir}/_solv.so
267 %{py_sitedir}/solv.py[co]
268
269 %if %{with python3}
270 %files -n python3-solv
271 %defattr(644,root,root,755)
272 %doc examples/pysolv
273 %attr(755,root,root) %{py3_sitedir}/_solv.so
274 %{py3_sitedir}/solv.py
275 %endif
276
277 %if %{with ruby}
278 %files -n ruby-solv
279 %defattr(644,root,root,755)
280 %doc examples/rbsolv
281 %attr(755,root,root) %{ruby_vendorarchdir}/solv.so
282 %endif
This page took 0.085942 seconds and 3 git commands to generate.