[packages/libimobiledevice] - updated to 1.3.0 (new library name; uses libplist 2.2.0 + libusbmuxd 2.0.2) - removed outdated ope

qboosh qboosh at pld-linux.org
Sat Sep 12 21:28:07 CEST 2020


commit d8f5f5898df04579c40f2dc140cfffb96120b97b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Sep 12 21:30:51 2020 +0200

    - updated to 1.3.0 (new library name; uses libplist 2.2.0 + libusbmuxd 2.0.2)
    - removed outdated openssl patch
    - build python3 module

 libimobiledevice.spec | 140 ++++++++++++++++++++++++++++++++++----------------
 openssl.patch         |  11 ----
 2 files changed, 95 insertions(+), 56 deletions(-)
---
diff --git a/libimobiledevice.spec b/libimobiledevice.spec
index df19d8b..fbfd523 100644
--- a/libimobiledevice.spec
+++ b/libimobiledevice.spec
@@ -1,50 +1,56 @@
 #
 # Conditional build:
-%bcond_without	static_libs	# don't build static libraries
-%bcond_without	cython		# build with Cython based Python bindings
-%bcond_without	openssl		# build with openssl for SSL support
-%bcond_with	gnutls		# build with GnuTLS for SSL support
+%bcond_without	static_libs	# static library
+%bcond_without	cython		# Cython based Python bindings
+%bcond_without	python3		# Python 3 module
+%bcond_without	openssl		# OpenSSL for SSL support
+%bcond_with	gnutls		# GnuTLS for SSL support
 
+%if %{without cython}
+%undefine	with_python3
+%endif
 %if %{with gnutls}
 %undefine	with_openssl
 %endif
-
 Summary:	Library for connecting to mobile devices
 Summary(pl.UTF-8):	Biblioteka do łączenia się z urządzeniami mobilnymi
 Name:		libimobiledevice
-# 1.2.x is stable
-Version:	1.2.0
-Release:	5
+Version:	1.3.0
+Release:	1
 License:	LGPL v2+
 Group:		Libraries
-#Source0Download: http://www.libimobiledevice.org/
-Source0:	http://www.libimobiledevice.org/downloads/%{name}-%{version}.tar.bz2
-# Source0-md5:	8757900ba7bbe2ef5f54342415d0223e
+#Source0Download: https://www.libimobiledevice.org/
+Source0:	https://github.com/libimobiledevice/libimobiledevice/releases/download/%{version}/%{name}-%{version}.tar.bz2
+# Source0-md5:	c50a3a32acf33dc8c9ec88137ad12ec4
 Patch0:		%{name}-cython.patch
-Patch1:		openssl.patch
-URL:		http://www.libimobiledevice.org/
+URL:		https://libimobiledevice.org/
 BuildRequires:	autoconf >= 2.64
 BuildRequires:	automake
 %{?with_gnutls:BuildRequires:	gnutls-devel >= 2.2.0}
 BuildRequires:	libgcrypt-devel
-BuildRequires:	libplist-devel >= 1.11
-BuildRequires:	libplist-c++-devel >= 1.11
+BuildRequires:	libplist-devel >= 2.2.0
+BuildRequires:	libplist-c++-devel >= 2.2.0
 BuildRequires:	libstdc++-devel
 %{?with_gnutls:BuildRequires:	libtasn1-devel >= 1.1}
 BuildRequires:	libtool
-BuildRequires:	libusbmuxd-devel >= 1.0.9
+BuildRequires:	libusbmuxd-devel >= 2.0.2
 %{?with_openssl:BuildRequires:	openssl-devel >= 0.9.8}
 BuildRequires:	pkgconfig
 %if %{with cython}
 BuildRequires:	python-Cython >= 0.17.0
 BuildRequires:	python-devel >= 1:2.3
 BuildRequires:	python-modules >= 1:2.3
-BuildRequires:	python-plist-devel >= 1.11
-BuildRequires:	rpm-pythonprov
+BuildRequires:	python-plist-devel >= 2.2.0
 %endif
