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