File: resiprocate.spec

package info (click to toggle)
resiprocate 1%3A1.9.7-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 36,456 kB
  • ctags: 27,123
  • sloc: cpp: 195,346; xml: 12,515; sh: 11,986; ansic: 6,807; makefile: 2,182; php: 1,150; python: 300; objc: 91; sql: 85; perl: 21; csh: 5
file content (374 lines) | stat: -rw-r--r-- 13,141 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
Name: resiprocate
Version: 1.9.7
Release: 1%{?dist}
Summary: SIP and TURN stacks, with SIP proxy and TURN server implementations
License: VSL
Url: http://www.resiprocate.org
Source: https://www.resiprocate.org/files/pub/reSIProcate/releases/%name-%version.tar.gz
BuildRequires: libtool automake autoconf
BuildRequires: asio-devel
BuildRequires: boost-devel
BuildRequires: cajun-jsonapi-devel
BuildRequires: c-ares-devel
BuildRequires: cppunit-devel
BuildRequires: gperf
%if 0%{?fedora} >= 18
BuildRequires: db4-cxx-devel
BuildRequires: systemd
%endif
BuildRequires: db4-devel
BuildRequires: openssl-devel >= 0.9.8
BuildRequires: mysql-devel
BuildRequires: pcre-devel
BuildRequires: perl
BuildRequires: popt-devel
BuildRequires: python-devel
BuildRequires: python-pycxx-devel
BuildRequires: radiusclient-ng-devel
BuildRequires: xerces-c-devel
Requires: openssl >= 0.9.8
Requires: chkconfig
%if 0%{?fedora} < 17
Requires(preun): initscripts
%else
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
%endif
Obsoletes: resiprocate-b2bua

%description
The reSIProcate components, particularly the SIP stack, are in use in both
commercial and open-source products. The project is dedicated to maintaining
a complete, correct, and commercially usable implementation of SIP and a few
related protocols.

%package libs
Summary: Shared libraries http://www.resiprocate.org

%description libs
reSIProcate is a framework that aims to fully implement the SIP protocol
in first class C++.  It is intended for use in other applications,
such as the repro SIP proxy.
This package provides the core libraries: librutil (utilities),
libresip (SIP stack/RFC compliant message parsing) and
libdum (SIP Dialog Usage Manager, a state machine for SIP dialogs).

%package devel
Summary: reSIProcate development files
Requires: %{name}-libs%{?_isa} = %{version}-%{release}

%description devel
Resiprocate SIP Stack development files.

%package repro
Summary: SIP proxy
Requires(pre): shadow-utils

%description repro
repro is the SIP proxy developed as part of the reSIProcate project.
It provides a high-quality, low maintenance solution for serving
small and large IP telephony installations.
reSIProcate is a framework that aims to fully implement the SIP protocol
in first class C++.  It is intended for use in other applications,
such as the repro SIP proxy.

%package turn-server
Summary: ICE/STUN/TURN server
Requires(pre): shadow-utils

%description turn-server
reTurn is the TURN server developed as part of the reSIProcate project.
TURN (RFC 5766) provides a standardised solution for VoIP applications
to find the most efficient way to route media streams when NAT and
firewall devices may be present.
reTurn provides a high-quality, low maintenance solution for serving
small and large IP telephony installations.  It has been used successfully
with a variety of SIP and Jabber applications, including Lumicall,
Jitsi, Empathy and Psi.
reSIProcate is a framework that aims to fully implement the SIP protocol
in first class C++.  It is intended for use in other applications,
such as the repro SIP proxy.

%package sipdialer
Summary: Click-to-call utility

%description sipdialer
sipdialer is a click-to-call application that uses the SIP REFER
method to force a SIP phone (for example, the phone on your desk)
to dial another number.  It can be registered in GConf to handle
clicks on sip:, sips: and tel: URIs in other applications and the
web browser.
reSIProcate is a framework that aims to fully implement the SIP protocol
in first class C++.  It is intended for use in other applications,
such as the repro SIP proxy.

%package clicktocall
Summary: Click-to-call server process

