3 %bcond_without ccrtp # CCRTP client library
4 %bcond_with tivi # Tivi client library (for reference)
5 %bcond_with java # Java code for Tivi client library (test only)
6 %bcond_with openssl # OpenSSL based cryptography (instead of standalone) for ccrtp
7 %bcond_with sqlite # use SQLite (3.x) for cache [always enabled for tivi]
9 Summary: GNU RTP stack for the zrtp protocol specification
10 Summary(pl.UTF-8): Stos GNU RTP dla specyfikacji protokołu zrtp
14 License: LGPL v3+ (core), GPL v3+ (CCRTP client), for reference (Tivi client)
16 #Source0Download: https://github.com/wernerd/ZRTPCPP/releases
17 Source0: https://github.com/wernerd/ZRTPCPP/archive/V%{version}/%{name}-%{version}.tar.gz
18 # Source0-md5: ccfaab35e2103033d9c414fee3d46a75
19 Patch0: %{name}-java.patch
20 URL: http://www.gnutelephony.org/index.php/GNU_ZRTP
21 BuildRequires: cmake >= 2.6
22 %{?with_ccrtp:BuildRequires: ccrtp-devel >= 2.0.0}
23 %{?with_java:BuildRequires: jdk}
24 BuildRequires: libstdc++-devel
25 %{?with_openssl:BuildRequires: openssl-devel >= 0.9.8}
26 BuildRequires: pkgconfig
27 %if %{with sqlite} || %{with tivi}
28 BuildRequires: sqlite3-devel >= 3.7
30 %{?with_java:BuildRequires: swig}
31 Requires: ccrtp >= 2.0.0
32 %{?with_openssl:Requires: openssl >= 0.9.8}
33 %{?with_sqlite:Requires: sqlite3 >= 3.7}
34 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 This library is a GPL licensed extension to the GNU RTP Stack, ccrtp,
38 that offers compatibility with Phil Zimmermann's zrtp/Zfone voice
39 encryption, and which can be directly embedded into telephony
42 %description -l pl.UTF-8
43 Ta biblioteka jest licencjonowanym na GPL rozszerzeniem stosu GNU RTP
44 - ccrtp - oferującym kompatybilność z szyfrowaniem głosu zrtp/Zfont
45 Phila Zimmermanna i mogącym być bezpośrednio włączone do aplikacji
49 Summary: Header files for libzrtpcpp library
50 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libzrtpcpp
52 Group: Development/Libraries
53 Requires: %{name} = %{version}-%{release}
54 Requires: %{name}-core-headers = %{version}-%{release}
55 %{?with_openssl:Requires: openssl-devel >= 0.9.8}
56 Obsoletes: libzrtpcpp-static
59 Header files for libzrtpcpp library.
61 %description devel -l pl.UTF-8
62 Pliki nagłówkowe biblioteki libzrtpcpp.
65 Summary: GNU ZRTP core library
66 Summary(pl.UTF-8): Biblioteka podstawowa GNU ZRTP
69 #%{?with_openssl:Requires: openssl >= 0.9.8}
70 %{?with_sqlite:Requires: sqlite3 >= 3.7}
73 GNU ZRTP core library.
75 %description core -l pl.UTF-8
76 Biblioteka podstawowa GNU ZRTP.
79 Summary: GNU ZRTP core header files
80 Summary(pl.UTF-8): Podstawowe pliki nagłówkowe GNU ZRTP
83 Requires: libstdc++-devel
84 Conflicts: libzrtpcpp-devel < 4
86 %description core-headers
87 GNU ZRTP core header files.
89 %description core-headers -l pl.UTF-8
90 Podstawowe pliki nagłówkowe GNU ZRTP.
93 Summary: GNU ZRTP core development files
94 Summary(pl.UTF-8): Podstawowe pliki programistyczne GNU ZRTP
97 Requires: %{name}-core = %{version}-%{release}
98 Requires: %{name}-core-headers = %{version}-%{release}
99 #%{?with_openssl:Requires: openssl-devel >= 0.9.8}
101 %description core-devel
102 GNU ZRTP core development files.
104 %description core-devel -l pl.UTF-8
105 Podstawowe pliki programistyczne GNU ZRTP.
108 Summary: ZRTP tivi client library
109 Summary(pl.UTF-8): Biblioteka kliencka ZRTP tivi
110 License: for reference
112 Requires: sqlite3 >= 3.7
115 ZRTP tivi client library.
117 %description tivi -l pl.UTF-8
118 Biblioteka kliencka ZRTP tivi.
121 Summary: Development files for ZRTP tivi library
122 Summary(pl.UTF-8): Pliki programistyczne biblioteki klienckiej ZRTP tivi
123 License: for reference
124 Group: Development/Libraries
125 Requires: %{name}-core-headers = %{version}-%{release}
126 Requires: %{name}-tivi = %{version}-%{release}
128 %description tivi-devel
129 Development files for ZRTP tivi library.
131 %description tivi-devel -l pl.UTF-8
132 Pliki programistyczne biblioteki klienckiej ZRTP tivi.
135 %setup -q -n ZRTPCPP-%{version}
140 install -d build-ccrtp
144 %{?with_openssl:-DCRYPTO_STANDALONE=OFF}
149 install -d build-core
153 # -DCRYPTO_STANDALONE=OFF is broken for core library
158 install -d build-tivi
162 %{?with_java:-DJAVA=ON}
168 rm -rf $RPM_BUILD_ROOT
171 %{__make} -C build-ccrtp install \
172 DESTDIR=$RPM_BUILD_ROOT
175 %{__make} -C build-core install \
176 DESTDIR=$RPM_BUILD_ROOT
179 cp -a build-tivi/clients/tivi/libzrtptivi.so* $RPM_BUILD_ROOT%{_libdir}
180 cp -p clients/tivi/*.h $RPM_BUILD_ROOT%{_includedir}/libzrtpcpp
184 rm -rf $RPM_BUILD_ROOT
186 %post -p /sbin/ldconfig
187 %postun -p /sbin/ldconfig
189 %post core -p /sbin/ldconfig
190 %postun core -p /sbin/ldconfig
192 %post tivi -p /sbin/ldconfig
193 %postun tivi -p /sbin/ldconfig
197 %defattr(644,root,root,755)
198 %doc AUTHORS ChangeLog README.md
199 %attr(755,root,root) %{_libdir}/libzrtpcpp.so.*.*.*
200 %attr(755,root,root) %ghost %{_libdir}/libzrtpcpp.so.4
203 %defattr(644,root,root,755)
204 %attr(755,root,root) %{_libdir}/libzrtpcpp.so
205 %{_includedir}/libzrtpcpp/CcrtpTimeoutProvider.h
206 %{_includedir}/libzrtpcpp/ZrtpQueue.h
207 %{_includedir}/libzrtpcpp/zrtpccrtp.h
208 %{_pkgconfigdir}/libzrtpcpp.pc
212 %defattr(644,root,root,755)
213 %doc AUTHORS ChangeLog README.md
214 %attr(755,root,root) %{_libdir}/libzrtpcppcore.so.*.*.*
215 %attr(755,root,root) %ghost %{_libdir}/libzrtpcppcore.so.4
218 %defattr(644,root,root,755)
219 %dir %{_includedir}/libzrtpcpp
220 %{_includedir}/libzrtpcpp/common
221 %{_includedir}/libzrtpcpp/ZrtpCWrapper.h
222 %{_includedir}/libzrtpcpp/ZrtpCallback.h
223 %{_includedir}/libzrtpcpp/ZrtpCodes.h
224 %{_includedir}/libzrtpcpp/ZrtpConfigure.h
225 %{_includedir}/libzrtpcpp/ZrtpUserCallback.h
228 %defattr(644,root,root,755)
229 %attr(755,root,root) %{_libdir}/libzrtpcppcore.so
230 %{_pkgconfigdir}/libzrtpcppcore.pc
234 %defattr(644,root,root,755)
235 %attr(755,root,root) %{_libdir}/libzrtptivi.so.*.*.*
236 %attr(755,root,root) %ghost %{_libdir}/libzrtptivi.so.4
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_libdir}/libzrtptivi.so
241 %{_includedir}/libzrtpcpp/CtZrtpCallback.h
242 %{_includedir}/libzrtpcpp/CtZrtpSession.h
243 %{_includedir}/libzrtpcpp/CtZrtpStream.h
244 %{_includedir}/libzrtpcpp/TiviTimeoutProvider.h