]> git.pld-linux.org Git - packages/libdnf.git/blame - libdnf.spec
- unconditional noarch subpackages
[packages/libdnf.git] / libdnf.spec
CommitLineData
7a27efbb
JB
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
50115de4 6%bcond_with rpm5 # build with rpm5
7a27efbb
JB
7#
8Summary: Library providing simplified C and Python API to libsolv
9Summary(pl.UTF-8): Biblioteka zapewniająca uproszczone API C i Pythona do libsolv
10Name: libdnf
11Version: 0.11.1
df7588d2 12Release: 7
7a27efbb
JB
13License: LGPL v2.1+
14Group: Libraries
15#Source0Download: https://github.com/rpm-software-management/libdnf/releases
16Source0: https://github.com/rpm-software-management/libdnf/archive/%{version}/%{name}-%{version}.tar.gz
17# Source0-md5: d62c97d5534394c365fe77978ce9cdd5
18Patch0: %{name}-rpm5.patch
19URL: https://github.com/rpm-software-management/libdnf
20BuildRequires: check-devel
21BuildRequires: cmake >= 2.4
22BuildRequires: glib2-devel >= 1:2.46.0
23BuildRequires: gobject-introspection-devel
24BuildRequires: gtk-doc
25BuildRequires: librepo-devel
26%{?with_rhsm:BuildRequires: librhsm-devel}
27BuildRequires: libsolv-devel >= 0.6.21
28BuildRequires: pkgconfig
50115de4 29BuildRequires: rpm-devel
7a27efbb
JB
30BuildRequires: rpm-pythonprov
31BuildRequires: rpmbuild(macros) >= 1.714
32BuildRequires: sphinx-pdg
33BuildRequires: valgrind
34Requires: glib2 >= 1:2.46.0
35Requires: libsolv >= 0.6.21
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38# hawkey(3) man page shared between python-hawkey and python3-hawkey
39%define _duplicate_files_terminate_build 0
40
41%description
42Library providing simplified C and Python API to libsolv.
43
44%description -l pl.UTF-8
45Biblioteka zapewniająca uproszczone API C i Pythona do libsolv.
46
47%package devel
48Summary: Header files for libdnf library
49Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libdnf
50Group: Development/Libraries
51Requires: %{name} = %{version}-%{release}
52Requires: glib2-devel >= 1:2.46.0
53Requires: librepo-devel
54Requires: libsolv-devel >= 0.6.21
55Requires: rpm-devel >= 5
56
57%description devel
58Header files for libdnf library.
59
60%description devel -l pl.UTF-8
61Pliki nagłówkowe biblioteki libdnf.
62
63%package apidocs
64Summary: API documentation for libdnf library
65Summary(pl.UTF-8): Dokumentacja API biblioteki libdnf
66Group: Documentation
4e178bc9 67BuildArch: noarch
7a27efbb
JB
68
69%description apidocs
70API documentation for libdnf library.
71
72%description apidocs -l pl.UTF-8
73Dokumentacja API biblioteki libdnf.
74
75%package -n python-hawkey
76Summary: Python 2.x bindings for hawkey library
77Summary(pl.UTF-8): Wiązania Pythona 2.x do biblioteki hawkey
78Group: Libraries/Python
79Requires: %{name} = %{version}-%{release}
80
81%description -n python-hawkey
82Python 2.x bindings for hawkey library.
83
84%description -n python-hawkey -l pl.UTF-8
85Wiązania Pythona 2.x do biblioteki hawkey.
86
87%package -n python-hawkey-test
88Summary: Test module for hawkey library
89Summary(pl.UTF-8): Moduł testowy dla biblioteki hawkey
90Group: Development/Libraries
91Requires: python-hawkey = %{version}-%{release}
92
93%description -n python-hawkey-test
94Test module for hawkey library.
95
96%description -n python-hawkey-test -l pl.UTF-8
97Moduł testowy dla biblioteki hawkey.
98
99%package -n python3-hawkey
100Summary: Python 3.x bindings for hawkey library
101Summary(pl.UTF-8): Wiązania Pythona 3.x do biblioteki hawkey
102Group: Libraries/Python
103Requires: %{name} = %{version}-%{release}
104
105%description -n python3-hawkey
106Python 3.x bindings for hawkey library.
107
108%description -n python3-hawkey -l pl.UTF-8
109Wiązania Pythona 3.x do biblioteki hawkey.
110
111%package -n python3-hawkey-test
112Summary: Test module for hawkey library
113Summary(pl.UTF-8): Moduł testowy dla biblioteki hawkey
114Group: Development/Libraries
115Requires: python3-hawkey = %{version}-%{release}
116
117%description -n python3-hawkey-test
118Test module for hawkey library.
119
120%description -n python3-hawkey-test -l pl.UTF-8
121Moduł testowy dla biblioteki hawkey.
122
e3819ff5
JB
123%package -n python-hawkey-apidocs
124Summary: API documentation for Python hawkey module
125Summary(pl.UTF-8): Dokumentacja API modułu Pythona hawkey
126Group: Documentation
127Obsoletes: hawkey-apidocs < 0.6.4-2
4e178bc9 128BuildArch: noarch
e3819ff5
JB
129
130%description -n python-hawkey-apidocs
131API documentation for Python hawkey module.
132
133%description -n python-hawkey-apidocs -l pl.UTF-8
134Dokumentacja API modułu Pythona hawkey.
135
7a27efbb
JB
136%prep
137%setup -q
50115de4 138%{?with_rpm5:%patch0 -p1}
7a27efbb
JB
139
140%build
0c360926 141export CFLAGS="%{rpmcflags} -D_GNU_SOURCE}"
7a27efbb
JB
142install -d build %{?with_python3:build-py3}
143cd build
144%cmake .. \
145 %{?with_rhsm:-DENABLE_RHSM_SUPPORT=ON}
146
147%{__make}
148%{__make} doc-html
149
150%if %{with python3}
151cd ../build-py3
152%cmake .. \
153 %{?with_rhsm:-DENABLE_RHSM_SUPPORT=ON} \
154 -DPYTHON_DESIRED=3
155
156%{__make}
157%endif
158
159%install
160rm -rf $RPM_BUILD_ROOT
161
162%if %{with python3}
163%{__make} -C build-py3 install \
164 DESTDIR=$RPM_BUILD_ROOT
165
166%py3_comp $RPM_BUILD_ROOT%{py3_sitedir}/hawkey
167%py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}/hawkey
168%endif
169
170%{__make} -C build install \
171 DESTDIR=$RPM_BUILD_ROOT
172
173%py_comp $RPM_BUILD_ROOT%{py_sitedir}/hawkey
174%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/hawkey
175%py_postclean
176
177install -d $RPM_BUILD_ROOT%{_gtkdocdir}
178%{__mv} $RPM_BUILD_ROOT%{_datadir}/gtk-doc/html/* $RPM_BUILD_ROOT%{_gtkdocdir}
179
180%clean
181rm -rf $RPM_BUILD_ROOT
182
183%post -p /sbin/ldconfig
184%postun -p /sbin/ldconfig
185
186%files
187%defattr(644,root,root,755)
188%doc AUTHORS MAINTAINERS NEWS README.md docs/release_notes.rst
189%attr(755,root,root) %{_libdir}/libdnf.so.1
190%{_libdir}/girepository-1.0/Dnf-1.0.typelib
191
192%files devel
193%defattr(644,root,root,755)
194%attr(755,root,root) %{_libdir}/libdnf.so
195%{_includedir}/libdnf
196%{_datadir}/gir-1.0/Dnf-1.0.gir
197%{_pkgconfigdir}/libdnf.pc
198
199%if %{with apidocs}
200%files apidocs
201%defattr(644,root,root,755)
202%{_gtkdocdir}/libdnf
203%endif
204
205%files -n python-hawkey
206%defattr(644,root,root,755)
207%dir %{py_sitedir}/hawkey
208%attr(755,root,root) %{py_sitedir}/hawkey/_hawkeymodule.so
209%{py_sitedir}/hawkey/__init__.py[co]
210%{_mandir}/man3/hawkey.3*
211
212%files -n python-hawkey-test
213%defattr(644,root,root,755)
214%dir %{py_sitedir}/hawkey/test
215%{py_sitedir}/hawkey/test/*.py[co]
216%attr(755,root,root) %{py_sitedir}/hawkey/test/_hawkey_testmodule.so
217
218%if %{with python3}
219%files -n python3-hawkey
220%defattr(644,root,root,755)
221%dir %{py3_sitedir}/hawkey
222%attr(755,root,root) %{py3_sitedir}/hawkey/_hawkey.so
223%{py3_sitedir}/hawkey/*.py
224%{py3_sitedir}/hawkey/__pycache__
225%{_mandir}/man3/hawkey.3*
226
227%files -n python3-hawkey-test
228%defattr(644,root,root,755)
229%dir %{py3_sitedir}/hawkey/test
230%{py3_sitedir}/hawkey/test/*.py
231%{py3_sitedir}/hawkey/test/__pycache__
232%attr(755,root,root) %{py3_sitedir}/hawkey/test/_hawkey_test.so
233%endif
e3819ff5
JB
234
235%files -n python-hawkey-apidocs
236%defattr(644,root,root,755)
237%doc build/docs/hawkey/html/{_static,*.html,*.js}
This page took 0.261378 seconds and 4 git commands to generate.