]>
Commit | Line | Data |
---|---|---|
486cfdf5 ER |
1 | # |
2 | # Conditional build: | |
6f73066a JB |
3 | %bcond_without cython # Python modules (Cython based) |
4 | %bcond_without python3 # Python 3 module | |
a4a4e4b0 | 5 | %bcond_without static_libs # static libraries |
486cfdf5 | 6 | |
6f73066a JB |
7 | %if %{without cython} |
8 | %undefine with_python3 | |
9 | %endif | |
7980613e MB |
10 | Summary: Library for manipulating Apple Property Lists |
11 | Summary(pl.UTF-8): Biblioteka do manipulowania Apple Property Lists | |
12 | Name: libplist | |
6cdbadb5 | 13 | Version: 2.0.0 |
5f241af9 | 14 | Release: 5 |
46e8b3f9 | 15 | License: LGPL v2.1+ |
7980613e | 16 | Group: Libraries |
489bd56d | 17 | # Source0Download: http://www.libimobiledevice.org/ |
a0267948 | 18 | Source0: http://www.libimobiledevice.org/downloads/%{name}-%{version}.tar.bz2 |
6cdbadb5 | 19 | # Source0-md5: 16fb70d869f66e23cbe140109e78b650 |
5f241af9 | 20 | Patch0: python-3.8.patch |
4987ce66 | 21 | URL: http://www.libimobiledevice.org/ |
6f73066a | 22 | BuildRequires: autoconf >= 2.64 |
a4a4e4b0 | 23 | BuildRequires: automake |
af989959 | 24 | BuildRequires: libstdc++-devel |
a4a4e4b0 | 25 | BuildRequires: libtool |
7980613e | 26 | BuildRequires: pkgconfig |
a4a4e4b0 | 27 | BuildRequires: rpmbuild(macros) >= 1.600 |
4bc15581 | 28 | %if %{with cython} |
a4a4e4b0 JB |
29 | BuildRequires: python-Cython >= 0.17.0 |
30 | BuildRequires: python-devel >= 1:2.3 | |
31 | BuildRequires: python-modules >= 1:2.3 | |
6f73066a JB |
32 | %if %{with python3} |
33 | BuildRequires: python3-Cython >= 0.17.0 | |
34 | BuildRequires: python3-devel >= 1:3.2 | |
35 | BuildRequires: python3-modules >= 1:3.2 | |
36 | %endif | |
af989959 | 37 | BuildRequires: rpm-pythonprov |
4bc15581 | 38 | %endif |
7980613e MB |
39 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
40 | ||
41 | %description | |
42 | Library for manipulating Apple Property Lists in binary and XML | |
43 | format. | |
44 | ||
45 | %description -l pl.UTF-8 | |
46 | Biblioteka do manipulowania Apple Property Lists w formacie binarnym i | |
47 | XML. | |
48 | ||
49 | %package devel | |
46e8b3f9 JB |
50 | Summary: Header file for libplist library |
51 | Summary(pl.UTF-8): Plik nagłówkowy biblioteki libplist | |
7980613e MB |
52 | Group: Development/Libraries |
53 | Requires: %{name} = %{version}-%{release} | |
7980613e MB |
54 | |
55 | %description devel | |
46e8b3f9 | 56 | Header file for libplist library. |
7980613e MB |
57 | |
58 | %description devel -l pl.UTF-8 | |
46e8b3f9 | 59 | Plik nagłówkowy biblioteki libplist. |
7980613e | 60 | |
a4a4e4b0 JB |
61 | %package static |
62 | Summary: Static libplist library | |
63 | Summary(pl.UTF-8): Statyczna biblioteka libplist | |
64 | Group: Development/Libraries | |
65 | Requires: %{name}-devel = %{version}-%{release} | |
66 | ||
67 | %description static | |
68 | Static libplist library. | |
69 | ||
70 | %description static -l pl.UTF-8 | |
71 | Statyczna biblioteka libplist. | |
72 | ||
46e8b3f9 JB |
73 | %package c++ |
74 | Summary: C++ binding for libplist library | |
75 | Summary(pl.UTF-8): Wiązanie C++ do biblioteki libplist | |
76 | Group: Libraries | |
77 | Requires: %{name} = %{version}-%{release} | |
78 | ||
79 | %description c++ | |
80 | C++ binding for libplist library. | |
81 | ||
82 | %description c++ -l pl.UTF-8 | |
83 | Wiązanie C++ do biblioteki libplist. | |
84 | ||
85 | %package c++-devel | |
86 | Summary: Header files for libplist++ library | |
87 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libplist++ | |
88 | Group: Development/Libraries | |
89 | Requires: %{name}-c++ = %{version}-%{release} | |
90 | Requires: %{name}-devel = %{version}-%{release} | |
91 | Requires: libstdc++-devel | |
92 | ||
93 | %description c++-devel | |
94 | Header files for libplist++ library. | |
95 | ||
96 | %description c++-devel -l pl.UTF-8 | |
97 | Pliki nagłówkowe biblioteki libplist++. | |
98 | ||
99 | %package c++-static | |
100 | Summary: Static libplist++ library | |
101 | Summary(pl.UTF-8): Statyczna biblioteka libplist++ | |
102 | Group: Development/Libraries | |
103 | Requires: %{name}-c++-devel = %{version}-%{release} | |
104 | ||
105 | %description c++-static | |
106 | Static libplist++ library. | |
107 | ||
108 | %description c++-static -l pl.UTF-8 | |
109 | Statyczna biblioteka libplist++. | |
110 | ||
7980613e | 111 | %package -n python-plist |
6f73066a JB |
112 | Summary: Python 2 bindings for libplist |
113 | Summary(pl.UTF-8): Wiązania libplist dla Pythona 2 | |
7980613e | 114 | Group: Development/Languages/Python |
8d2cbeb9 | 115 | Requires: %{name} = %{version}-%{release} |
7980613e MB |
116 | |
117 | %description -n python-plist | |
6f73066a | 118 | Python 2 bindings for libplist. |
7980613e MB |
119 | |
120 | %description -n python-plist -l pl.UTF-8 | |
6f73066a JB |
121 | Wiązania libplist dla Pythona 2. |
122 | ||
123 | %package -n python3-plist | |
124 | Summary: Python 3 bindings for libplist | |
125 | Summary(pl.UTF-8): Wiązania libplist dla Pythona 3 | |
126 | Group: Development/Languages/Python | |
127 | Requires: %{name} = %{version}-%{release} | |
128 | ||
129 | %description -n python3-plist | |
130 | Python 3 bindings for libplist. | |
131 | ||
132 | %description -n python3-plist -l pl.UTF-8 | |
133 | Wiązania libplist dla Pythona 3. | |
7980613e | 134 | |
46e8b3f9 JB |
135 | %package -n python-plist-devel |
136 | Summary: Cython header file for Python libplist binding | |
137 | Summary(pl.UTF-8): Plik nagłówkowy Cythona dla wiązania Pythona do biblioteki libplist | |
138 | Group: Development/Libraries | |
139 | Requires: %{name}-devel = %{version}-%{release} | |
140 | Requires: python-Cython >= 0.17.0 | |
46e8b3f9 JB |
141 | |
142 | %description -n python-plist-devel | |
143 | Cython header file for Python libplist binding. | |
144 | ||
145 | %description -n python-plist-devel -l pl.UTF-8 | |
146 | Plik nagłówkowy Cythona dla wiązania Pythona do biblioteki libplist. | |
147 | ||
7980613e MB |
148 | %prep |
149 | %setup -q | |
5f241af9 | 150 | %patch0 -p1 |
7980613e | 151 | |
489bd56d ER |
152 | touch cython/*.py[xh] |
153 | ||
7980613e | 154 | %build |
a4a4e4b0 JB |
155 | %{__libtoolize} |
156 | %{__aclocal} -I m4 | |
157 | %{__autoconf} | |
158 | %{__autoheader} | |
159 | %{__automake} | |
6f73066a JB |
160 | install -d build |
161 | cd build | |
162 | ../%configure \ | |
4bc15581 | 163 | --disable-silent-rules \ |
a4a4e4b0 | 164 | %{!?with_static_libs:--disable-static} \ |
4bc15581 | 165 | %{!?with_cython:--without-cython} |
a4a4e4b0 | 166 | |
4bc15581 ER |
167 | # make -j1 due: |
168 | # make[2]: *** No rule to make target '../src/libplist.la', needed by 'libplist++.la'. Stop. | |
169 | %{__make} -j1 | |
6f73066a JB |
170 | cd .. |
171 | ||
172 | %if %{with python3} | |
173 | topdir=$(pwd) | |
174 | install -d build-py3 | |
175 | cd build-py3 | |
5f241af9 JR |
176 | export PYTHON_EXTRA_LIBS=$(python3-config --libs --embed) |
177 | export PYTHON_LDFLAGS=$(python3-config --libs --embed) | |
6f73066a JB |
178 | ../%configure \ |
179 | PYTHON=%{__python3} \ | |
180 | --disable-silent-rules | |
181 | ||
182 | %{__make} -C cython \ | |
183 | top_builddir="${topdir}/build" | |
184 | %endif | |
7980613e MB |
185 | |
186 | %install | |
187 | rm -rf $RPM_BUILD_ROOT | |
6f73066a JB |
188 | |
189 | %{__make} -C build install \ | |
7980613e MB |
190 | DESTDIR=$RPM_BUILD_ROOT |
191 | ||
4bc15581 ER |
192 | # obsoleted by .pc |
193 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la | |
194 | ||
a4a4e4b0 | 195 | %if %{with cython} |
7980613e MB |
196 | %py_comp $RPM_BUILD_ROOT%{py_sitedir} |
197 | %py_ocomp $RPM_BUILD_ROOT%{py_sitedir} | |
198 | %py_postclean | |
199 | ||
0d502360 ER |
200 | install -d $RPM_BUILD_ROOT%{_includedir}/plist/cython |
201 | cp -p cython/plist.pxd $RPM_BUILD_ROOT%{_includedir}/plist/cython/plist.pxd | |
a4a4e4b0 JB |
202 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/plist.la \ |
203 | %{?with_static_libs:$RPM_BUILD_ROOT%{py_sitedir}/plist.a} | |
6f73066a JB |
204 | |
205 | %if %{with python3} | |
206 | %{__make} -C build-py3/cython install \ | |
207 | DESTDIR=$RPM_BUILD_ROOT \ | |
208 | top_builddir="$(pwd)/build" | |
209 | ||
210 | %py3_comp $RPM_BUILD_ROOT%{py3_sitedir} | |
211 | %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir} | |
212 | ||
213 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/plist.la \ | |
214 | %{?with_static_libs:$RPM_BUILD_ROOT%{py3_sitedir}/plist.a} | |
215 | %endif | |
486cfdf5 ER |
216 | %endif |
217 | ||
7980613e MB |
218 | %clean |
219 | rm -rf $RPM_BUILD_ROOT | |
220 | ||
221 | %post -p /sbin/ldconfig | |
222 | %postun -p /sbin/ldconfig | |
223 | ||
46e8b3f9 JB |
224 | %post c++ -p /sbin/ldconfig |
225 | %postun c++ -p /sbin/ldconfig | |
226 | ||
7980613e MB |
227 | %files |
228 | %defattr(644,root,root,755) | |
8d2cbeb9 | 229 | %doc AUTHORS NEWS README |
4bc15581 | 230 | %attr(755,root,root) %{_bindir}/plistutil |
7980613e | 231 | %attr(755,root,root) %{_libdir}/libplist.so.*.*.* |
9517982e | 232 | %attr(755,root,root) %ghost %{_libdir}/libplist.so.3 |
7980613e MB |
233 | |
234 | %files devel | |
235 | %defattr(644,root,root,755) | |
7980613e | 236 | %attr(755,root,root) %{_libdir}/libplist.so |
46e8b3f9 JB |
237 | %dir %{_includedir}/plist |
238 | %{_includedir}/plist/plist.h | |
7980613e MB |
239 | %{_pkgconfigdir}/libplist.pc |
240 | ||
a4a4e4b0 JB |
241 | %if %{with static_libs} |
242 | %files static | |
243 | %defattr(644,root,root,755) | |
a4a4e4b0 JB |
244 | %{_libdir}/libplist.a |
245 | %endif | |
246 | ||
46e8b3f9 JB |
247 | %files c++ |
248 | %defattr(644,root,root,755) | |
249 | %attr(755,root,root) %{_libdir}/libplist++.so.*.*.* | |
9517982e | 250 | %attr(755,root,root) %ghost %{_libdir}/libplist++.so.3 |
46e8b3f9 JB |
251 | |
252 | %files c++-devel | |
253 | %defattr(644,root,root,755) | |
254 | %attr(755,root,root) %{_libdir}/libplist++.so | |
255 | %{_includedir}/plist/Array.h | |
256 | %{_includedir}/plist/Boolean.h | |
257 | %{_includedir}/plist/Data.h | |
258 | %{_includedir}/plist/Date.h | |
259 | %{_includedir}/plist/Dictionary.h | |
260 | %{_includedir}/plist/Integer.h | |
261 | %{_includedir}/plist/Key.h | |
262 | %{_includedir}/plist/Node.h | |
263 | %{_includedir}/plist/Real.h | |
264 | %{_includedir}/plist/String.h | |
265 | %{_includedir}/plist/Structure.h | |
266 | %{_includedir}/plist/Uid.h | |
267 | %{_includedir}/plist/plist++.h | |
268 | %{_pkgconfigdir}/libplist++.pc | |
269 | ||
270 | %if %{with static_libs} | |
271 | %files c++-static | |
272 | %defattr(644,root,root,755) | |
273 | %{_libdir}/libplist++.a | |
274 | %endif | |
275 | ||
4bc15581 | 276 | %if %{with cython} |
7980613e MB |
277 | %files -n python-plist |
278 | %defattr(644,root,root,755) | |
486cfdf5 | 279 | %attr(755,root,root) %{py_sitedir}/plist.so |
46e8b3f9 | 280 | |
6f73066a JB |
281 | %if %{with cython} |
282 | %files -n python3-plist | |
283 | %defattr(644,root,root,755) | |
284 | %attr(755,root,root) %{py3_sitedir}/plist.so | |
285 | %endif | |
286 | ||
46e8b3f9 JB |
287 | %files -n python-plist-devel |
288 | %defattr(644,root,root,755) | |
289 | %{_includedir}/plist/cython | |
486cfdf5 | 290 | %endif |