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