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

Contents of /main/resiprocate.spec.in

Parent Directory Parent Directory | Revision Log Revision Log


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

webmaster AT resiprocate DOT org
ViewVC Help
Powered by ViewVC 1.1.22