]> git.pld-linux.org Git - packages/libdnf.git/blob - libdnf.spec
- updated to 0.70.0
[packages/libdnf.git] / libdnf.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs # do not build and package API docs
4 %bcond_without  python3 # CPython 3.x module
5 %bcond_with     rhsm    # Red Had Subscription Management support
6 %bcond_with     rpm5    # build with rpm5
7 #
8 Summary:        Library providing simplified C and Python API to libsolv
9 Summary(pl.UTF-8):      Biblioteka zapewniająca uproszczone API C i Pythona do libsolv
10 Name:           libdnf
11 Version:        0.70.0
12 Release:        1
13 License:        LGPL v2.1+
14 Group:          Libraries
15 #Source0Download: https://github.com/rpm-software-management/libdnf/releases
16 Source0:        https://github.com/rpm-software-management/libdnf/archive/%{version}/%{name}-%{version}.tar.gz
17 # Source0-md5:  e1abd04a23ca2fb35f0edda3a2e5556a
18 Patch0:         %{name}-gpgme-pkgconfig.patch
19 Patch1:         %{name}-rpm5.patch
20 URL:            https://github.com/rpm-software-management/libdnf
21 BuildRequires:  check-devel
22 BuildRequires:  cmake >= 2.8.5
23 BuildRequires:  cppunit-devel
24 BuildRequires:  gettext-tools
25 BuildRequires:  glib2-devel >= 1:2.46.0
26 BuildRequires:  gobject-introspection-devel
27 BuildRequires:  gpgme-devel
28 BuildRequires:  gtk-doc
29 BuildRequires:  json-c-devel
30 BuildRequires:  libmodulemd-devel >= 2.12.0
31 BuildRequires:  librepo-devel >= 1.13.0
32 %{?with_rhsm:BuildRequires:     librhsm-devel >= 0.0.3}
33 BuildRequires:  libsmartcols-devel
34 BuildRequires:  libsolv-devel >= 0.7.17
35 BuildRequires:  openssl-devel
36 BuildRequires:  pkgconfig
37 BuildRequires:  rpm-build >= 4.6
38 %{!?with_rpm5:BuildRequires:    rpm-devel >= 1:4.15.0}
39 %{?with_rpm5:BuildRequires:     rpm-devel >= 5}
40 BuildRequires:  rpm-pythonprov
41 BuildRequires:  rpmbuild(macros) >= 1.714
42 BuildRequires:  sphinx-pdg
43 BuildRequires:  sqlite3-devel >= 3
44 BuildRequires:  swig
45 BuildRequires:  swig-python
46 BuildRequires:  valgrind
47 BuildRequires:  zchunk-devel >= 0.9.11
48 Requires:       glib2 >= 1:2.46.0
49 Requires:       libsolv >= 0.7.17
50 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52 # PyErr_Format(HyExc_Exception, e.what());
53 %define         filterout       -Wformat -Werror=format-security
54
55 # hawkey(3) man page shared between python-hawkey and python3-hawkey
56 %define         _duplicate_files_terminate_build        0
57
58 %description
59 Library providing simplified C and Python API to libsolv.
60
61 %description -l pl.UTF-8
62 Biblioteka zapewniająca uproszczone API C i Pythona do libsolv.
63
64 %package devel
65 Summary:        Header files for libdnf library
66 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libdnf
67 Group:          Development/Libraries
68 Requires:       %{name} = %{version}-%{release}
69 Requires:       glib2-devel >= 1:2.46.0
70 Requires:       librepo-devel >= 1.13.0
71 Requires:       libsolv-devel >= 0.7.17
72 %{!?with_rpm5:Requires: rpm-devel >= 1:4.15.0}
73 %{?with_rpm5:Requires:  rpm-devel >= 5}
74
75 %description devel
76 Header files for libdnf library.
77
78 %description devel -l pl.UTF-8
79 Pliki nagłówkowe biblioteki libdnf.
80
81 %package apidocs
82 Summary:        API documentation for libdnf library
83 Summary(pl.UTF-8):      Dokumentacja API biblioteki libdnf
84 Group:          Documentation
85 BuildArch:      noarch
86
87 %description apidocs
88 API documentation for libdnf library.
89
90 %description apidocs -l pl.UTF-8
91 Dokumentacja API biblioteki libdnf.
92
93 %package -n python-hawkey
94 Summary:        Python 2.x bindings for hawkey library
95 Summary(pl.UTF-8):      Wiązania Pythona 2.x do biblioteki hawkey
96 Group:          Libraries/Python
97 Requires:       %{name} = %{version}-%{release}
98
99 %description -n python-hawkey
100 Python 2.x bindings for hawkey library.
101
102 %description -n python-hawkey -l pl.UTF-8
103 Wiązania Pythona 2.x do biblioteki hawkey.
104
105 %package -n python-hawkey-test
106 Summary:        Test module for hawkey library
107 Summary(pl.UTF-8):      Moduł testowy dla biblioteki hawkey
108 Group:          Development/Libraries
109 Requires:       python-hawkey = %{version}-%{release}
110
111 %description -n python-hawkey-test
112 Test module for hawkey library.
113
114 %description -n python-hawkey-test -l pl.UTF-8
115 Moduł testowy dla biblioteki hawkey.
116
117 %package -n python3-hawkey
118 Summary:        Python 3.x bindings for hawkey library
119 Summary(pl.UTF-8):      Wiązania Pythona 3.x do biblioteki hawkey
120 Group:          Libraries/Python
121 Requires:       %{name} = %{version}-%{release}
122
123 %description -n python3-hawkey
124 Python 3.x bindings for hawkey library.
125
126 %description -n python3-hawkey -l pl.UTF-8
127 Wiązania Pythona 3.x do biblioteki hawkey.
128
129 %package -n python3-hawkey-test
130 Summary:        Test module for hawkey library
131 Summary(pl.UTF-8):      Moduł testowy dla biblioteki hawkey
132 Group:          Development/Libraries
133 Requires:       python3-hawkey = %{version}-%{release}
134
135 %description -n python3-hawkey-test
136 Test module for hawkey library.
137
138 %description -n python3-hawkey-test -l pl.UTF-8
139 Moduł testowy dla biblioteki hawkey.
140
141 %package -n python-hawkey-apidocs
142 Summary:        API documentation for Python hawkey module
143 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona hawkey
144 Group:          Documentation
145 Obsoletes:      hawkey-apidocs < 0.6.4-2
146 BuildArch:      noarch
147
148 %description -n python-hawkey-apidocs
149 API documentation for Python hawkey module.
150
151 %description -n python-hawkey-apidocs -l pl.UTF-8
152 Dokumentacja API modułu Pythona hawkey.
153
154 %package -n python-libdnf
155 Summary:        Python 2.x bindings for libdnf library
156 Summary(pl.UTF-8):      Wiązania Pythona 2.x do biblioteki libdnf
157 Group:          Libraries/Python
158 Requires:       %{name} = %{version}-%{release}
159
160 %description -n python-libdnf
161 Python 2.x bindings for hawkey libdnf.
162
163 %description -n python-libdnf -l pl.UTF-8
164 Wiązania Pythona 2.x do biblioteki libdnf.
165
166 %package -n python3-libdnf
167 Summary:        Python 3.x bindings for libdnf library
168 Summary(pl.UTF-8):      Wiązania Pythona 3.x do biblioteki libdnf
169 Group:          Libraries/Python
170 Requires:       %{name} = %{version}-%{release}
171
172 %description -n python3-libdnf
173 Python 3.x bindings for hawkey library.
174
175 %description -n python3-libdnf -l pl.UTF-8
176 Wiązania Pythona 3.x do biblioteki libdnf.
177
178 %prep
179 %setup -q
180 %patch0 -p1
181 %{?with_rpm5:%patch1 -p1}
182
183 %build
184 export CFLAGS="%{rpmcflags} -D_GNU_SOURCE}"
185 install -d build %{?with_python3:build-py3}
186 cd build
187 %cmake .. \
188         %{?with_rhsm:-DENABLE_RHSM_SUPPORT=ON} \
189         -DPYTHON_DESIRED=2
190
191 %{__make}
192 %{__make} doc-html
193
194 %if %{with python3}
195 cd ../build-py3
196 %cmake .. \
197         %{?with_rhsm:-DENABLE_RHSM_SUPPORT=ON} \
198         -DPYTHON_DESIRED=3
199
200 %{__make}
201 %endif
202
203 %install
204 rm -rf $RPM_BUILD_ROOT
205
206 %if %{with python3}
207 %{__make} -C build-py3 install \
208         DESTDIR=$RPM_BUILD_ROOT
209
210 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/hawkey
211 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/hawkey
212
213 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/libdnf
214 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/libdnf
215 %endif
216
217 %{__make} -C build install \
218         DESTDIR=$RPM_BUILD_ROOT
219
220 %py_comp $RPM_BUILD_ROOT%{py_sitedir}/hawkey
221 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/hawkey
222
223 %py_comp $RPM_BUILD_ROOT%{py_sitedir}/libdnf
224 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/libdnf
225 %py_postclean
226
227 install -d $RPM_BUILD_ROOT%{_gtkdocdir}
228 %{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc/html/* $RPM_BUILD_ROOT%{_gtkdocdir}
229
230 %find_lang %{name}
231
232 %clean
233 rm -rf $RPM_BUILD_ROOT
234
235 %post   -p /sbin/ldconfig
236 %postun -p /sbin/ldconfig
237
238 %files -f %{name}.lang
239 %defattr(644,root,root,755)
240 %doc AUTHORS README.md docs/release_notes.rst
241 %attr(755,root,root) %{_libdir}/libdnf.so.2
242 %dir %{_libdir}/libdnf
243 %dir %{_libdir}/libdnf/plugins
244
245 %files devel
246 %defattr(644,root,root,755)
247 %attr(755,root,root) %{_libdir}/libdnf.so
248 %{_includedir}/libdnf
249 %{_pkgconfigdir}/libdnf.pc
250
251 %if %{with apidocs}
252 %files apidocs
253 %defattr(644,root,root,755)
254 %{_gtkdocdir}/libdnf
255 %endif
256
257 %files -n python-hawkey
258 %defattr(644,root,root,755)
259 %dir %{py_sitedir}/hawkey
260 %attr(755,root,root) %{py_sitedir}/hawkey/_hawkeymodule.so
261 %{py_sitedir}/hawkey/__init__.py[co]
262 %{_mandir}/man3/hawkey.3*
263
264 %files -n python-hawkey-test
265 %defattr(644,root,root,755)
266 %dir %{py_sitedir}/hawkey/test
267 %{py_sitedir}/hawkey/test/*.py[co]
268 %attr(755,root,root) %{py_sitedir}/hawkey/test/_hawkey_testmodule.so
269
270 %if %{with python3}
271 %files -n python3-hawkey
272 %defattr(644,root,root,755)
273 %dir %{py3_sitedir}/hawkey
274 %attr(755,root,root) %{py3_sitedir}/hawkey/_hawkey.so
275 %{py3_sitedir}/hawkey/*.py
276 %{py3_sitedir}/hawkey/__pycache__
277 %{_mandir}/man3/hawkey.3*
278
279 %files -n python3-hawkey-test
280 %defattr(644,root,root,755)
281 %dir %{py3_sitedir}/hawkey/test
282 %{py3_sitedir}/hawkey/test/*.py
283 %{py3_sitedir}/hawkey/test/__pycache__
284 %attr(755,root,root) %{py3_sitedir}/hawkey/test/_hawkey_test.so
285 %endif
286
287 %files -n python-hawkey-apidocs
288 %defattr(644,root,root,755)
289 %doc build/docs/hawkey/html/{_static,*.html,*.js}
290
291 %files -n python-libdnf
292 %defattr(644,root,root,755)
293 %dir %{py_sitedir}/libdnf
294 %{py_sitedir}/libdnf/*.py[co]
295 %attr(755,root,root) %{py_sitedir}/libdnf/*.so
296
297 %files -n python3-libdnf
298 %defattr(644,root,root,755)
299 %dir %{py3_sitedir}/libdnf
300 %{py3_sitedir}/libdnf/*.py
301 %{py3_sitedir}/libdnf/__pycache__
302 %attr(755,root,root) %{py3_sitedir}/libdnf/*.so
This page took 0.103529 seconds and 3 git commands to generate.