%description clicktocall
Provides a simple SIP click-to-call service.
reSIProcate is a framework that aims to fully implement the SIP protocol
in first class C++.  It is intended for use in other applications,
such as the repro SIP proxy.

%package presence-server
Summary: Basic SIP presence server

%description presence-server
Provides a simple SIP presence server.
reSIProcate is a framework that aims to fully implement the SIP protocol
in first class C++.  It is intended for use in other applications,
such as the repro SIP proxy.

%prep
%setup -q

%build
%if 0%{?fedora} < 14
PYVERSION=2.6
%else
PYVERSION=2.7
%endif
PYCONFIG=/usr/bin/python${PYVERSION}-config
export LDFLAGS="${LDFLAGS} -L%{_libdir}/mysql -L%{_libdir}/libdb4"
CXXFLAGS="%{optflags} -I%{_includedir}/libdb4 -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS" %configure --with-c-ares --with-ssl --with-mysql --with-radius --with-repro --enable-repro-plugins --with-apps --enable-ipv6 --enable-dtls --with-python DEPS_PYTHON_CFLAGS="`${PYCONFIG} --cflags`" DEPS_PYTHON_LIBS="`${PYCONFIG} --ldflags`" PYCXX_SRCDIR=/usr/src/CXX/Python2
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} install
%if 0%{?fedora} >= 17
install -p -D -m644 repro/pkg/fedora/repro.service %{buildroot}%{_unitdir}/repro.service
install -p -D -m644 reTurn/pkg/fedora/resiprocate-turn-server.service %{buildroot}%{_unitdir}/resiprocate-turn-server.service
%else
install -p -D -m755 repro/pkg/fedora/repro.init %{buildroot}%{_initddir}/repro
install -p -D -m755 reTurn/pkg/fedora/resiprocate-turn-server.init %{buildroot}%{_initddir}/resiprocate-turn-server
%endif
install -p -D -m644 repro/pkg/fedora/repro.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/repro
install -p -D -m644 reTurn/pkg/fedora/resiprocate-turn-server.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/resiprocate-turn-server
install -m 0755 -d %{buildroot}%{_sysconfdir}/repro
install -p -D -m640 repro/repro.config %{buildroot}%{_sysconfdir}/repro/repro.config
install -p -D -m640 repro/users.txt %{buildroot}%{_sysconfdir}/repro/users.txt
sed -i \
 -e 's!^LoggingType = cout$!LoggingType = file!' \
 -e 's!^LogLevel = INFO$!LogLevel = WARNING!' \
 -e 's!^LogFilename = repro.log$!LogFilename = %{_localstatedir}/log/repro/repro.log!' \
 -e 's!^LogFileMaxBytes = 5242880!LogFileMaxBytes = 0!' \
 -e 's!^HttpAdminUserFile = users.txt$!HttpAdminUserFile = %{_sysconfdir}/repro/users.txt!' \
 -e 's!^#PluginDirectory = /usr/lib/repro/plugins$!PluginDirectory = %{_libdir}/resiprocate/repro/plugins!' \
 -e 's!^#RunAsUser = repro$!RunAsUser = repro!' \
 -e 's!^#RunAsGroup = repro$!RunAsGroup = repro!' \
 -e 's!^Daemonize = false$!Daemonize = true!' \
 -e 's!^DatabasePath = ./$!DatabasePath = %{_sharedstatedir}/repro!' \
 -e 's!^ChallengeThirdPartiesCallingLocalDomains = true$!ChallengeThirdPartiesCallingLocalDomains = false!' \
            %{buildroot}%{_sysconfdir}/repro/repro.config
