]> git.pld-linux.org Git - packages/libplist.git/blob - libplist.spec
- updated to 2.2.0 (note: new library name)
[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.2.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:  63cc49401521662c94cd4107898c744c
20 Patch0:         %{name}-sh.patch
21 URL:            https://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 ../%configure \
177         PYTHON=%{__python3} \
178         --disable-silent-rules
179
180 %{__make} -C cython \
181         top_builddir="${topdir}/build"
182 %endif
183
184 %install
185 rm -rf $RPM_BUILD_ROOT
186
187 %{__make} -C build install \
188         DESTDIR=$RPM_BUILD_ROOT
189
190 # obsoleted by .pc
191 %{__rm} $RPM_BUILD_ROOT%{_libdir}/lib*.la
192
193 %if %{with cython}
194 install -d $RPM_BUILD_ROOT%{_includedir}/plist/cython
195 cp -p cython/plist.pxd $RPM_BUILD_ROOT%{_includedir}/plist/cython/plist.pxd
196 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/plist.la \
197         %{?with_static_libs:$RPM_BUILD_ROOT%{py_sitedir}/plist.a}
198
199 %if %{with python3}
200 %{__make} -C build-py3/cython install \
201         DESTDIR=$RPM_BUILD_ROOT \
202         top_builddir="$(pwd)/build"
203
204 %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/plist.la
205         %{?with_static_libs:$RPM_BUILD_ROOT%{py3_sitedir}/plist.a}
206 %endif
207 %endif
208
209 %clean
210 rm -rf $RPM_BUILD_ROOT
211
212 %post   -p /sbin/ldconfig
213 %postun -p /sbin/ldconfig
214
215 %post   c++ -p /sbin/ldconfig
216 %postun c++ -p /sbin/ldconfig
217
218 %files
219 %defattr(644,root,root,755)
220 %doc AUTHORS NEWS README.md
221 %attr(755,root,root) %{_bindir}/plistutil
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*
225
226 %files devel
227 %defattr(644,root,root,755)
228 %attr(755,root,root) %{_libdir}/libplist-2.0.so
229 %dir %{_includedir}/plist
230 %{_includedir}/plist/plist.h
231 %{_pkgconfigdir}/libplist-2.0.pc
232
233 %if %{with static_libs}
234 %files static
235 %defattr(644,root,root,755)
236 %{_libdir}/libplist-2.0.a
237 %endif
238
239 %files c++
240 %defattr(644,root,root,755)
241 %attr(755,root,root) %{_libdir}/libplist++-2.0.so.*.*.*
242 %attr(755,root,root) %ghost %{_libdir}/libplist++-2.0.so.3
243
244 %files c++-devel
245 %defattr(644,root,root,755)
246 %attr(755,root,root) %{_libdir}/libplist++-2.0.so
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
260 %{_pkgconfigdir}/libplist++-2.0.pc
261
262 %if %{with static_libs}
263 %files c++-static
264 %defattr(644,root,root,755)
265 %{_libdir}/libplist++-2.0.a
266 %endif
267
268 %if %{with cython}
269 %files -n python-plist
270 %defattr(644,root,root,755)
271 %attr(755,root,root) %{py_sitedir}/plist.so
272
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
279 %files -n python-plist-devel
280 %defattr(644,root,root,755)
281 %{_includedir}/plist/cython
282 %endif
This page took 0.112711 seconds and 3 git commands to generate.