]> git.pld-linux.org Git - packages/libplist.git/blob - libplist.spec
e56ae1cc64266b1e33fa229a66aa9f744d8fe7e0
[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.3.0
14 Release:        1
15 License:        LGPL v2.1+
16 Group:          Libraries
17 # Source0Download: https://libimobiledevice.org/
18 Source0:        https://github.com/libimobiledevice/libplist/releases/download/%{version}/%{name}-%{version}.tar.bz2
19 # Source0-md5:  d6e2b9f713f18ae0a0f3353c03315bfd
20 Patch0:         %{name}-sh.patch
21 Patch1:         %{name}-link.patch
22 URL:            https://libimobiledevice.org/
23 BuildRequires:  autoconf >= 2.68
24 BuildRequires:  automake
25 BuildRequires:  libstdc++-devel
26 BuildRequires:  libtool >= 2:2
27 BuildRequires:  pkgconfig
28 BuildRequires:  rpmbuild(macros) >= 1.600
29 %if %{with cython}
30 BuildRequires:  python-Cython >= 0.17.0
31 BuildRequires:  python-devel >= 1:2.3
32 BuildRequires:  python-modules >= 1:2.3
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
38 BuildRequires:  rpm-pythonprov
39 %endif
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
51 Summary:        Header file for libplist library
52 Summary(pl.UTF-8):      Plik nagłówkowy biblioteki libplist
53 Group:          Development/Libraries
54 Requires:       %{name} = %{version}-%{release}
55
56 %description devel
57 Header file for libplist library.
58
59 %description devel -l pl.UTF-8
60 Plik nagłówkowy biblioteki libplist.
61
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
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
112 %package -n python-plist
113 Summary:        Python 2 bindings for libplist
114 Summary(pl.UTF-8):      Wiązania libplist dla Pythona 2
115 Group:          Development/Languages/Python
116 Requires:       %{name} = %{version}-%{release}
117
118 %description -n python-plist
119 Python 2 bindings for libplist.
120
121 %description -n python-plist -l pl.UTF-8
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.
135
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
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
149 %prep
150 %setup -q
151 %patch0 -p1
152 %patch1 -p1
153
154 touch cython/*.py[xh]
155
156 %build
157 %{__libtoolize}
158 %{__aclocal} -I m4
159 %{__autoconf}
160 %{__autoheader}
161 %{__automake}
162 install -d build
163 cd build
164 ../%configure \
165         ac_cv_path_CYTHON=/usr/bin/cython \
166         --disable-silent-rules \
167         %{!?with_static_libs:--disable-static} \
168         %{!?with_cython:--without-cython}
169
170 # make -j1 due:
171 # make[2]: *** No rule to make target '../src/libplist.la', needed by 'libplist++.la'.  Stop.
172 %{__make} -j1
173 cd ..
174
175 %if %{with python3}
176 topdir=$(pwd)
177 install -d build-py3
178 cd build-py3
179 ../%configure \
180         PYTHON=%{__python3} \
181         ac_cv_path_CYTHON=/usr/bin/cython3 \
182         --disable-silent-rules
183
184 %{__make} -C cython \
185         top_builddir="${topdir}/build"
186 %endif
187
188 %install
189 rm -rf $RPM_BUILD_ROOT
190
191 %{__make} -C build install \
192         DESTDIR=$RPM_BUILD_ROOT
193
194 # obsoleted by .pc
195 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
196
197 %if %{with cython}
198 install -d $RPM_BUILD_ROOT%{_includedir}/plist/cython
199 cp -p cython/plist.pxd $RPM_BUILD_ROOT%{_includedir}/plist/cython/plist.pxd
200 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/plist.la
201
202 %if %{with python3}
203 %{__make} -C build-py3/cython install \
204         DESTDIR=$RPM_BUILD_ROOT \
205         top_builddir="$(pwd)/build"
206
207 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/plist.la
208 %endif
209 %endif
210
211 %clean
212 rm -rf $RPM_BUILD_ROOT
213
214 %post   -p /sbin/ldconfig
215 %postun -p /sbin/ldconfig
216
217 %post   c++ -p /sbin/ldconfig
218 %postun c++ -p /sbin/ldconfig
219
220 %files
221 %defattr(644,root,root,755)
222 %doc AUTHORS NEWS README.md
223 %attr(755,root,root) %{_bindir}/plistutil
224 %attr(755,root,root) %{_libdir}/libplist-2.0.so.*.*.*
225 %attr(755,root,root) %ghost %{_libdir}/libplist-2.0.so.4
226 %{_mandir}/man1/plistutil.1*
227
228 %files devel
229 %defattr(644,root,root,755)
230 %attr(755,root,root) %{_libdir}/libplist-2.0.so
231 %dir %{_includedir}/plist
232 %{_includedir}/plist/plist.h
233 %{_pkgconfigdir}/libplist-2.0.pc
234
235 %if %{with static_libs}
236 %files static
237 %defattr(644,root,root,755)
238 %{_libdir}/libplist-2.0.a
239 %endif
240
241 %files c++
242 %defattr(644,root,root,755)
243 %attr(755,root,root) %{_libdir}/libplist++-2.0.so.*.*.*
244 %attr(755,root,root) %ghost %{_libdir}/libplist++-2.0.so.4
245
246 %files c++-devel
247 %defattr(644,root,root,755)
248 %attr(755,root,root) %{_libdir}/libplist++-2.0.so
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
262 %{_pkgconfigdir}/libplist++-2.0.pc
263
264 %if %{with static_libs}
265 %files c++-static
266 %defattr(644,root,root,755)
267 %{_libdir}/libplist++-2.0.a
268 %endif
269
270 %if %{with cython}
271 %files -n python-plist
272 %defattr(644,root,root,755)
273 %attr(755,root,root) %{py_sitedir}/plist.so
274
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
281 %files -n python-plist-devel
282 %defattr(644,root,root,755)
283 %{_includedir}/plist/cython
284 %endif
This page took 0.05651 seconds and 2 git commands to generate.