[packages/libzrtpcpp] - updated URLs, updated to 4.1.2 (note: new soname) - build ccrtp and core variants, allow to build
qboosh
qboosh at pld-linux.org
Sun Mar 2 17:46:10 CET 2014
commit ca843ba698e5daf7fd09cf878d8c3c4a37a99ef9
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Mar 2 17:48:34 2014 +0100
- updated URLs, updated to 4.1.2 (note: new soname)
- build ccrtp and core variants, allow to build tivi variant
libzrtpcpp-java.patch | 11 +++
libzrtpcpp.spec | 196 +++++++++++++++++++++++++++++++++++++++++++++-----
2 files changed, 188 insertions(+), 19 deletions(-)
---
diff --git a/libzrtpcpp.spec b/libzrtpcpp.spec
index e13acdc..28471f1 100644
--- a/libzrtpcpp.spec
+++ b/libzrtpcpp.spec
@@ -1,20 +1,35 @@
+#
+# Conditional build:
+%bcond_without ccrtp # CCRTP client library
+%bcond_with tivi # Tivi client library (for reference)
+%bcond_with java # Java code for Tivi client library (test only)
+%bcond_without openssl # OpenSSL based cryptography (instead of standalone) for ccrtp
+%bcond_with sqlite # use SQLite (3.x) for cache [always enabled for tivi]
+#
Summary: GNU RTP stack for the zrtp protocol specification
Summary(pl.UTF-8): Stos GNU RTP dla specyfikacji protokołu zrtp
Name: libzrtpcpp
-Version: 2.3.4
-Release: 2
-License: GPL v3+
+Version: 4.1.2
+Release: 1
+License: LGPL v3+ (core), GPL v3+ (CCRTP client), for reference (Tivi client)
Group: Libraries
-Source0: http://ftp.gnu.org/gnu/ccrtp/%{name}-%{version}.tar.gz
-# Source0-md5: 3aac59472c5649736e24de30080e2efd
-URL: http://www.gnu.org/software/ccrtp/
+Source0: https://github.com/wernerd/ZRTPCPP/archive/V%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: dd13e50d0106eb38132fd74bd024664c
+Patch0: %{name}-java.patch
+URL: http://www.gnutelephony.org/index.php/GNU_ZRTP
BuildRequires: cmake >= 2.6
-BuildRequires: ccrtp-devel >= 2.0.0
+%{?with_ccrtp:BuildRequires: ccrtp-devel >= 2.0.0}
+%{?with_java:BuildRequires: jdk}
BuildRequires: libstdc++-devel
-BuildRequires: openssl-devel >= 0.9.8
+%{?with_openssl:BuildRequires: openssl-devel >= 0.9.8}
BuildRequires: pkgconfig
-BuildRequires: sed >= 4.0
+%if %{with sqlite} || %{with tivi}
+BuildRequires: sqlite3-devel >= 3.7
+%endif
+%{?with_java:BuildRequires: swig}
Requires: ccrtp >= 2.0.0
+%{?with_openssl:Requires: openssl >= 0.9.8}
+%{?with_sqlite:Requires: sqlite3 >= 3.7}
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -32,11 +47,11 @@ telefonicznych.
%package devel
Summary: Header files for libzrtpcpp library
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libzrtpcpp
+License: GPL v3+
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
-Requires: ccrtp-devel >= 2.0.0
-Requires: openssl-devel >= 0.9.8
-Requires: libstdc++-devel
+Requires: %{name}-core-headers = %{version}-%{release}
+%{?with_openssl:Requires: openssl-devel >= 0.9.8}
Obsoletes: libzrtpcpp-static
%description devel
@@ -45,20 +60,123 @@ Header files for libzrtpcpp library.
%description devel -l pl.UTF-8
Pliki nagłówkowe biblioteki libzrtpcpp.
-%prep
-%setup -q
+%package core
+Summary: GNU ZRTP core library
+Summary(pl.UTF-8): Biblioteka podstawowa GNU ZRTP
+License: LGPL v3+
+Group: Libraries
+#%{?with_openssl:Requires: openssl >= 0.9.8}
+%{?with_sqlite:Requires: sqlite3 >= 3.7}
+
+%description core
+GNU ZRTP core library.
+
+%description core -l pl.UTF-8
+Biblioteka podstawowa GNU ZRTP.
+
+%package core-headers
+Summary: GNU ZRTP core header files
+Summary(pl.UTF-8): Podstawowe pliki nagłówkowe GNU ZRTP
+License: LGPL v3+
+Group: Libraries
+Requires: libstdc++-devel
+
+%description core-headers
+GNU ZRTP core header files.
-%{__sed} -i -e '/set(CMAKE_VERBOSE_MAKEFILE FALSE)/d' CMakeLists.txt
+%description core-headers -l pl.UTF-8
+Podstawowe pliki nagłówkowe GNU ZRTP.
+
+%package core-devel
+Summary: GNU ZRTP core development files
+Summary(pl.UTF-8): Podstawowe pliki programistyczne GNU ZRTP
+License: LGPL v3+
+Group: Libraries
+Requires: %{name}-core-headers = %{version}-%{release}
+Requires: ccrtp-devel >= 2.0.0
+#%{?with_openssl:Requires: openssl-devel >= 0.9.8}
+
+%description core-devel
+GNU ZRTP core development files.
+
+%description core-devel -l pl.UTF-8
+Podstawowe pliki programistyczne GNU ZRTP.
+
+%package tivi
+Summary: ZRTP tivi client library
+Summary(pl.UTF-8): Biblioteka kliencka ZRTP tivi
+License: for reference
+Group: Libraries
+Requires: sqlite3 >= 3.7
+
+%description tivi
+ZRTP tivi client library.
+
+%description tivi -l pl.UTF-8
+Biblioteka kliencka ZRTP tivi.
+
+%package tivi-devel
+Summary: Development files for ZRTP tivi library
+Summary(pl.UTF-8): Pliki programistyczne biblioteki klienckiej ZRTP tivi
+License: for reference
+Group: Development/Libraries
+Requires: %{name}-core-headers = %{version}-%{release}
+Requires: %{name}-tivi = %{version}-%{release}
+
+%description tivi-devel
+Development files for ZRTP tivi library.
+
+%description tivi-devel -l pl.UTF-8
+Pliki programistyczne biblioteki klienckiej ZRTP tivi.
+
+%prep
+%setup -q -n ZRTPCPP-%{version}
+%patch0 -p1
%build
-%cmake .
+%if %{with ccrtp}
+install -d build-ccrtp
+cd build-ccrtp
+%cmake .. \
+ -DCCRTP=ON \
+ %{?with_openssl:-DCRYPTO_STANDALONE=OFF}
+%{__make}
+cd ..
+%endif
+
+install -d build-core
+cd build-core
+%cmake .. \
+ -DCORE_LIB=ON
+# -DCRYPTO_STANDALONE=OFF is broken for core library
%{__make}
+cd ..
+
+%if %{with tivi}
+install -d build-tivi
+cd build-tivi
+%cmake .. \
+ -DTIVI=ON \
+ %{?with_java:-DJAVA=ON}
+%{__make}
+cd ..
+%endif
%install
rm -rf $RPM_BUILD_ROOT
-%{__make} install \
+%if %{with ccrtp}
+%{__make} -C build-ccrtp install \
DESTDIR=$RPM_BUILD_ROOT
+%endif
+
+%{__make} -C build-core install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%if %{with tivi}
+cp -a build-tivi/clients/tivi/libzrtptivi.so* $RPM_BUILD_ROOT%{_libdir}
+cp -p clients/tivi/*.h $RPM_BUILD_ROOT%{_includedir}/libzrtpcpp
+%endif
%clean
rm -rf $RPM_BUILD_ROOT
@@ -66,14 +184,54 @@ rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
+%if %{with ccrtp}
%files
%defattr(644,root,root,755)
%doc AUTHORS ChangeLog NEWS README.md
%attr(755,root,root) %{_libdir}/libzrtpcpp.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libzrtpcpp.so.2
+%attr(755,root,root) %ghost %{_libdir}/libzrtpcpp.so.4
%files devel
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libzrtpcpp.so
-%{_includedir}/libzrtpcpp
+%{_includedir}/libzrtpcpp/CcrtpTimeoutProvider.h
+%{_includedir}/libzrtpcpp/ZrtpQueue.h
+%{_includedir}/libzrtpcpp/zrtpccrtp.h
%{_pkgconfigdir}/libzrtpcpp.pc
+%endif
+
+%files core
+%defattr(644,root,root,755)
+%doc AUTHORS ChangeLog NEWS README.md
+%attr(755,root,root) %{_libdir}/libzrtpcppcore.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libzrtpcppcore.so.4
+
+%files core-headers
+%defattr(644,root,root,755)
+%dir %{_includedir}/libzrtpcpp
+%{_includedir}/libzrtpcpp/common
+%{_includedir}/libzrtpcpp/ZrtpCWrapper.h
+%{_includedir}/libzrtpcpp/ZrtpCallback.h
+%{_includedir}/libzrtpcpp/ZrtpCodes.h
+%{_includedir}/libzrtpcpp/ZrtpConfigure.h
+%{_includedir}/libzrtpcpp/ZrtpUserCallback.h
+
+%files core-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libzrtpcppcore.so
+%{_pkgconfigdir}/libzrtpcppcore.pc
+
+%if %{with tivi}
+%files tivi
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libzrtptivi.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libzrtptivi.so.4
+
+%files tivi-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libzrtptivi.so
+%{_includedir}/libzrtpcpp/CtZrtpCallback.h
+%{_includedir}/libzrtpcpp/CtZrtpSession.h
+%{_includedir}/libzrtpcpp/CtZrtpStream.h
+%{_includedir}/libzrtpcpp/TiviTimeoutProvider.h
+%endif
diff --git a/libzrtpcpp-java.patch b/libzrtpcpp-java.patch
new file mode 100644
index 0000000..2dce9e3
--- /dev/null
+++ b/libzrtpcpp-java.patch
@@ -0,0 +1,11 @@
+--- ZRTPCPP-4.1.2/clients/tivi/swigJava/SessionTest.java.orig 2014-01-09 13:11:21.000000000 +0100
++++ ZRTPCPP-4.1.2/clients/tivi/swigJava/SessionTest.java 2014-03-01 16:57:50.047307896 +0100
+@@ -139,7 +139,7 @@
+
+ session.setUserCallback(callback, CtZrtpSession.streamName.AudioStream);
+ session.setSendCallback(sendCallback, CtZrtpSession.streamName.AudioStream);
+- session.getSignalingHelloHash(helloHash, CtZrtpSession.streamName.AudioStream);
++ session.getSignalingHelloHash(helloHash, CtZrtpSession.streamName.AudioStream, 0);
+
+ System.out.println("Our Hello hash: " + new String(helloHash));
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libzrtpcpp.git/commitdiff/ca843ba698e5daf7fd09cf878d8c3c4a37a99ef9
More information about the pld-cvs-commit
mailing list