-Requires:	libplist >= 1.11
-Requires:	libplist-c++ >= 1.11
-Requires:	libusbmuxd >= 1.0.9
+%if %{with python3}
+BuildRequires:	python3-Cython >= 0.17.0
+BuildRequires:	python3-devel >= 1:3.2
+BuildRequires:	python3-modules >= 1:3.2
+%endif
+BuildRequires:	rpm-pythonprov
+Requires:	libplist >= 2.2.0
+Requires:	libplist-c++ >= 2.2.0
+Requires:	libusbmuxd >= 2.0.2
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -60,10 +66,10 @@ Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki libimobiledevice
 Group:		Development/Libraries
 Requires:	%{name} = %{version}-%{release}
 %{?with_gnutls:Requires:	gnutls-devel >= 2.2.0}
-Requires:	libplist-devel >= 1.11
-Requires:	libplist-c++-devel >= 1.11
+Requires:	libplist-devel >= 2.2.0
+Requires:	libplist-c++-devel >= 2.2.0
 %{?with_gnutls:Requires:	libtasn1-devel >= 1.1}
-Requires:	libusbmuxd-devel >= 1.0.9
+Requires:	libusbmuxd-devel >= 2.0.2
 %{?with_openssl:Requires:	openssl-devel >= 0.9.8}
 
 %description devel
@@ -88,7 +94,7 @@ Statyczna biblioteka libimobiledevice.
 Summary:	API documentation for libimobiledevice library
 Summary(pl.UTF-8):	Dokumentacja API biblioteki libimobiledevice
 Group:		Documentation
-%if "%{_rpmversion}" >= "5"
+%if "%{_rpmversion}" >= "4.6"
 BuildArch:	noarch
 %endif
 
@@ -99,22 +105,34 @@ API documentation for libimobiledevice library.
 Dokumentacja API biblioteki libimobiledevice.
 
 %package -n python-imobiledevice
-Summary:	libimobiledevice Python bindings
-Summary(pl.UTF-8):	Wiązania libimobiledevice dla Pythona
+Summary:	libimobiledevice Python 2 bindings
+Summary(pl.UTF-8):	Wiązania libimobiledevice dla Pythona 2
 Group:		Development/Languages/Python
 Requires:	%{name} = %{version}-%{release}
-Requires:	python-plist >= 1.11
+Requires:	python-plist >= 2.2.0
 
 %description -n python-imobiledevice
-libimobiledevice Python bindings.
+libimobiledevice Python 2 bindings.
 
 %description -n python-imobiledevice -l pl.UTF-8
-Wiązania libimobiledevice dla Pythona.
+Wiązania libimobiledevice dla Pythona 2.
+
+%package -n python3-imobiledevice
+Summary:	libimobiledevice Python 3 bindings
+Summary(pl.UTF-8):	Wiązania libimobiledevice dla Pythona 3
+Group:		Development/Languages/Python
+Requires:	%{name} = %{version}-%{release}
+Requires:	python3-plist >= 2.2.0
+
+%description -n python3-imobiledevice
+libimobiledevice Python 3 bindings.
+
+%description -n python3-imobiledevice -l pl.UTF-8
+Wiązania libimobiledevice dla Pythona 3.
 
 %prep
 %setup -q
 %patch0 -p1
-%patch1 -p1
 
 %build
 %{__libtoolize}
@@ -122,27 +140,51 @@ Wiązania libimobiledevice dla Pythona.
 %{__autoconf}
 %{__autoheader}
 %{__automake}
-%configure \
-	%{!?with_static_libs:--disable-static} \
-	%{!?with_cython:--without-cython} \
+install -d build
+cd build
+../%configure \
 	%{!?with_openssl:--disable-openssl} \
-	--disable-silent-rules
+	--disable-silent-rules \
+	%{!?with_static_libs:--disable-static} \
+	%{!?with_cython:--without-cython}
+
 %{__make}
