]> git.pld-linux.org Git - SPECS.git/blob - libzrtpcpp.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / libzrtpcpp.spec
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_with     openssl         # OpenSSL based cryptography (instead of standalone) for ccrtp
7 %bcond_with     sqlite          # use SQLite (3.x) for cache [always enabled for tivi]
8 #
9 Summary:        GNU RTP stack for the zrtp protocol specification
10 Summary(pl.UTF-8):      Stos GNU RTP dla specyfikacji protokołu zrtp
11 Name:           libzrtpcpp
12 Version:        4.6.3
13 Release:        4
14 License:        LGPL v3+ (core), GPL v3+ (CCRTP client), for reference (Tivi client)
15 Group:          Libraries
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
29 %endif
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)
35
36 %description
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
40 applications.
41
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
46 telefonicznych.
47
48 %package devel
49 Summary:        Header files for libzrtpcpp library
50 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libzrtpcpp
51 License:        GPL v3+
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
57
58 %description devel
59 Header files for libzrtpcpp library.
60
61 %description devel -l pl.UTF-8
62 Pliki nagłówkowe biblioteki libzrtpcpp.
63
64 %package core
65 Summary:        GNU ZRTP core library
66 Summary(pl.UTF-8):      Biblioteka podstawowa GNU ZRTP
67 License:        LGPL v3+
68 Group:          Libraries
69 #%{?with_openssl:Requires:      openssl >= 0.9.8}
70 %{?with_sqlite:Requires:        sqlite3 >= 3.7}
71
72 %description core
73 GNU ZRTP core library.
74
75 %description core -l pl.UTF-8
76 Biblioteka podstawowa GNU ZRTP.
77
78 %package core-headers
79 Summary:        GNU ZRTP core header files
80 Summary(pl.UTF-8):      Podstawowe pliki nagłówkowe GNU ZRTP
81 License:        LGPL v3+
82 Group:          Libraries
83 Requires:       libstdc++-devel
84 Conflicts:      libzrtpcpp-devel < 4
85
86 %description core-headers
87 GNU ZRTP core header files.
88
89 %description core-headers -l pl.UTF-8
90 Podstawowe pliki nagłówkowe GNU ZRTP.
91
92 %package core-devel
93 Summary:        GNU ZRTP core development files
94 Summary(pl.UTF-8):      Podstawowe pliki programistyczne GNU ZRTP
95 License:        LGPL v3+
96 Group:          Libraries
97 Requires:       %{name}-core = %{version}-%{release}
98 Requires:       %{name}-core-headers = %{version}-%{release}
99 #%{?with_openssl:Requires:      openssl-devel >= 0.9.8}
100
101 %description core-devel
102 GNU ZRTP core development files.
103
104 %description core-devel -l pl.UTF-8
105 Podstawowe pliki programistyczne GNU ZRTP.
106
107 %package tivi
108 Summary:        ZRTP tivi client library
109 Summary(pl.UTF-8):      Biblioteka kliencka ZRTP tivi
110 License:        for reference
111 Group:          Libraries
112 Requires:       sqlite3 >= 3.7
113
114 %description tivi
115 ZRTP tivi client library.
116
117 %description tivi -l pl.UTF-8
118 Biblioteka kliencka ZRTP tivi.
119
120 %package tivi-devel
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}
127
128 %description tivi-devel
129 Development files for ZRTP tivi library.
130
131 %description tivi-devel -l pl.UTF-8
132 Pliki programistyczne biblioteki klienckiej ZRTP tivi.
133
134 %prep
135 %setup -q -n ZRTPCPP-%{version}
136 %patch0 -p1
137
138 %build
139 %if %{with ccrtp}
140 install -d build-ccrtp
141 cd build-ccrtp
142 %cmake .. \
143         -DCCRTP=ON \
144         %{?with_openssl:-DCRYPTO_STANDALONE=OFF}
145 %{__make}
146 cd ..
147 %endif
148
149 install -d build-core
150 cd build-core
151 %cmake .. \
152         -DCORE_LIB=ON
153 # -DCRYPTO_STANDALONE=OFF is broken for core library
154 %{__make}
155 cd ..
156
157 %if %{with tivi}
158 install -d build-tivi
159 cd build-tivi
160 %cmake .. \
161         -DTIVI=ON \
162         %{?with_java:-DJAVA=ON}
163 %{__make}
164 cd ..
165 %endif
166
167 %install
168 rm -rf $RPM_BUILD_ROOT
169
170 %if %{with ccrtp}
171 %{__make} -C build-ccrtp install \
172         DESTDIR=$RPM_BUILD_ROOT
173 %endif
174
175 %{__make} -C build-core install \
176         DESTDIR=$RPM_BUILD_ROOT
177
178 %if %{with tivi}
179 cp -a build-tivi/clients/tivi/libzrtptivi.so* $RPM_BUILD_ROOT%{_libdir}
180 cp -p clients/tivi/*.h $RPM_BUILD_ROOT%{_includedir}/libzrtpcpp
181 %endif
182
183 %clean
184 rm -rf $RPM_BUILD_ROOT
185
186 %post   -p /sbin/ldconfig
187 %postun -p /sbin/ldconfig
188
189 %post   core -p /sbin/ldconfig
190 %postun core -p /sbin/ldconfig
191
192 %post   tivi -p /sbin/ldconfig
193 %postun tivi -p /sbin/ldconfig
194
195 %if %{with ccrtp}
196 %files
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
201
202 %files devel
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
209 %endif
210
211 %files core
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
216
217 %files core-headers
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
226
227 %files core-devel
228 %defattr(644,root,root,755)
229 %attr(755,root,root) %{_libdir}/libzrtpcppcore.so
230 %{_pkgconfigdir}/libzrtpcppcore.pc
231
232 %if %{with tivi}
233 %files tivi
234 %defattr(644,root,root,755)
235 %attr(755,root,root) %{_libdir}/libzrtptivi.so.*.*.*
236 %attr(755,root,root) %ghost %{_libdir}/libzrtptivi.so.4
237
238 %files tivi-devel
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
245 %endif
This page took 0.843735 seconds and 3 git commands to generate.