]>
Commit | Line | Data |
---|---|---|
e229af96 ER |
1 | # |
2 | # Conditional build: | |
d8f5f589 JB |
3 | %bcond_without static_libs # static library |
4 | %bcond_without cython # Cython based Python bindings | |
5 | %bcond_without python3 # Python 3 module | |
6 | %bcond_without openssl # OpenSSL for SSL support | |
7 | %bcond_with gnutls # GnuTLS for SSL support | |
42e766e1 | 8 | |
d8f5f589 JB |
9 | %if %{without cython} |
10 | %undefine with_python3 | |
11 | %endif | |
42e766e1 ER |
12 | %if %{with gnutls} |
13 | %undefine with_openssl | |
14 | %endif | |
6b6a2331 MB |
15 | Summary: Library for connecting to mobile devices |
16 | Summary(pl.UTF-8): Biblioteka do łączenia się z urządzeniami mobilnymi | |
17 | Name: libimobiledevice | |
d8f5f589 | 18 | Version: 1.3.0 |
c3d837dd | 19 | Release: 5 |
6b6a2331 MB |
20 | License: LGPL v2+ |
21 | Group: Libraries | |
d8f5f589 JB |
22 | #Source0Download: https://www.libimobiledevice.org/ |
23 | Source0: https://github.com/libimobiledevice/libimobiledevice/releases/download/%{version}/%{name}-%{version}.tar.bz2 | |
24 | # Source0-md5: c50a3a32acf33dc8c9ec88137ad12ec4 | |
900a03c2 | 25 | Patch0: %{name}-cython.patch |
d8f5f589 | 26 | URL: https://libimobiledevice.org/ |
bb67ab5f | 27 | BuildRequires: autoconf >= 2.64 |
6b6a2331 | 28 | BuildRequires: automake |
42e766e1 | 29 | %{?with_gnutls:BuildRequires: gnutls-devel >= 2.2.0} |
6b6a2331 | 30 | BuildRequires: libgcrypt-devel |
d8f5f589 JB |
31 | BuildRequires: libplist-devel >= 2.2.0 |
32 | BuildRequires: libplist-c++-devel >= 2.2.0 | |
7e9f6afa | 33 | BuildRequires: libstdc++-devel |
42e766e1 | 34 | %{?with_gnutls:BuildRequires: libtasn1-devel >= 1.1} |
6b6a2331 | 35 | BuildRequires: libtool |
d8f5f589 | 36 | BuildRequires: libusbmuxd-devel >= 2.0.2 |
42e766e1 | 37 | %{?with_openssl:BuildRequires: openssl-devel >= 0.9.8} |
6b6a2331 | 38 | BuildRequires: pkgconfig |
bb67ab5f JB |
39 | %if %{with cython} |
40 | BuildRequires: python-Cython >= 0.17.0 | |
41 | BuildRequires: python-devel >= 1:2.3 | |
42 | BuildRequires: python-modules >= 1:2.3 | |
d8f5f589 | 43 | BuildRequires: python-plist-devel >= 2.2.0 |
bb67ab5f | 44 | %endif |
d8f5f589 JB |
45 | %if %{with python3} |
46 | BuildRequires: python3-Cython >= 0.17.0 | |
47 | BuildRequires: python3-devel >= 1:3.2 | |
48 | BuildRequires: python3-modules >= 1:3.2 | |
49 | %endif | |
50 | BuildRequires: rpm-pythonprov | |
51 | Requires: libplist >= 2.2.0 | |
52 | Requires: libplist-c++ >= 2.2.0 | |
53 | Requires: libusbmuxd >= 2.0.2 | |
6b6a2331 MB |
54 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
55 | ||
56 | %description | |
57 | libimobiledevice is a library for connecting to mobile devices. | |
58 | ||
59 | %description -l pl.UTF-8 | |
60 | libimobiledevice jest biblioteką do łączenia się z urządzeniami | |
61 | mobilnymi. | |
62 | ||
63 | %package devel | |
64 | Summary: Header files for libimobiledevice library | |
65 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libimobiledevice | |
66 | Group: Development/Libraries | |
67 | Requires: %{name} = %{version}-%{release} | |
42e766e1 | 68 | %{?with_gnutls:Requires: gnutls-devel >= 2.2.0} |
d8f5f589 JB |
69 | Requires: libplist-devel >= 2.2.0 |
70 | Requires: libplist-c++-devel >= 2.2.0 | |
42e766e1 | 71 | %{?with_gnutls:Requires: libtasn1-devel >= 1.1} |
d8f5f589 | 72 | Requires: libusbmuxd-devel >= 2.0.2 |
42e766e1 | 73 | %{?with_openssl:Requires: openssl-devel >= 0.9.8} |
6b6a2331 MB |
74 | |
75 | %description devel | |
76 | Header files for libimobiledevice library. | |
77 | ||
78 | %description devel -l pl.UTF-8 | |
79 | Pliki nagłówkowe biblioteki libimobiledevice. | |
80 | ||
81 | %package static | |
82 | Summary: Static libimobiledevice library | |
83 | Summary(pl.UTF-8): Statyczna biblioteka libimobiledevice | |
84 | Group: Development/Libraries | |
85 | Requires: %{name}-devel = %{version}-%{release} | |
86 | ||
87 | %description static | |
88 | Static libimobiledevice library. | |
89 | ||
90 | %description static -l pl.UTF-8 | |
91 | Statyczna biblioteka libimobiledevice. | |
92 | ||
ef114f6e JB |
93 | %package apidocs |
94 | Summary: API documentation for libimobiledevice library | |
95 | Summary(pl.UTF-8): Dokumentacja API biblioteki libimobiledevice | |
96 | Group: Documentation | |
ef114f6e | 97 | BuildArch: noarch |
ef114f6e JB |
98 | |
99 | %description apidocs | |
100 | API documentation for libimobiledevice library. | |
101 | ||
102 | %description apidocs -l pl.UTF-8 | |
103 | Dokumentacja API biblioteki libimobiledevice. | |
104 | ||
6b6a2331 | 105 | %package -n python-imobiledevice |
d8f5f589 JB |
106 | Summary: libimobiledevice Python 2 bindings |
107 | Summary(pl.UTF-8): Wiązania libimobiledevice dla Pythona 2 | |
6b6a2331 MB |
108 | Group: Development/Languages/Python |
109 | Requires: %{name} = %{version}-%{release} | |
d8f5f589 | 110 | Requires: python-plist >= 2.2.0 |
6b6a2331 MB |
111 | |
112 | %description -n python-imobiledevice | |
d8f5f589 | 113 | libimobiledevice Python 2 bindings. |
6b6a2331 MB |
114 | |
115 | %description -n python-imobiledevice -l pl.UTF-8 | |
d8f5f589 JB |
116 | Wiązania libimobiledevice dla Pythona 2. |
117 | ||
118 | %package -n python3-imobiledevice | |
119 | Summary: libimobiledevice Python 3 bindings | |
120 | Summary(pl.UTF-8): Wiązania libimobiledevice dla Pythona 3 | |
121 | Group: Development/Languages/Python | |
122 | Requires: %{name} = %{version}-%{release} | |
123 | Requires: python3-plist >= 2.2.0 | |
124 | ||
125 | %description -n python3-imobiledevice | |
126 | libimobiledevice Python 3 bindings. | |
127 | ||
128 | %description -n python3-imobiledevice -l pl.UTF-8 | |
129 | Wiązania libimobiledevice dla Pythona 3. | |
6b6a2331 MB |
130 | |
131 | %prep | |
132 | %setup -q | |
900a03c2 | 133 | %patch0 -p1 |
6b6a2331 MB |
134 | |
135 | %build | |
136 | %{__libtoolize} | |
137 | %{__aclocal} -I m4 | |
138 | %{__autoconf} | |
139 | %{__autoheader} | |
140 | %{__automake} | |
d8f5f589 JB |
141 | install -d build |
142 | cd build | |
143 | ../%configure \ | |
42e766e1 | 144 | %{!?with_openssl:--disable-openssl} \ |
d8f5f589 JB |
145 | --disable-silent-rules \ |
146 | %{!?with_static_libs:--disable-static} \ | |
147 | %{!?with_cython:--without-cython} | |
148 | ||
6b6a2331 | 149 | %{__make} |
d8f5f589 JB |
150 | cd .. |
151 | ||
152 | %if %{with python3} | |
153 | topdir=$(pwd) | |
154 | install -d build-py3 | |
155 | cd build-py3 | |
156 | ../%configure \ | |
157 | PYTHON=%{__python3} \ | |
158 | --disable-silent-rules \ | |
159 | %{!?with_static_libs:--disable-static} | |
160 | ||
161 | %{__make} -C cython \ | |
162 | top_builddir="${topdir}/build" | |
163 | %endif | |
6b6a2331 MB |
164 | |
165 | %install | |
166 | rm -rf $RPM_BUILD_ROOT | |
167 | ||
d8f5f589 | 168 | %{__make} -C build install \ |
6b6a2331 MB |
169 | DESTDIR=$RPM_BUILD_ROOT |
170 | ||
d8f5f589 JB |
171 | # obsoleted by pkg-config |
172 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libimobiledevice-1.0.la | |
6b6a2331 | 173 | |
b73c3a08 | 174 | %if %{with cython} |
ef114f6e JB |
175 | %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.la \ |
176 | %{?with_static_libs:$RPM_BUILD_ROOT%{py_sitedir}/*.a} | |
d8f5f589 JB |
177 | %endif |
178 | ||
179 | %if %{with python3} | |
180 | %{__make} -C build-py3/cython install \ | |
181 | DESTDIR=$RPM_BUILD_ROOT \ | |
182 | top_builddir="$(pwd)/build" | |
183 | ||
184 | %{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/*.la \ | |
185 | %{?with_static_libs:$RPM_BUILD_ROOT%{py3_sitedir}/*.a} | |
b73c3a08 | 186 | %endif |
6b6a2331 MB |
187 | |
188 | %clean | |
189 | rm -rf $RPM_BUILD_ROOT | |
190 | ||
191 | %post -p /sbin/ldconfig | |
192 | %postun -p /sbin/ldconfig | |
193 | ||
194 | %files | |
195 | %defattr(644,root,root,755) | |
d8f5f589 | 196 | %doc AUTHORS NEWS README.md |
b0e585fc | 197 | %attr(755,root,root) %{_bindir}/idevice_id |
6b6a2331 | 198 | %attr(755,root,root) %{_bindir}/idevicebackup |
481c45a6 | 199 | %attr(755,root,root) %{_bindir}/idevicebackup2 |
b73c3a08 | 200 | %attr(755,root,root) %{_bindir}/idevicecrashreport |
481c45a6 | 201 | %attr(755,root,root) %{_bindir}/idevicedate |
568ba3da | 202 | %attr(755,root,root) %{_bindir}/idevicedebug |
b0e585fc JB |
203 | %attr(755,root,root) %{_bindir}/idevicedebugserverproxy |
204 | %attr(755,root,root) %{_bindir}/idevicediagnostics | |
d4da4e3f | 205 | %attr(755,root,root) %{_bindir}/ideviceenterrecovery |
5f4040a2 | 206 | %attr(755,root,root) %{_bindir}/ideviceimagemounter |
6b6a2331 | 207 | %attr(755,root,root) %{_bindir}/ideviceinfo |
b73c3a08 | 208 | %attr(755,root,root) %{_bindir}/idevicename |
568ba3da | 209 | %attr(755,root,root) %{_bindir}/idevicenotificationproxy |
e229af96 | 210 | %attr(755,root,root) %{_bindir}/idevicepair |
b0e585fc | 211 | %attr(755,root,root) %{_bindir}/ideviceprovision |
5f4040a2 | 212 | %attr(755,root,root) %{_bindir}/idevicescreenshot |
d8f5f589 | 213 | %attr(755,root,root) %{_bindir}/idevicesetlocation |
6b6a2331 | 214 | %attr(755,root,root) %{_bindir}/idevicesyslog |
d8f5f589 JB |
215 | %attr(755,root,root) %{_libdir}/libimobiledevice-1.0.so.*.*.* |
216 | %attr(755,root,root) %ghost %{_libdir}/libimobiledevice-1.0.so.6 | |
b0e585fc | 217 | %{_mandir}/man1/idevice_id.1* |
5f4040a2 | 218 | %{_mandir}/man1/idevicebackup.1* |
481c45a6 | 219 | %{_mandir}/man1/idevicebackup2.1* |
b73c3a08 | 220 | %{_mandir}/man1/idevicecrashreport.1* |
481c45a6 | 221 | %{_mandir}/man1/idevicedate.1* |
568ba3da | 222 | %{_mandir}/man1/idevicedebug.1* |
b0e585fc JB |
223 | %{_mandir}/man1/idevicedebugserverproxy.1* |
224 | %{_mandir}/man1/idevicediagnostics.1* | |
481c45a6 | 225 | %{_mandir}/man1/ideviceenterrecovery.1* |
5f4040a2 MB |
226 | %{_mandir}/man1/ideviceimagemounter.1* |
227 | %{_mandir}/man1/ideviceinfo.1* | |
b73c3a08 | 228 | %{_mandir}/man1/idevicename.1* |
568ba3da | 229 | %{_mandir}/man1/idevicenotificationproxy.1* |
481c45a6 | 230 | %{_mandir}/man1/idevicepair.1* |
b0e585fc | 231 | %{_mandir}/man1/ideviceprovision.1* |
5f4040a2 | 232 | %{_mandir}/man1/idevicescreenshot.1* |
d8f5f589 | 233 | %{_mandir}/man1/idevicesetlocation.1* |
5f4040a2 | 234 | %{_mandir}/man1/idevicesyslog.1* |
6b6a2331 MB |
235 | |
236 | %files devel | |
237 | %defattr(644,root,root,755) | |
d8f5f589 | 238 | %attr(755,root,root) %{_libdir}/libimobiledevice-1.0.so |
6b6a2331 MB |
239 | %{_includedir}/libimobiledevice |
240 | %{_pkgconfigdir}/libimobiledevice-1.0.pc | |
241 | ||
e229af96 | 242 | %if %{with static_libs} |
6b6a2331 MB |
243 | %files static |
244 | %defattr(644,root,root,755) | |
d8f5f589 | 245 | %{_libdir}/libimobiledevice-1.0.a |
e229af96 | 246 | %endif |
6b6a2331 | 247 | |
ef114f6e JB |
248 | %files apidocs |
249 | %defattr(644,root,root,755) | |
250 | %doc docs/html/* | |
251 | ||
42e766e1 | 252 | %if %{with cython} |
6b6a2331 MB |
253 | %files -n python-imobiledevice |
254 | %defattr(644,root,root,755) | |
42e766e1 ER |
255 | %attr(755,root,root) %{py_sitedir}/imobiledevice.so |
256 | %endif | |
d8f5f589 JB |
257 | |
258 | %if %{with python3} | |
259 | %files -n python3-imobiledevice | |
260 | %defattr(644,root,root,755) | |
261 | %attr(755,root,root) %{py3_sitedir}/imobiledevice.so | |
262 | %endif |