]> git.pld-linux.org Git - packages/libzrtpcpp.git/blob - libzrtpcpp.spec
09f3d27354a7fc50ba741995a902adc0fdd589dd
[packages/libzrtpcpp.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_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 #
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.1.2
13 Release:        1
14 License:        LGPL v3+ (core), GPL v3+ (CCRTP client), for reference (Tivi client)
15 Group:          Libraries
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
20 BuildRequires:  cmake >= 2.6
21 %{?with_ccrtp:BuildRequires:    ccrtp-devel >= 2.0.0}
22 %{?with_java:BuildRequires:     jdk}
23 BuildRequires:  libstdc++-devel
24 %{?with_openssl:BuildRequires:  openssl-devel >= 0.9.8}
25 BuildRequires:  pkgconfig
26 %if %{with sqlite} || %{with tivi}
27 BuildRequires:  sqlite3-devel >= 3.7
28 %endif
29 %{?with_java:BuildRequires:     swig}
30 Requires:       ccrtp >= 2.0.0
31 %{?with_openssl:Requires:       openssl >= 0.9.8}
32 %{?with_sqlite:Requires:        sqlite3 >= 3.7}
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
41 %description -l pl.UTF-8
42 Ta biblioteka jest licencjonowanym na GPL rozszerzeniem stosu GNU RTP
43 - ccrtp - oferującym kompatybilność z szyfrowaniem głosu zrtp/Zfont
44 Phila Zimmermanna i mogącym być bezpośrednio włączone do aplikacji
45 telefonicznych.
46
47 %package devel
48 Summary:        Header files for libzrtpcpp library
49 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libzrtpcpp
50 License:        GPL v3+
51 Group:          Development/Libraries
52 Requires:       %{name} = %{version}-%{release}
53 Requires:       %{name}-core-headers = %{version}-%{release}
54 %{?with_openssl:Requires:       openssl-devel >= 0.9.8}
55 Obsoletes:      libzrtpcpp-static
56
57 %description devel
58 Header files for libzrtpcpp library.
59
60 %description devel -l pl.UTF-8
61 Pliki nagłówkowe biblioteki libzrtpcpp.
62
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
83 Conflicts:      libzrtpcpp-devel < 4
84
85 %description core-headers
86 GNU ZRTP core header files.
87
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
136
137 %build
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
153 %{__make}
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
165
166 %install
167 rm -rf $RPM_BUILD_ROOT
168
169 %if %{with ccrtp}
170 %{__make} -C build-ccrtp install \
171         DESTDIR=$RPM_BUILD_ROOT
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
181
182 %clean
183 rm -rf $RPM_BUILD_ROOT
184
185 %post   -p /sbin/ldconfig
186 %postun -p /sbin/ldconfig
187
188 %if %{with ccrtp}
189 %files
190 %defattr(644,root,root,755)
191 %doc AUTHORS ChangeLog NEWS README.md
192 %attr(755,root,root) %{_libdir}/libzrtpcpp.so.*.*.*
193 %attr(755,root,root) %ghost %{_libdir}/libzrtpcpp.so.4
194
195 %files devel
196 %defattr(644,root,root,755)
197 %attr(755,root,root) %{_libdir}/libzrtpcpp.so
198 %{_includedir}/libzrtpcpp/CcrtpTimeoutProvider.h
199 %{_includedir}/libzrtpcpp/ZrtpQueue.h
200 %{_includedir}/libzrtpcpp/zrtpccrtp.h
201 %{_pkgconfigdir}/libzrtpcpp.pc
202 %endif
203
204 %files core
205 %defattr(644,root,root,755)
206 %doc AUTHORS ChangeLog NEWS README.md
207 %attr(755,root,root) %{_libdir}/libzrtpcppcore.so.*.*.*
208 %attr(755,root,root) %ghost %{_libdir}/libzrtpcppcore.so.4
209
210 %files core-headers
211 %defattr(644,root,root,755)
212 %dir %{_includedir}/libzrtpcpp
213 %{_includedir}/libzrtpcpp/common
214 %{_includedir}/libzrtpcpp/ZrtpCWrapper.h
215 %{_includedir}/libzrtpcpp/ZrtpCallback.h
216 %{_includedir}/libzrtpcpp/ZrtpCodes.h
217 %{_includedir}/libzrtpcpp/ZrtpConfigure.h
218 %{_includedir}/libzrtpcpp/ZrtpUserCallback.h
219
220 %files core-devel
221 %defattr(644,root,root,755)
222 %attr(755,root,root) %{_libdir}/libzrtpcppcore.so
223 %{_pkgconfigdir}/libzrtpcppcore.pc
224
225 %if %{with tivi}
226 %files tivi
227 %defattr(644,root,root,755)
228 %attr(755,root,root) %{_libdir}/libzrtptivi.so.*.*.*
229 %attr(755,root,root) %ghost %{_libdir}/libzrtptivi.so.4
230
231 %files tivi-devel
232 %defattr(644,root,root,755)
233 %attr(755,root,root) %{_libdir}/libzrtptivi.so
234 %{_includedir}/libzrtpcpp/CtZrtpCallback.h
235 %{_includedir}/libzrtpcpp/CtZrtpSession.h
236 %{_includedir}/libzrtpcpp/CtZrtpStream.h
237 %{_includedir}/libzrtpcpp/TiviTimeoutProvider.h
238 %endif
This page took 0.150384 seconds and 2 git commands to generate.