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