install -p -D -m640 reTurn/reTurnServer.config %{buildroot}%{_sysconfdir}/reTurn/reTurnServer.config
install -p -D -m640 reTurn/users.txt %{buildroot}%{_sysconfdir}/reTurn/users.txt
sed -i -e 's/1234/6078a36f89704d83763c9e174b3e87a4/' %{buildroot}%{_sysconfdir}/reTurn/users.txt
sed -i \
 -e 's!^TlsTurnPort = 5349!TlsTurnPort = 0!' \
 -e 's!^LoggingLevel = DEBUG!LoggingLevel = WARNING!' \
 -e 's!^LogFilename = reTurnServer.log!LogFilename = %{_localstatedir}/log/reTurnServer/reTurnServer.log!' \
 -e 's!^LogFileMaxLines = 50000!LogFileMaxLines = 0!' \
 -e 's!^Daemonize = false!Daemonize = true!' \
 -e 's!^#RunAsUser = return!RunAsUser = return!' \
 -e 's!^#RunAsGroup = return!RunAsGroup = return!' \
 -e 's!^UserDatabaseFile = users.txt!UserDatabaseFile = %{_sysconfdir}/reTurn/users.txt!' \
 -e 's!^UserDatabaseHashedPasswords = false!UserDatabaseHashedPasswords = true!' \
 -e 's!^TlsTempDhFilename = dh512.pem!TlsTempDhFilename = %{_sysconfdir}/reTurn/dh512.pem!' \
            %{buildroot}%{_sysconfdir}/reTurn/reTurnServer.config
