]>
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 | |
cf229d4a JB |
13 | Version: 2.2.0 |
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 | |
19 | # Source0-md5: 63cc49401521662c94cd4107898c744c | |
20 | Patch0: %{name}-sh.patch | |
21 | URL: https://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 | |
176 | ../%configure \ | |
177 | PYTHON=%{__python3} \ | |
178 | --disable-silent-rules | |
179 | ||
180 | %{__make} -C cython \ | |
181 | top_builddir="${topdir}/build" | |
182 | %endif | |
7980613e MB |
183 | |
184 | %install | |
185 | rm -rf $RPM_BUILD_ROOT | |
6f73066a JB |
186 | |
187 | %{__make} -C build install \ | |
7980613e MB |
188 | DESTDIR=$RPM_BUILD_ROOT |
189 | ||
4bc15581 ER |
190 | # obsoleted by .pc |
191 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la | |
192 | ||
a4a4e4b0 | 193 | %if %{with cython} |
0d502360 ER |
194 | install -d $RPM_BUILD_ROOT%{_includedir}/plist/cython |
195 | cp -p cython/plist.pxd $RPM_BUILD_ROOT%{_includedir}/plist/cython/plist.pxd | |
a4a4e4b0 JB |
196 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/plist.la \ |
197 | %{?with_static_libs:$RPM_BUILD_ROOT%{py_sitedir}/plist.a} | |
6f73066a JB |
198 | |
199 | %if %{with python3} | |
200 | %{__make} -C build-py3/cython install \ | |
201 | DESTDIR=$RPM_BUILD_ROOT \ | |
202 | top_builddir="$(pwd)/build" | |
203 | ||
cf229d4a | 204 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/plist.la |
6f73066a JB |
205 | %{?with_static_libs:$RPM_BUILD_ROOT%{py3_sitedir}/plist.a} |
206 | %endif | |
486cfdf5 ER |
207 | %endif |
208 | ||
7980613e MB |
209 | %clean |
210 | rm -rf $RPM_BUILD_ROOT | |
211 | ||
212 | %post -p /sbin/ldconfig | |
213 | %postun -p /sbin/ldconfig | |
214 | ||
46e8b3f9 JB |
215 | %post c++ -p /sbin/ldconfig |
216 | %postun c++ -p /sbin/ldconfig | |
217 | ||
7980613e MB |
218 | %files |
219 | %defattr(644,root,root,755) | |
cf229d4a | 220 | %doc AUTHORS NEWS README.md |
4bc15581 | 221 | %attr(755,root,root) %{_bindir}/plistutil |
cf229d4a JB |
222 | %attr(755,root,root) %{_libdir}/libplist-2.0.so.*.*.* |
223 | %attr(755,root,root) %ghost %{_libdir}/libplist-2.0.so.3 | |
224 | %{_mandir}/man1/plistutil.1* | |
7980613e MB |
225 | |
226 | %files devel | |
227 | %defattr(644,root,root,755) | |
cf229d4a | 228 | %attr(755,root,root) %{_libdir}/libplist-2.0.so |
46e8b3f9 JB |
229 | %dir %{_includedir}/plist |
230 | %{_includedir}/plist/plist.h | |
cf229d4a | 231 | %{_pkgconfigdir}/libplist-2.0.pc |
7980613e | 232 | |
a4a4e4b0 JB |
233 | %if %{with static_libs} |
234 | %files static | |
235 | %defattr(644,root,root,755) | |
cf229d4a | 236 | %{_libdir}/libplist-2.0.a |
a4a4e4b0 JB |
237 | %endif |
238 | ||
46e8b3f9 JB |
239 | %files c++ |
240 | %defattr(644,root,root,755) | |
cf229d4a JB |
241 | %attr(755,root,root) %{_libdir}/libplist++-2.0.so.*.*.* |
242 | %attr(755,root,root) %ghost %{_libdir}/libplist++-2.0.so.3 | |
46e8b3f9 JB |
243 | |
244 | %files c++-devel | |
245 | %defattr(644,root,root,755) | |
cf229d4a | 246 | %attr(755,root,root) %{_libdir}/libplist++-2.0.so |
46e8b3f9 JB |
247 | %{_includedir}/plist/Array.h |
248 | %{_includedir}/plist/Boolean.h | |
249 | %{_includedir}/plist/Data.h | |
250 | %{_includedir}/plist/Date.h | |
251 | %{_includedir}/plist/Dictionary.h | |
252 | %{_includedir}/plist/Integer.h | |
253 | %{_includedir}/plist/Key.h | |
254 | %{_includedir}/plist/Node.h | |
255 | %{_includedir}/plist/Real.h | |
256 | %{_includedir}/plist/String.h | |
257 | %{_includedir}/plist/Structure.h | |
258 | %{_includedir}/plist/Uid.h | |
259 | %{_includedir}/plist/plist++.h | |
cf229d4a | 260 | %{_pkgconfigdir}/libplist++-2.0.pc |
46e8b3f9 JB |
261 | |
262 | %if %{with static_libs} | |
263 | %files c++-static | |
264 | %defattr(644,root,root,755) | |
cf229d4a | 265 | %{_libdir}/libplist++-2.0.a |
46e8b3f9 JB |
266 | %endif |
267 | ||
4bc15581 | 268 | %if %{with cython} |
7980613e MB |
269 | %files -n python-plist |
270 | %defattr(644,root,root,755) | |
486cfdf5 | 271 | %attr(755,root,root) %{py_sitedir}/plist.so |
46e8b3f9 | 272 | |
6f73066a JB |
273 | %if %{with cython} |
274 | %files -n python3-plist | |
275 | %defattr(644,root,root,755) | |
276 | %attr(755,root,root) %{py3_sitedir}/plist.so | |
277 | %endif | |
278 | ||
46e8b3f9 JB |
279 | %files -n python-plist-devel |
280 | %defattr(644,root,root,755) | |
281 | %{_includedir}/plist/cython | |
486cfdf5 | 282 | %endif |