]> git.pld-linux.org Git - packages/libplist.git/blob - libplist.spec
06bc29cee608e7768921078796757e3761ecf760
[packages/libplist.git] / libplist.spec
1 #
2 # Conditional build:
3 %bcond_without  cython          # Python modules (Cython based)
4 %bcond_without  python3         # Python 3 module
5 %bcond_without  static_libs     # static libraries
6
7 %if %{without cython}
8 %undefine       with_python3
9 %endif
10 Summary:        Library for manipulating Apple Property Lists
11 Summary(pl.UTF-8):      Biblioteka do manipulowania Apple Property Lists
12 Name:           libplist
13 Version:        2.0.0
14 Release:        5
15 License:        LGPL v2.1+
16 Group:          Libraries
17 # Source0Download: http://www.libimobiledevice.org/
18 Source0:        http://www.libimobiledevice.org/downloads/%{name}-%{version}.tar.bz2
19 # Source0-md5:  16fb70d869f66e23cbe140109e78b650
20 Patch0:         python-3.8.patch
21 URL:            http://www.libimobiledevice.org/
22 BuildRequires:  autoconf >= 2.64
23 BuildRequires:  automake
24 BuildRequires:  libstdc++-devel
25 BuildRequires:  libtool
26 BuildRequires:  pkgconfig
27 BuildRequires:  rpmbuild(macros) >= 1.600
28 %if %{with cython}
29 BuildRequires:  python-Cython >= 0.17.0
30 BuildRequires:  python-devel >= 1:2.3
31 BuildRequires:  python-modules >= 1:2.3
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
37 BuildRequires:  rpm-pythonprov
38 %endif
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
50 Summary:        Header file for libplist library
51 Summary(pl.UTF-8):      Plik nagłówkowy biblioteki libplist
52 Group:          Development/Libraries
53 Requires:       %{name} = %{version}-%{release}
54
55 %description devel
56 Header file for libplist library.
57
58 %description devel -l pl.UTF-8
59 Plik nagłówkowy biblioteki libplist.
60
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
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
111 %package -n python-plist
112 Summary:        Python 2 bindings for libplist
113 Summary(pl.UTF-8):      Wiązania libplist dla Pythona 2
114 Group:          Development/Languages/Python
115 Requires:       %{name} = %{version}-%{release}
116
117 %description -n python-plist
118 Python 2 bindings for libplist.
119
120 %description -n python-plist -l pl.UTF-8
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.
134
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
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
148 %prep
149 %setup -q
150 %patch0 -p1
151
152 touch cython/*.py[xh]
153
154 %build
155 %{__libtoolize}
156 %{__aclocal} -I m4
157 %{__autoconf}
158 %{__autoheader}
159 %{__automake}
160 install -d build
161 cd build
162 ../%configure \
163         --disable-silent-rules \
164         %{!?with_static_libs:--disable-static} \
165         %{!?with_cython:--without-cython}
166
167 # make -j1 due:
168 # make[2]: *** No rule to make target '../src/libplist.la', needed by 'libplist++.la'.  Stop.
169 %{__make} -j1
170 cd ..
171
172 %if %{with python3}
173 topdir=$(pwd)
174 install -d build-py3
175 cd build-py3
176 export PYTHON_EXTRA_LIBS=$(python3-config --libs --embed)
177 export PYTHON_LDFLAGS=$(python3-config --libs --embed)
178 ../%configure \
179         PYTHON=%{__python3} \
180         --disable-silent-rules
181
182 %{__make} -C cython \
183         top_builddir="${topdir}/build"
184 %endif
185
186 %install
187 rm -rf $RPM_BUILD_ROOT
188
189 %{__make} -C build install \
190         DESTDIR=$RPM_BUILD_ROOT
191
192 # obsoleted by .pc
193 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
194
195 %if %{with cython}
196 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
197 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
198 %py_postclean
199
200 install -d $RPM_BUILD_ROOT%{_includedir}/plist/cython
201 cp -p cython/plist.pxd $RPM_BUILD_ROOT%{_includedir}/plist/cython/plist.pxd
202 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/plist.la \
203         %{?with_static_libs:$RPM_BUILD_ROOT%{py_sitedir}/plist.a}
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
216 %endif
217
218 %clean
219 rm -rf $RPM_BUILD_ROOT
220
221 %post   -p /sbin/ldconfig
222 %postun -p /sbin/ldconfig
223
224 %post   c++ -p /sbin/ldconfig
225 %postun c++ -p /sbin/ldconfig
226
227 %files
228 %defattr(644,root,root,755)
229 %doc AUTHORS NEWS README
230 %attr(755,root,root) %{_bindir}/plistutil
231 %attr(755,root,root) %{_libdir}/libplist.so.*.*.*
232 %attr(755,root,root) %ghost %{_libdir}/libplist.so.3
233
234 %files devel
235 %defattr(644,root,root,755)
236 %attr(755,root,root) %{_libdir}/libplist.so
237 %dir %{_includedir}/plist
238 %{_includedir}/plist/plist.h
239 %{_pkgconfigdir}/libplist.pc
240
241 %if %{with static_libs}
242 %files static
243 %defattr(644,root,root,755)
244 %{_libdir}/libplist.a
245 %endif
246
247 %files c++
248 %defattr(644,root,root,755)
249 %attr(755,root,root) %{_libdir}/libplist++.so.*.*.*
250 %attr(755,root,root) %ghost %{_libdir}/libplist++.so.3
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
276 %if %{with cython}
277 %files -n python-plist
278 %defattr(644,root,root,755)
279 %attr(755,root,root) %{py_sitedir}/plist.so
280
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
287 %files -n python-plist-devel
288 %defattr(644,root,root,755)
289 %{_includedir}/plist/cython
290 %endif
This page took 0.064891 seconds and 2 git commands to generate.