install -m 0755 -d %{buildroot}%{_sharedstatedir}/repro
rm -f %{buildroot}%{_libdir}/lib*.a
rm -f %{buildroot}%{_libdir}/lib*.la
rm -f %{buildroot}%{_libdir}/resiprocate/repro/plugins/lib*.a
rm -f %{buildroot}%{_libdir}/resiprocate/repro/plugins/lib*.la
install -m 0755 -d %{buildroot}/%{_docdir}/repro/examples/pyroute
install -p -D -m644 repro/plugins/pyroute/*.py %{buildroot}/%{_docdir}/repro/examples/pyroute
install -p -D -m644 repro/plugins/pyroute/README.txt %{buildroot}/%{_docdir}/repro/examples/pyroute
install -m 0750 -d %{buildroot}%{_localstatedir}/log/repro
touch %{buildroot}%{_localstatedir}/log/repro/repro.log
install -m 0750 -d %{buildroot}%{_localstatedir}/log/reTurnServer
touch %{buildroot}%{_localstatedir}/log/reTurnServer/reTurnServer.log

%pre repro
getent group repro >/dev/null || groupadd -r repro
getent passwd repro >/dev/null || \
    useradd -r -g repro -d %{_sharedstatedir}/repro -s /sbin/nologin \
    -c "repro SIP proxy" repro

%pre turn-server
getent group return >/dev/null || groupadd -r return
getent passwd return >/dev/null || \
    useradd -r -g return -d / -s /sbin/nologin \
    -c "reTurn TURN server" return

%post libs -p /sbin/ldconfig

%post repro
/sbin/ldconfig
%if 0%{?fedora} >= 18
%systemd_post repro.service
%else
if [ $1 -eq 1 ] ; then
    # Initial installation
    /sbin/chkconfig --add repro
fi
%endif

%post turn-server
%if 0%{?fedora} >= 18
%systemd_post resiprocate-turn-server.service
%else
if [ $1 -eq 1 ] ; then
    # Initial installation
    /sbin/chkconfig --add resiprocate-turn-server
fi
%endif

%preun repro
%if 0%{?fedora} >= 18
%systemd_preun repro.service
%else
if [ "$1" = 0 ]
then
   # Package removal, not upgrade
   /sbin/service repro stop
   /sbin/chkconfig --del repro
fi
%endif

%preun turn-server
%if 0%{?fedora} >= 18
%systemd_preun resiprocate-turn-server.service
%else
if [ "$1" = 0 ]
then
   # Package removal, not upgrade
   /sbin/service resiprocate-turn-server stop
   /sbin/chkconfig --del resiprocate-turn-server
fi
%endif

%postun libs -p /sbin/ldconfig

%postun repro
/sbin/ldconfig
%if 0%{?fedora} >= 18
%systemd_postun_with_restart repro.service
%else
if [ $1 -ge 1 ] ; then
    # Package upgrade, not uninstall
    /sbin/service repro try-restart
fi
%endif

%postun turn-server
%if 0%{?fedora} >= 18
%systemd_postun_with_restart resiprocate-turn-server.service
%else
if [ $1 -ge 1 ] ; then
    # Package upgrade, not uninstall
    /sbin/service resiprocate-turn-server try-restart
fi
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%files libs
%doc COPYING
%{_libdir}/libdum-*.so
%{_libdir}/librepro-*.so
%{_libdir}/libresip-*.so
%{_libdir}/libreTurnClient-*.so
%{_libdir}/librutil-*.so
%{_libdir}/libsipdial-*.so

%files devel
%dir %{_includedir}/clicktocall/
%dir %{_includedir}/reTurn/
%dir %{_includedir}/reTurn/client/
%dir %{_includedir}/repro/
%dir %{_includedir}/repro/monkeys/
%dir %{_includedir}/repro/stateAgents/
%dir %{_includedir}/resip/
%dir %{_includedir}/resip/dum/
%dir %{_includedir}/resip/dum/ssl/
%dir %{_includedir}/resip/stack/
%dir %{_includedir}/resip/stack/ssl/
%dir %{_includedir}/rutil/
%dir %{_includedir}/rutil/dns/
%dir %{_includedir}/rutil/ssl/
%dir %{_includedir}/rutil/stun/
%dir %{_includedir}/rutil/wince/
%dir %{_includedir}/sipdial/
%{_includedir}/clicktocall/*.hxx
%{_includedir}/reTurn/*.hxx
%{_includedir}/reTurn/client/*.hxx
%{_includedir}/repro/*.hxx
%{_includedir}/repro/*/*.hxx
%{_includedir}/resip/dum/*.hxx
%{_includedir}/resip/dum/ssl/*.hxx
%{_includedir}/resip/stack/*.hxx
%{_includedir}/resip/stack/ssl/*.hxx
%{_includedir}/rutil/*.hxx
%{_includedir}/rutil/*/*.hxx
%{_includedir}/sipdial/*.hxx
%{_libdir}/libdum.so
%{_libdir}/librepro.so
%{_libdir}/libresip.so
%{_libdir}/libreTurnClient.so
%{_libdir}/librutil.so
%{_libdir}/libsipdial.so

%files repro
%attr(0750,repro,repro) %dir %{_sharedstatedir}/repro
%attr(0640,root,repro) %config(noreplace) %{_sysconfdir}/repro/repro.config
%attr(0640,root,repro) %config(noreplace) %{_sysconfdir}/repro/users.txt
%config(noreplace) %{_sysconfdir}/logrotate.d/repro
%attr(0750,repro,repro) %dir %{_localstatedir}/log/repro
%config %ghost %{_localstatedir}/log/repro/repro.log
%if 0%{?fedora} >= 17
%{_unitdir}/repro.service
%else
%{_initddir}/repro
%endif
%{_sbindir}/repro
%{_sbindir}/reprocmd
%{_sbindir}/queuetostream
%{_mandir}/man8/repro*.8*
%dir %{_libdir}/resiprocate/repro/plugins
%{_libdir}/resiprocate/repro/plugins/*.so
%{_docdir}/repro

%files turn-server
%attr(0640,root,return) %config(noreplace) %{_sysconfdir}/reTurn/reTurnServer.config
%attr(0640,root,return) %config(noreplace) %{_sysconfdir}/reTurn/users.txt
%config(noreplace) %{_sysconfdir}/logrotate.d/resiprocate-turn-server
%attr(0750,return,return) %dir %{_localstatedir}/log/reTurnServer
%config %ghost %{_localstatedir}/log/reTurnServer/reTurnServer.log
%if 0%{?fedora} >= 17
%{_unitdir}/resiprocate-turn-server.service
%else
%{_initddir}/resiprocate-turn-server
%endif
%{_sbindir}/reTurnServer
%{_mandir}/man8/reTurnServer.8*

%files sipdialer
%{_bindir}/sipdialer
%{_mandir}/man1/sipdialer.1*

%files clicktocall
%{_sbindir}/clicktocall

%files presence-server
%{_sbindir}/presSvr

%changelog
* Sat Nov 24 2012 Daniel Pocock <daniel@pocock.com.au> - 1.9.7-1
- Produce multiple packages for stack/libs, daemons, sipdialer
- Initial build based on autotools