]>
Commit | Line | Data |
---|---|---|
9f59a81c JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python3 # Python 3.x bindings | |
8fb9366d | 4 | |
98cfb3cf | 5 | %define gitrev b5cd13dc11dac38d4b7667dfe91b974424157935 |
9f59a81c JB |
6 | Summary: High-level API for the libsolv library |
7 | Summary(pl.UTF-8): Wysokopoziomowe API dla biblioteki libsolv | |
8 | Name: hawkey | |
98cfb3cf | 9 | Version: 0.5.3 |
caaf861b | 10 | Release: 5 |
9f59a81c JB |
11 | License: LGPL v2.1+ |
12 | Group: Libraries | |
98cfb3cf JB |
13 | Source0: https://github.com/rpm-software-management/hawkey/archive/%{gitrev}/%{name}-%{gitrev}.tar.gz |
14 | # Source0-md5: 83147172a890bcc682cd7e0d9a5d34ed | |
b0d2e2a5 | 15 | URL: https://github.com/rpm-software-management/hawkey |
9f59a81c JB |
16 | BuildRequires: check-devel |
17 | BuildRequires: cmake >= 2.4 | |
18 | BuildRequires: expat-devel | |
affad8a3 | 19 | BuildRequires: libsolv-devel >= 0.6.5 |
9f59a81c JB |
20 | BuildRequires: python-devel >= 2 |
21 | %{?with_python3:BuildRequires: python3-devel >= 3} | |
22 | BuildRequires: rpm-devel | |
23 | BuildRequires: sphinx-pdg | |
24 | BuildRequires: tar >= 1:1.22 | |
25 | BuildRequires: xz | |
26 | BuildRequires: zlib-devel | |
affad8a3 | 27 | Requires: libsolv >= 0.6.5 |
9f59a81c JB |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
29 | ||
30 | %description | |
31 | Hawkey is a library providing simplified C and Python API to libsolv. | |
32 | ||
33 | %description -l pl.UTF-8 | |
34 | Hawkey to biblioteka udostępniająca uproszczone API dla języków C i | |
35 | Python do biblioteki libsolv. | |
36 | ||
37 | %package devel | |
38 | Summary: Header files for hawkey library | |
39 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki hawkey | |
40 | Group: Development/Libraries | |
41 | Requires: %{name} = %{version}-%{release} | |
affad8a3 | 42 | Requires: libsolv-devel >= 0.6.5 |
9f59a81c JB |
43 | Requires: rpm-devel |
44 | Requires: zlib-devel | |
98cfb3cf | 45 | Obsoletes: hawkey-static |
9f59a81c JB |
46 | |
47 | %description devel | |
48 | Header files for hawkey library. | |
49 | ||
50 | %description devel -l pl.UTF-8 | |
51 | Pliki nagłówkowe biblioteki hawkey. | |
52 | ||
9f59a81c JB |
53 | %package apidocs |
54 | Summary: API documentation for hawkey library | |
55 | Summary(pl.UTF-8): Dokumentacja API biblioteki hawkey | |
56 | Group: Documentation | |
57 | ||
58 | %description apidocs | |
59 | API documentation for hawkey library. | |
60 | ||
61 | %description apidocs -l pl.UTF-8 | |
62 | Dokumentacja API biblioteki hawkey. | |
63 | ||
64 | %package -n python-hawkey | |
65 | Summary: Python 2.x bindings for hawkey library | |
66 | Summary(pl.UTF-8): Wiązania Pythona 2.x do biblioteki hawkey | |
67 | Group: Libraries/Python | |
68 | Requires: %{name} = %{version}-%{release} | |
69 | ||
70 | %description -n python-hawkey | |
71 | Python 2.x bindings for hawkey library. | |
72 | ||
73 | %description -n python-hawkey -l pl.UTF-8 | |
74 | Wiązania Pythona 2.x do biblioteki hawkey. | |
75 | ||
98cfb3cf JB |
76 | %package -n python-hawkey-test |
77 | Summary: Test module for hawkey library | |
78 | Summary(pl.UTF-8): Moduł testowy dla biblioteki hawkey | |
79 | Group: Development/Libraries | |
80 | Requires: python-hawkey = %{version}-%{release} | |
81 | ||
82 | %description -n python-hawkey-test | |
83 | Test module for hawkey library. | |
84 | ||
85 | %description -n python-hawkey-test -l pl.UTF-8 | |
86 | Moduł testowy dla biblioteki hawkey. | |
87 | ||
9f59a81c JB |
88 | %package -n python3-hawkey |
89 | Summary: Python 3.x bindings for hawkey library | |
90 | Summary(pl.UTF-8): Wiązania Pythona 3.x do biblioteki hawkey | |
91 | Group: Libraries/Python | |
92 | Requires: %{name} = %{version}-%{release} | |
93 | ||
94 | %description -n python3-hawkey | |
95 | Python 3.x bindings for hawkey library. | |
96 | ||
97 | %description -n python3-hawkey -l pl.UTF-8 | |
98 | Wiązania Pythona 3.x do biblioteki hawkey. | |
99 | ||
100 | %prep | |
98cfb3cf | 101 | %setup -q -n %{name}-%{gitrev} |
9f59a81c JB |
102 | |
103 | %build | |
104 | install -d build %{?with_python3:build-py3} | |
105 | cd build | |
106 | %cmake .. | |
107 | ||
108 | %{__make} | |
109 | %{__make} doc | |
110 | ||
111 | %if %{with python3} | |
112 | cd ../build-py3 | |
113 | %cmake .. \ | |
114 | -DPYTHON_DESIRED=3 | |
115 | ||
116 | %{__make} | |
117 | %endif | |
118 | ||
119 | %install | |
120 | rm -rf $RPM_BUILD_ROOT | |
121 | ||
122 | %if %{with python3} | |
123 | %{__make} -C build-py3/src/python install \ | |
124 | DESTDIR=$RPM_BUILD_ROOT | |
125 | %endif | |
126 | ||
127 | %{__make} -C build install \ | |
128 | DESTDIR=$RPM_BUILD_ROOT | |
129 | ||
9f59a81c JB |
130 | %py_comp $RPM_BUILD_ROOT%{py_sitedir}/hawkey |
131 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}/hawkey | |
132 | %py_postclean | |
133 | ||
134 | %clean | |
135 | rm -rf $RPM_BUILD_ROOT | |
136 | ||
137 | %post -p /sbin/ldconfig | |
138 | %postun -p /sbin/ldconfig | |
139 | ||
140 | %files | |
141 | %defattr(644,root,root,755) | |
8fb9366d | 142 | %doc AUTHORS README.rst |
98cfb3cf | 143 | %attr(755,root,root) %{_libdir}/libhawkey.so.2 |
9f59a81c JB |
144 | |
145 | %files devel | |
146 | %defattr(644,root,root,755) | |
147 | %attr(755,root,root) %{_libdir}/libhawkey.so | |
148 | %{_includedir}/hawkey | |
149 | %{_pkgconfigdir}/hawkey.pc | |
150 | %{_mandir}/man3/hawkey.3* | |
151 | ||
152 | %files apidocs | |
153 | %defattr(644,root,root,755) | |
154 | %doc build/doc/{*.html,*.js,_static} | |
155 | ||
156 | %files -n python-hawkey | |
157 | %defattr(644,root,root,755) | |
158 | %dir %{py_sitedir}/hawkey | |
159 | %attr(755,root,root) %{py_sitedir}/hawkey/_hawkeymodule.so | |
68d3ab50 | 160 | %{py_sitedir}/hawkey/*.py[co] |
9f59a81c | 161 | |
98cfb3cf JB |
162 | %files -n python-hawkey-test |
163 | %defattr(644,root,root,755) | |
164 | %dir %{py_sitedir}/hawkey/test | |
165 | %{py_sitedir}/hawkey/test/*.py[co] | |
166 | %attr(755,root,root) %{py_sitedir}/hawkey/test/_hawkey_testmodule.so | |
167 | ||
9f59a81c JB |
168 | %if %{with python3} |
169 | %files -n python3-hawkey | |
170 | %defattr(644,root,root,755) | |
171 | %dir %{py3_sitedir}/hawkey | |
172 | %attr(755,root,root) %{py3_sitedir}/hawkey/_hawkey.so | |
68d3ab50 | 173 | %{py3_sitedir}/hawkey/*.py |
9f59a81c | 174 | %endif |