]>
Commit | Line | Data |
---|---|---|
ca843ba6 JB |
1 | # |
2 | # Conditional build: | |
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_without openssl # OpenSSL based cryptography (instead of standalone) for ccrtp | |
7 | %bcond_with sqlite # use SQLite (3.x) for cache [always enabled for tivi] | |
8 | # | |
310e5049 | 9 | Summary: GNU RTP stack for the zrtp protocol specification |
86f279e7 | 10 | Summary(pl.UTF-8): Stos GNU RTP dla specyfikacji protokołu zrtp |
310e5049 | 11 | Name: libzrtpcpp |
ca843ba6 JB |
12 | Version: 4.1.2 |
13 | Release: 1 | |
14 | License: LGPL v3+ (core), GPL v3+ (CCRTP client), for reference (Tivi client) | |
310e5049 | 15 | Group: Libraries |
ca843ba6 JB |
16 | Source0: https://github.com/wernerd/ZRTPCPP/archive/V%{version}/%{name}-%{version}.tar.gz |
17 | # Source0-md5: dd13e50d0106eb38132fd74bd024664c | |
18 | Patch0: %{name}-java.patch | |
19 | URL: http://www.gnutelephony.org/index.php/GNU_ZRTP | |
d4a1b70d | 20 | BuildRequires: cmake >= 2.6 |
ca843ba6 JB |
21 | %{?with_ccrtp:BuildRequires: ccrtp-devel >= 2.0.0} |
22 | %{?with_java:BuildRequires: jdk} | |
7a2e47ef | 23 | BuildRequires: libstdc++-devel |
ca843ba6 | 24 | %{?with_openssl:BuildRequires: openssl-devel >= 0.9.8} |
7a2e47ef | 25 | BuildRequires: pkgconfig |
ca843ba6 JB |
26 | %if %{with sqlite} || %{with tivi} |
27 | BuildRequires: sqlite3-devel >= 3.7 | |
28 | %endif | |
29 | %{?with_java:BuildRequires: swig} | |
d4a1b70d | 30 | Requires: ccrtp >= 2.0.0 |
ca843ba6 JB |
31 | %{?with_openssl:Requires: openssl >= 0.9.8} |
32 | %{?with_sqlite:Requires: sqlite3 >= 3.7} | |
310e5049 AM |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
34 | ||
35 | %description | |
36 | This library is a GPL licensed extension to the GNU RTP Stack, ccrtp, | |
37 | that offers compatibility with Phil Zimmermann's zrtp/Zfone voice | |
38 | encryption, and which can be directly embedded into telephony | |
39 | applications. | |
40 | ||
c08749b1 | 41 | %description -l pl.UTF-8 |
3ddbf072 | 42 | Ta biblioteka jest licencjonowanym na GPL rozszerzeniem stosu GNU RTP |
c08749b1 JR |
43 | - ccrtp - oferującym kompatybilność z szyfrowaniem głosu zrtp/Zfont |
44 | Phila Zimmermanna i mogącym być bezpośrednio włączone do aplikacji | |
3ddbf072 JB |
45 | telefonicznych. |
46 | ||
310e5049 AM |
47 | %package devel |
48 | Summary: Header files for libzrtpcpp library | |
86f279e7 | 49 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libzrtpcpp |
ca843ba6 | 50 | License: GPL v3+ |
310e5049 AM |
51 | Group: Development/Libraries |
52 | Requires: %{name} = %{version}-%{release} | |
ca843ba6 JB |
53 | Requires: %{name}-core-headers = %{version}-%{release} |
54 | %{?with_openssl:Requires: openssl-devel >= 0.9.8} | |
d4a1b70d | 55 | Obsoletes: libzrtpcpp-static |
310e5049 AM |
56 | |
57 | %description devel | |
58 | Header files for libzrtpcpp library. | |
59 | ||
c08749b1 JR |
60 | %description devel -l pl.UTF-8 |
61 | Pliki nagłówkowe biblioteki libzrtpcpp. | |
310e5049 | 62 | |
ca843ba6 JB |
63 | %package core |
64 | Summary: GNU ZRTP core library | |
65 | Summary(pl.UTF-8): Biblioteka podstawowa GNU ZRTP | |
66 | License: LGPL v3+ | |
67 | Group: Libraries | |
68 | #%{?with_openssl:Requires: openssl >= 0.9.8} | |
69 | %{?with_sqlite:Requires: sqlite3 >= 3.7} | |
70 | ||
71 | %description core | |
72 | GNU ZRTP core library. | |
73 | ||
74 | %description core -l pl.UTF-8 | |
75 | Biblioteka podstawowa GNU ZRTP. | |
76 | ||
77 | %package core-headers | |
78 | Summary: GNU ZRTP core header files | |
79 | Summary(pl.UTF-8): Podstawowe pliki nagłówkowe GNU ZRTP | |
80 | License: LGPL v3+ | |
81 | Group: Libraries | |
82 | Requires: libstdc++-devel | |
881ee22a | 83 | Conflicts: libzrtpcpp-devel < 4 |
ca843ba6 JB |
84 | |
85 | %description core-headers | |
86 | GNU ZRTP core header files. | |
310e5049 | 87 | |
ca843ba6 JB |
88 | %description core-headers -l pl.UTF-8 |
89 | Podstawowe pliki nagłówkowe GNU ZRTP. | |
90 | ||
91 | %package core-devel | |
92 | Summary: GNU ZRTP core development files | |
93 | Summary(pl.UTF-8): Podstawowe pliki programistyczne GNU ZRTP | |
94 | License: LGPL v3+ | |
95 | Group: Libraries | |
96 | Requires: %{name}-core-headers = %{version}-%{release} | |
97 | Requires: ccrtp-devel >= 2.0.0 | |
98 | #%{?with_openssl:Requires: openssl-devel >= 0.9.8} | |
99 | ||
100 | %description core-devel | |
101 | GNU ZRTP core development files. | |
102 | ||
103 | %description core-devel -l pl.UTF-8 | |
104 | Podstawowe pliki programistyczne GNU ZRTP. | |
105 | ||
106 | %package tivi | |
107 | Summary: ZRTP tivi client library | |
108 | Summary(pl.UTF-8): Biblioteka kliencka ZRTP tivi | |
109 | License: for reference | |
110 | Group: Libraries | |
111 | Requires: sqlite3 >= 3.7 | |
112 | ||
113 | %description tivi | |
114 | ZRTP tivi client library. | |
115 | ||
116 | %description tivi -l pl.UTF-8 | |
117 | Biblioteka kliencka ZRTP tivi. | |
118 | ||
119 | %package tivi-devel | |
120 | Summary: Development files for ZRTP tivi library | |
121 | Summary(pl.UTF-8): Pliki programistyczne biblioteki klienckiej ZRTP tivi | |
122 | License: for reference | |
123 | Group: Development/Libraries | |
124 | Requires: %{name}-core-headers = %{version}-%{release} | |
125 | Requires: %{name}-tivi = %{version}-%{release} | |
126 | ||
127 | %description tivi-devel | |
128 | Development files for ZRTP tivi library. | |
129 | ||
130 | %description tivi-devel -l pl.UTF-8 | |
131 | Pliki programistyczne biblioteki klienckiej ZRTP tivi. | |
132 | ||
133 | %prep | |
134 | %setup -q -n ZRTPCPP-%{version} | |
135 | %patch0 -p1 | |
09018132 | 136 | |
310e5049 | 137 | %build |
ca843ba6 JB |
138 | %if %{with ccrtp} |
139 | install -d build-ccrtp | |
140 | cd build-ccrtp | |
141 | %cmake .. \ | |
142 | -DCCRTP=ON \ | |
143 | %{?with_openssl:-DCRYPTO_STANDALONE=OFF} | |
144 | %{__make} | |
145 | cd .. | |
146 | %endif | |
147 | ||
148 | install -d build-core | |
149 | cd build-core | |
150 | %cmake .. \ | |
151 | -DCORE_LIB=ON | |
152 | # -DCRYPTO_STANDALONE=OFF is broken for core library | |
310e5049 | 153 | %{__make} |
ca843ba6 JB |
154 | cd .. |
155 | ||
156 | %if %{with tivi} | |
157 | install -d build-tivi | |
158 | cd build-tivi | |
159 | %cmake .. \ | |
160 | -DTIVI=ON \ | |
161 | %{?with_java:-DJAVA=ON} | |
162 | %{__make} | |
163 | cd .. | |
164 | %endif | |
310e5049 AM |
165 | |
166 | %install | |
167 | rm -rf $RPM_BUILD_ROOT | |
168 | ||
ca843ba6 JB |
169 | %if %{with ccrtp} |
170 | %{__make} -C build-ccrtp install \ | |
310e5049 | 171 | DESTDIR=$RPM_BUILD_ROOT |
ca843ba6 JB |
172 | %endif |
173 | ||
174 | %{__make} -C build-core install \ | |
175 | DESTDIR=$RPM_BUILD_ROOT | |
176 | ||
177 | %if %{with tivi} | |
178 | cp -a build-tivi/clients/tivi/libzrtptivi.so* $RPM_BUILD_ROOT%{_libdir} | |
179 | cp -p clients/tivi/*.h $RPM_BUILD_ROOT%{_includedir}/libzrtpcpp | |
180 | %endif | |
310e5049 AM |
181 | |
182 | %clean | |
183 | rm -rf $RPM_BUILD_ROOT | |
184 | ||
185 | %post -p /sbin/ldconfig | |
186 | %postun -p /sbin/ldconfig | |
187 | ||
0ef12d1b JB |
188 | %post core -p /sbin/ldconfig |
189 | %postun core -p /sbin/ldconfig | |
190 | ||
191 | %post tivi -p /sbin/ldconfig | |
192 | %postun tivi -p /sbin/ldconfig | |
193 | ||
ca843ba6 | 194 | %if %{with ccrtp} |
310e5049 AM |
195 | %files |
196 | %defattr(644,root,root,755) | |
09018132 | 197 | %doc AUTHORS ChangeLog NEWS README.md |
7a2e47ef | 198 | %attr(755,root,root) %{_libdir}/libzrtpcpp.so.*.*.* |
ca843ba6 | 199 | %attr(755,root,root) %ghost %{_libdir}/libzrtpcpp.so.4 |
310e5049 AM |
200 | |
201 | %files devel | |
202 | %defattr(644,root,root,755) | |
7a2e47ef | 203 | %attr(755,root,root) %{_libdir}/libzrtpcpp.so |
ca843ba6 JB |
204 | %{_includedir}/libzrtpcpp/CcrtpTimeoutProvider.h |
205 | %{_includedir}/libzrtpcpp/ZrtpQueue.h | |
206 | %{_includedir}/libzrtpcpp/zrtpccrtp.h | |
7a2e47ef | 207 | %{_pkgconfigdir}/libzrtpcpp.pc |
ca843ba6 JB |
208 | %endif |
209 | ||
210 | %files core | |
211 | %defattr(644,root,root,755) | |
212 | %doc AUTHORS ChangeLog NEWS README.md | |
213 | %attr(755,root,root) %{_libdir}/libzrtpcppcore.so.*.*.* | |
214 | %attr(755,root,root) %ghost %{_libdir}/libzrtpcppcore.so.4 | |
215 | ||
216 | %files core-headers | |
217 | %defattr(644,root,root,755) | |
218 | %dir %{_includedir}/libzrtpcpp | |
219 | %{_includedir}/libzrtpcpp/common | |
220 | %{_includedir}/libzrtpcpp/ZrtpCWrapper.h | |
221 | %{_includedir}/libzrtpcpp/ZrtpCallback.h | |
222 | %{_includedir}/libzrtpcpp/ZrtpCodes.h | |
223 | %{_includedir}/libzrtpcpp/ZrtpConfigure.h | |
224 | %{_includedir}/libzrtpcpp/ZrtpUserCallback.h | |
225 | ||
226 | %files core-devel | |
227 | %defattr(644,root,root,755) | |
228 | %attr(755,root,root) %{_libdir}/libzrtpcppcore.so | |
229 | %{_pkgconfigdir}/libzrtpcppcore.pc | |
230 | ||
231 | %if %{with tivi} | |
232 | %files tivi | |
233 | %defattr(644,root,root,755) | |
234 | %attr(755,root,root) %{_libdir}/libzrtptivi.so.*.*.* | |
235 | %attr(755,root,root) %ghost %{_libdir}/libzrtptivi.so.4 | |
236 | ||
237 | %files tivi-devel | |
238 | %defattr(644,root,root,755) | |
239 | %attr(755,root,root) %{_libdir}/libzrtptivi.so | |
240 | %{_includedir}/libzrtpcpp/CtZrtpCallback.h | |
241 | %{_includedir}/libzrtpcpp/CtZrtpSession.h | |
242 | %{_includedir}/libzrtpcpp/CtZrtpStream.h | |
243 | %{_includedir}/libzrtpcpp/TiviTimeoutProvider.h | |
244 | %endif |