/[resiprocate]/main/resiprocate.spec.in
ViewVC logotype

Contents of /main/resiprocate.spec.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11200 - (show annotations) (download)
Sat May 31 10:39:34 2014 UTC (6 months, 2 weeks ago) by dpocock
File size: 13143 byte(s)
rpm: add definitions for stdint to CXXFLAGS
1 Name: @PACKAGE@
2 Version: @VERSION@
3 Release: 1%{?dist}
4 Summary: SIP and TURN stacks, with SIP proxy and TURN server implementations
5 License: VSL
6 Url: http://www.resiprocate.org
7 Source: https://www.resiprocate.org/files/pub/reSIProcate/releases/%name-%version.tar.gz
8 BuildRequires: libtool automake autoconf
9 BuildRequires: asio-devel
10 BuildRequires: boost-devel
11 BuildRequires: cajun-jsonapi-devel
12 BuildRequires: c-ares-devel
13 BuildRequires: cppunit-devel
14 BuildRequires: gperf
15 %if 0%{?fedora} >= 18
16 BuildRequires: db4-cxx-devel
17 BuildRequires: systemd
18 %endif
19 BuildRequires: db4-devel
20 BuildRequires: openssl-devel >= 0.9.8
21 BuildRequires: mysql-devel
22 BuildRequires: pcre-devel
23 BuildRequires: perl
24 BuildRequires: popt-devel
25 BuildRequires: python-devel
26 BuildRequires: python-pycxx-devel
27 BuildRequires: radiusclient-ng-devel
28 BuildRequires: xerces-c-devel
29 Requires: openssl >= 0.9.8
30 Requires: chkconfig
31 %if 0%{?fedora} < 17
32 Requires(preun): initscripts
33 %else
34 Requires(post): systemd
35 Requires(preun): systemd
36 Requires(postun): systemd
37 %endif
38 Obsoletes: resiprocate-b2bua
39
40 %description
41 The reSIProcate components, particularly the SIP stack, are in use in both
42 commercial and open-source products. The project is dedicated to maintaining
43 a complete, correct, and commercially usable implementation of SIP and a few
44 related protocols.
45
46 %package libs
47 Summary: Shared libraries http://www.resiprocate.org
48
49 %description libs
50 reSIProcate is a framework that aims to fully implement the SIP protocol
51 in first class C++. It is intended for use in other applications,
52 such as the repro SIP proxy.
53 This package provides the core libraries: librutil (utilities),
54 libresip (SIP stack/RFC compliant message parsing) and
55 libdum (SIP Dialog Usage Manager, a state machine for SIP dialogs).
56
57 %package devel
58 Summary: reSIProcate development files
59 Requires: %{name}-libs%{?_isa} = %{version}-%{release}
60
61 %description devel
62 Resiprocate SIP Stack development files.
63
64 %package repro
65 Summary: SIP proxy
66 Requires(pre): shadow-utils
67
68 %description repro
69 repro is the SIP proxy developed as part of the reSIProcate project.
70 It provides a high-quality, low maintenance solution for serving
71 small and large IP telephony installations.
72 reSIProcate is a framework that aims to fully implement the SIP protocol
73 in first class C++. It is intended for use in other applications,
74 such as the repro SIP proxy.
75
76 %package turn-server
77 Summary: ICE/STUN/TURN server
78 Requires(pre): shadow-utils
79
80 %description turn-server
81 reTurn is the TURN server developed as part of the reSIProcate project.
82 TURN (RFC 5766) provides a standardised solution for VoIP applications
83 to find the most efficient way to route media streams when NAT and
84 firewall devices may be present.
85 reTurn provides a high-quality, low maintenance solution for serving
86 small and large IP telephony installations. It has been used successfully
87 with a variety of SIP and Jabber applications, including Lumicall,
88 Jitsi, Empathy and Psi.
89 reSIProcate is a framework that aims to fully implement the SIP protocol
90 in first class C++. It is intended for use in other applications,
91 such as the repro SIP proxy.
92
93 %package sipdialer
94 Summary: Click-to-call utility
95
96 %description sipdialer
97 sipdialer is a click-to-call application that uses the SIP REFER
98 method to force a SIP phone (for example, the phone on your desk)
99 to dial another number. It can be registered in GConf to handle
100 clicks on sip:, sips: and tel: URIs in other applications and the
101 web browser.
102 reSIProcate is a framework that aims to fully implement the SIP protocol
103 in first class C++. It is intended for use in other applications,
104 such as the repro SIP proxy.
105
106 %package clicktocall
107 Summary: Click-to-call server process
108
109 %description clicktocall
110 Provides a simple SIP click-to-call service.
111 reSIProcate is a framework that aims to fully implement the SIP protocol
112 in first class C++. It is intended for use in other applications,
113 such as the repro SIP proxy.
114
115 %package presence-server
116 Summary: Basic SIP presence server
117
118 %description presence-server
119 Provides a simple SIP presence server.
120 reSIProcate is a framework that aims to fully implement the SIP protocol
121 in first class C++. It is intended for use in other applications,
122 such as the repro SIP proxy.
123
124 %prep
125 %setup -q
126
127 %build
128 %if 0%{?fedora} < 14
129 PYVERSION=2.6
130 %else
131 PYVERSION=2.7
132 %endif
133 PYCONFIG=/usr/bin/python${PYVERSION}-config
134 export LDFLAGS="${LDFLAGS} -L%{_libdir}/mysql -L%{_libdir}/libdb4"
135 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
136 sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
137 sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
138 make %{?_smp_mflags}
139
140 %install
141 make DESTDIR=%{buildroot} install
142 %if 0%{?fedora} >= 17
143 install -p -D -m644 repro/pkg/fedora/repro.service %{buildroot}%{_unitdir}/repro.service
144 install -p -D -m644 reTurn/pkg/fedora/resiprocate-turn-server.service %{buildroot}%{_unitdir}/resiprocate-turn-server.service
145 %else
146 install -p -D -m755 repro/pkg/fedora/repro.init %{buildroot}%{_initddir}/repro
147 install -p -D -m755 reTurn/pkg/fedora/resiprocate-turn-server.init %{buildroot}%{_initddir}/resiprocate-turn-server
148 %endif
149 install -p -D -m644 repro/pkg/fedora/repro.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/repro
150 install -p -D -m644 reTurn/pkg/fedora/resiprocate-turn-server.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/resiprocate-turn-server
151 install -m 0755 -d %{buildroot}%{_sysconfdir}/repro
152 install -p -D -m640 repro/repro.config %{buildroot}%{_sysconfdir}/repro/repro.config
153 install -p -D -m640 repro/users.txt %{buildroot}%{_sysconfdir}/repro/users.txt
154 sed -i \
155 -e 's!^LoggingType = cout$!LoggingType = file!' \
156 -e 's!^LogLevel = INFO$!LogLevel = WARNING!' \
157 -e 's!^LogFilename = repro.log$!LogFilename = %{_localstatedir}/log/repro/repro.log!' \
158 -e 's!^LogFileMaxBytes = 5242880!LogFileMaxBytes = 0!' \
159 -e 's!^HttpAdminUserFile = users.txt$!HttpAdminUserFile = %{_sysconfdir}/repro/users.txt!' \
160 -e 's!^#PluginDirectory = /usr/lib/repro/plugins$!PluginDirectory = %{_libdir}/resiprocate/repro/plugins!' \
161 -e 's!^#RunAsUser = repro$!RunAsUser = repro!' \
162 -e 's!^#RunAsGroup = repro$!RunAsGroup = repro!' \
163 -e 's!^Daemonize = false$!Daemonize = true!' \
164 -e 's!^DatabasePath = ./$!DatabasePath = %{_sharedstatedir}/repro!' \
165 -e 's!^ChallengeThirdPartiesCallingLocalDomains = true$!ChallengeThirdPartiesCallingLocalDomains = false!' \
166 %{buildroot}%{_sysconfdir}/repro/repro.config
167 install -p -D -m640 reTurn/reTurnServer.config %{buildroot}%{_sysconfdir}/reTurn/reTurnServer.config
168 install -p -D -m640 reTurn/users.txt %{buildroot}%{_sysconfdir}/reTurn/users.txt
169 sed -i -e 's/1234/6078a36f89704d83763c9e174b3e87a4/' %{buildroot}%{_sysconfdir}/reTurn/users.txt
170 sed -i \
171 -e 's!^TlsTurnPort = 5349!TlsTurnPort = 0!' \
172 -e 's!^LoggingLevel = DEBUG!LoggingLevel = WARNING!' \
173 -e 's!^LogFilename = reTurnServer.log!LogFilename = %{_localstatedir}/log/reTurnServer/reTurnServer.log!' \
174 -e 's!^LogFileMaxLines = 50000!LogFileMaxLines = 0!' \
175 -e 's!^Daemonize = false!Daemonize = true!' \
176 -e 's!^#RunAsUser = return!RunAsUser = return!' \
177 -e 's!^#RunAsGroup = return!RunAsGroup = return!' \
178 -e 's!^UserDatabaseFile = users.txt!UserDatabaseFile = %{_sysconfdir}/reTurn/users.txt!' \
179 -e 's!^UserDatabaseHashedPasswords = false!UserDatabaseHashedPasswords = true!' \
180 -e 's!^TlsTempDhFilename = dh512.pem!TlsTempDhFilename = %{_sysconfdir}/reTurn/dh512.pem!' \
181 %{buildroot}%{_sysconfdir}/reTurn/reTurnServer.config
182 install -m 0755 -d %{buildroot}%{_sharedstatedir}/repro
183 rm -f %{buildroot}%{_libdir}/lib*.a
184 rm -f %{buildroot}%{_libdir}/lib*.la
185 rm -f %{buildroot}%{_libdir}/resiprocate/repro/plugins/lib*.a
186 rm -f %{buildroot}%{_libdir}/resiprocate/repro/plugins/lib*.la
187 install -m 0755 -d %{buildroot}/%{_docdir}/repro/examples/pyroute
188 install -p -D -m644 repro/plugins/pyroute/*.py %{buildroot}/%{_docdir}/repro/examples/pyroute
189 install -p -D -m644 repro/plugins/pyroute/README.txt %{buildroot}/%{_docdir}/repro/examples/pyroute
190 install -m 0750 -d %{buildroot}%{_localstatedir}/log/repro
191 touch %{buildroot}%{_localstatedir}/log/repro/repro.log
192 install -m 0750 -d %{buildroot}%{_localstatedir}/log/reTurnServer
193 touch %{buildroot}%{_localstatedir}/log/reTurnServer/reTurnServer.log
194
195 %pre repro
196 getent group repro >/dev/null || groupadd -r repro
197 getent passwd repro >/dev/null || \
198 useradd -r -g repro -d %{_sharedstatedir}/repro -s /sbin/nologin \
199 -c "repro SIP proxy" repro
200
201 %pre turn-server
202 getent group return >/dev/null || groupadd -r return
203 getent passwd return >/dev/null || \
204 useradd -r -g return -d / -s /sbin/nologin \
205 -c "reTurn TURN server" return
206
207 %post libs -p /sbin/ldconfig
208
209 %post repro
210 /sbin/ldconfig
211 %if 0%{?fedora} >= 18
212 %systemd_post repro.service
213 %else
214 if [ $1 -eq 1 ] ; then
215 # Initial installation
216 /sbin/chkconfig --add repro
217 fi
218 %endif
219
220 %post turn-server
221 %if 0%{?fedora} >= 18
222 %systemd_post resiprocate-turn-server.service
223 %else
224 if [ $1 -eq 1 ] ; then
225 # Initial installation
226 /sbin/chkconfig --add resiprocate-turn-server
227 fi
228 %endif
229
230 %preun repro
231 %if 0%{?fedora} >= 18
232 %systemd_preun repro.service
233 %else
234 if [ "$1" = 0 ]
235 then
236 # Package removal, not upgrade
237 /sbin/service repro stop
238 /sbin/chkconfig --del repro
239 fi
240 %endif
241
242 %preun turn-server
243 %if 0%{?fedora} >= 18
244 %systemd_preun resiprocate-turn-server.service
245 %else
246 if [ "$1" = 0 ]
247 then
248 # Package removal, not upgrade
249 /sbin/service resiprocate-turn-server stop
250 /sbin/chkconfig --del resiprocate-turn-server
251 fi
252 %endif
253
254 %postun libs -p /sbin/ldconfig
255
256 %postun repro
257 /sbin/ldconfig
258 %if 0%{?fedora} >= 18
259 %systemd_postun_with_restart repro.service
260 %else
261 if [ $1 -ge 1 ] ; then
262 # Package upgrade, not uninstall
263 /sbin/service repro try-restart
264 fi
265 %endif
266
267 %postun turn-server
268 %if 0%{?fedora} >= 18
269 %systemd_postun_with_restart resiprocate-turn-server.service
270 %else
271 if [ $1 -ge 1 ] ; then
272 # Package upgrade, not uninstall
273 /sbin/service resiprocate-turn-server try-restart
274 fi
275 %endif
276
277 %clean
278 rm -rf $RPM_BUILD_ROOT
279
280 %files libs
281 %doc COPYING
282 %{_libdir}/libdum-*.so
283 %{_libdir}/librepro-*.so
284 %{_libdir}/libresip-*.so
285 %{_libdir}/libreTurnClient-*.so
286 %{_libdir}/librutil-*.so
287 %{_libdir}/libsipdial-*.so
288
289 %files devel
290 %dir %{_includedir}/clicktocall/
291 %dir %{_includedir}/reTurn/
292 %dir %{_includedir}/reTurn/client/
293 %dir %{_includedir}/repro/
294 %dir %{_includedir}/repro/monkeys/
295 %dir %{_includedir}/repro/stateAgents/
296 %dir %{_includedir}/resip/
297 %dir %{_includedir}/resip/dum/
298 %dir %{_includedir}/resip/dum/ssl/
299 %dir %{_includedir}/resip/stack/
300 %dir %{_includedir}/resip/stack/ssl/
301 %dir %{_includedir}/rutil/
302 %dir %{_includedir}/rutil/dns/
303 %dir %{_includedir}/rutil/ssl/
304 %dir %{_includedir}/rutil/stun/
305 %dir %{_includedir}/rutil/wince/
306 %dir %{_includedir}/sipdial/
307 %{_includedir}/clicktocall/*.hxx
308 %{_includedir}/reTurn/*.hxx
309 %{_includedir}/reTurn/client/*.hxx
310 %{_includedir}/repro/*.hxx
311 %{_includedir}/repro/*/*.hxx
312 %{_includedir}/resip/dum/*.hxx
313 %{_includedir}/resip/dum/ssl/*.hxx
314 %{_includedir}/resip/stack/*.hxx
315 %{_includedir}/resip/stack/ssl/*.hxx
316 %{_includedir}/rutil/*.hxx
317 %{_includedir}/rutil/*/*.hxx
318 %{_includedir}/sipdial/*.hxx
319 %{_libdir}/libdum.so
320 %{_libdir}/librepro.so
321 %{_libdir}/libresip.so
322 %{_libdir}/libreTurnClient.so
323 %{_libdir}/librutil.so
324 %{_libdir}/libsipdial.so
325
326 %files repro
327 %attr(0750,repro,repro) %dir %{_sharedstatedir}/repro
328 %attr(0640,root,repro) %config(noreplace) %{_sysconfdir}/repro/repro.config
329 %attr(0640,root,repro) %config(noreplace) %{_sysconfdir}/repro/users.txt
330 %config(noreplace) %{_sysconfdir}/logrotate.d/repro
331 %attr(0750,repro,repro) %dir %{_localstatedir}/log/repro
332 %config %ghost %{_localstatedir}/log/repro/repro.log
333 %if 0%{?fedora} >= 17
334 %{_unitdir}/repro.service
335 %else
336 %{_initddir}/repro
337 %endif
338 %{_sbindir}/repro
339 %{_sbindir}/reprocmd
340 %{_sbindir}/queuetostream
341 %{_mandir}/man8/repro*.8*
342 %dir %{_libdir}/@PACKAGE@/repro/plugins
343 %{_libdir}/@PACKAGE@/repro/plugins/*.so
344 %{_docdir}/repro
345
346 %files turn-server
347 %attr(0640,root,return) %config(noreplace) %{_sysconfdir}/reTurn/reTurnServer.config
348 %attr(0640,root,return) %config(noreplace) %{_sysconfdir}/reTurn/users.txt
349 %config(noreplace) %{_sysconfdir}/logrotate.d/resiprocate-turn-server
350 %attr(0750,return,return) %dir %{_localstatedir}/log/reTurnServer
351 %config %ghost %{_localstatedir}/log/reTurnServer/reTurnServer.log
352 %if 0%{?fedora} >= 17
353 %{_unitdir}/resiprocate-turn-server.service
354 %else
355 %{_initddir}/resiprocate-turn-server
356 %endif
357 %{_sbindir}/reTurnServer
358 %{_mandir}/man8/reTurnServer.8*
359
360 %files sipdialer
361 %{_bindir}/sipdialer
362 %{_mandir}/man1/sipdialer.1*
363
364 %files clicktocall
365 %{_sbindir}/clicktocall
366
367 %files presence-server
368 %{_sbindir}/presSvr
369
370 %changelog
371 * Sat Nov 24 2012 Daniel Pocock <daniel@pocock.com.au> - @VERSION@-1
372 - Produce multiple packages for stack/libs, daemons, sipdialer
373 - Initial build based on autotools
374

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.23