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