+cd ..
+
+%if %{with python3}
+topdir=$(pwd)
+install -d build-py3
+cd build-py3
+../%configure \
+	PYTHON=%{__python3} \
+	--disable-silent-rules \
+	%{!?with_static_libs:--disable-static}
+
+%{__make} -C cython \
+	top_builddir="${topdir}/build"
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%{__make} install \
+%{__make} -C build install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/*.la
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libimobiledevice-1.0.la
 
 %if %{with cython}
 %{__rm} $RPM_BUILD_ROOT%{py_sitedir}/*.la \
 	%{?with_static_libs:$RPM_BUILD_ROOT%{py_sitedir}/*.a}
-%py_comp $RPM_BUILD_ROOT%{py_sitedir}
-%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
-%py_postclean
+%endif
+
+%if %{with python3}
+%{__make} -C build-py3/cython install \
+	DESTDIR=$RPM_BUILD_ROOT \
+	top_builddir="$(pwd)/build"
+
+%{__rm} $RPM_BUILD_ROOT%{py3_sitedir}/*.la \
+	%{?with_static_libs:$RPM_BUILD_ROOT%{py3_sitedir}/*.a}
 %endif
 
 %clean
@@ -153,7 +195,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS NEWS README
+%doc AUTHORS NEWS README.md
 %attr(755,root,root) %{_bindir}/idevice_id
 %attr(755,root,root) %{_bindir}/idevicebackup
 %attr(755,root,root) %{_bindir}/idevicebackup2
@@ -170,9 +212,10 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/idevicepair
 %attr(755,root,root) %{_bindir}/ideviceprovision
 %attr(755,root,root) %{_bindir}/idevicescreenshot
+%attr(755,root,root) %{_bindir}/idevicesetlocation
 %attr(755,root,root) %{_bindir}/idevicesyslog
-%attr(755,root,root) %{_libdir}/libimobiledevice.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libimobiledevice.so.6
+%attr(755,root,root) %{_libdir}/libimobiledevice-1.0.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libimobiledevice-1.0.so.6
 %{_mandir}/man1/idevice_id.1*
 %{_mandir}/man1/idevicebackup.1*
 %{_mandir}/man1/idevicebackup2.1*
@@ -189,18 +232,19 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/idevicepair.1*
 %{_mandir}/man1/ideviceprovision.1*
 %{_mandir}/man1/idevicescreenshot.1*
+%{_mandir}/man1/idevicesetlocation.1*
 %{_mandir}/man1/idevicesyslog.1*
 
 %files devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libimobiledevice.so
+%attr(755,root,root) %{_libdir}/libimobiledevice-1.0.so
 %{_includedir}/libimobiledevice
 %{_pkgconfigdir}/libimobiledevice-1.0.pc
 
 %if %{with static_libs}
 %files static
 %defattr(644,root,root,755)
-%{_libdir}/libimobiledevice.a
+%{_libdir}/libimobiledevice-1.0.a
 %endif
 
 %files apidocs
@@ -212,3 +256,9 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %attr(755,root,root) %{py_sitedir}/imobiledevice.so
 %endif
+
+%if %{with python3}
+%files -n python3-imobiledevice
+%defattr(644,root,root,755)
+%attr(755,root,root) %{py3_sitedir}/imobiledevice.so
+%endif
diff --git a/openssl.patch b/openssl.patch
deleted file mode 100644
index a1f1221..0000000
--- a/openssl.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- libimobiledevice-1.2.0/src/idevice.c~	2015-01-28 02:10:32.000000000 +0100
-+++ libimobiledevice-1.2.0/src/idevice.c	2018-09-18 15:46:45.405574489 +0200
-@@ -678,7 +678,7 @@ LIBIMOBILEDEVICE_API idevice_error_t ide
- 	}
- 	BIO_set_fd(ssl_bio, (int)(long)connection->data, BIO_NOCLOSE);
- 
--	SSL_CTX *ssl_ctx = SSL_CTX_new(SSLv3_method());
-+	SSL_CTX *ssl_ctx = SSL_CTX_new(SSLv23_method());
- 	if (ssl_ctx == NULL) {
- 		debug_info("ERROR: Could not create SSL context.");
- 		BIO_free(ssl_bio);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libimobiledevice.git/commitdiff/d8f5f5898df04579c40f2dc140cfffb96120b97b



More information about the pld-cvs-commit mailing list