Browse code

- spec file for rpm v4.1 or greater

Daniel-Constantin Mierla authored on 02/06/2003 18:33:57
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,272 @@
1
+%define name    ser
2
+%define ver     0.8.11pre29
3
+%define rel     0
4
+
5
+%define EXCLUDED_MODULES	mysql jabber auth_radius group_radius uri_radius postgress snmp cpl cpl-c ext extcmd mangler pdt
6
+%define MYSQL_MODULES		mysql
7
+%define JABBER_MODULES		jabber
8
+%define RADIUS_MODULES		auth_radius group_radius uri_radius
9
+%define RADIUS_MOD_PATH		modules/auth_radius modules/group_radius modules/uri_radius
10
+
11
+Summary:      SIP Express Router, very fast and flexible SIP Proxy
12
+Name:         %name
13
+Version:      %ver
14
+Release:      %rel
15
+Packager:     Jan Janak <jan@iptel.org>
16
+Copyright:    GPL
17
+Group:        System Environment/Daemons
18
+Source:       http://iptel.org/ser/stable/%{name}-%{ver}_src.tar.gz
19
+Source2:      ser.init
20
+URL:          http://iptel.org/ser
21
+Vendor:       FhG Fokus
22
+BuildRoot:    /var/tmp/%{name}-%{ver}-root
23
+BuildPrereq:  make flex bison
24
+
25
+
26
+%description
27
+Ser or SIP Express Router is a very fast and flexible SIP (RFC3621)
28
+proxy server. Written entirely in C, ser can handle thousands calls
29
+per second even on low-budget hardware. A C Shell like scripting language
30
+provides full control over the server's behaviour. It's modular
31
+architecture allows only required functionality to be loaded.
32
+Currently the following modules are available: digest authentication,
33
+CPL scripts, instant messaging, MySQL support, a presence agent, radius
34
+authentication, record routing, an SMS gateway, a jabber gateway, a 
35
+transaction module, registrar and user location.
36
+
37
+%package  mysql
38
+Summary:  MySQL connectivity for the SIP Express Router.
39
+Group:    System Environment/Daemons
40
+Requires: ser
41
+BuildPrereq:  mysql-devel zlib-devel
42
+
43
+%description mysql
44
+The ser-mysql package contains MySQL database connectivity that you
45
+need to use digest authentication module or persistent user location
46
+entries.
47
+
48
+%package  jabber
49
+Summary:  sip jabber message translation support for the SIP Express Router.
50
+Group:    System Environment/Daemons
51
+Requires: ser
52
+BuildPrereq:  expat-devel
53
+
54
+%description jabber
55
+The ser-jabber package contains a sip to jabber message translator.
56
+
57
+%package  radius
58
+Summary:  ser radius authentication, group and uri check modules.
59
+Group:    System Environment/Daemons
60
+Requires: ser
61
+BuildPrereq:  radiusclient-devel
62
+
63
+%description radius
64
+The ser-radius package contains modules for radius authentication, group
65
+ membership and uri checking.
66
+
67
+%prep
68
+%setup
69
+
70
+%build
71
+make all skip_modules="%EXCLUDED_MODULES"      cfg-target=/%{_sysconfdir}/ser/
72
+make modules modules="modules/%MYSQL_MODULES"  cfg-target=/%{_sysconfdir}/ser/
73
+make modules modules="modules/%JABBER_MODULES" cfg-target=/%{_sysconfdir}/ser/
74
+make modules modules="%RADIUS_MOD_PATH"        cfg-target=/%{_sysconfdir}/ser/
75
+
76
+
77
+%install
78
+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
79
+
80
+make install skip_modules="%EXCLUDED_MODULES" \
81
+		basedir=$RPM_BUILD_ROOT \
82
+		prefix=/usr \
83
+		cfg-prefix=$RPM_BUILD_ROOT \
84
+		cfg-target=/%{_sysconfdir}/ser/ 
85
+make install-modules modules="modules/%MYSQL_MODULES" \
86
+		basedir=$RPM_BUILD_ROOT \
87
+		prefix=/usr \
88
+		cfg-prefix=$RPM_BUILD_ROOT \
89
+		cfg-target=/%{_sysconfdir}/ser/ 
90
+make install-modules modules="modules/%JABBER_MODULES" \
91
+		basedir=$RPM_BUILD_ROOT \
92
+		prefix=/usr \
93
+		cfg-prefix=$RPM_BUILD_ROOT \
94
+		cfg-target=/%{_sysconfdir}/ser/ 
95
+make install-doc modules="modules/%JABBER_MODULES" \
96
+		basedir=$RPM_BUILD_ROOT \
97
+		prefix=/usr \
98
+		cfg-prefix=$RPM_BUILD_ROOT \
99
+		cfg-target=/%{_sysconfdir}/ser/ 
100
+make install-modules modules="%RADIUS_MOD_PATH" \
101
+		basedir=$RPM_BUILD_ROOT \
102
+		prefix=/usr \
103
+		cfg-prefix=$RPM_BUILD_ROOT \
104
+		cfg-target=/%{_sysconfdir}/ser/ 
105
+make install-doc modules="%RADIUS_MOD_PATH" \
106
+		basedir=$RPM_BUILD_ROOT \
107
+		prefix=/usr \
108
+		cfg-prefix=$RPM_BUILD_ROOT \
109
+		cfg-target=/%{_sysconfdir}/ser/ 
110
+
111
+mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d
112
+install -m755 $RPM_SOURCE_DIR/ser.init \
113
+              $RPM_BUILD_ROOT/%{_sysconfdir}/rc.d/init.d/ser
114
+
115
+
116
+mkdir -p $RPM_BUILD_ROOT/%{_bindir}
117
+install -m755 scripts/harv_ser.sh \
118
+              $RPM_BUILD_ROOT/%{_bindir}/harv_ser.sh
119
+
120
+mv $RPM_BUILD_ROOT/%{_sbindir}/gen_ha1 $RPM_BUILD_ROOT/%{_bindir}
121
+
122
+
123
+%clean
124
+rm -rf "$RPM_BUILD_ROOT"
125
+
126
+%post
127
+/sbin/chkconfig --add ser
128
+
129
+%preun
130
+if [ $1 = 0 ]; then
131
+    /sbin/service ser stop > /dev/null 2>&1
132
+    /sbin/chkconfig --del ser
133
+fi
134
+
135
+
136
+%files
137
+%defattr(-,root,root)
138
+%dir %{_docdir}/ser
139
+%doc %{_docdir}/ser/AUTHORS
140
+%doc %{_docdir}/ser/INSTALL
141
+%doc %{_docdir}/ser/README
142
+%doc %{_docdir}/ser/README-MODULES
143
+%doc %{_docdir}/ser/README.acc
144
+%doc %{_docdir}/ser/README.auth
145
+%doc %{_docdir}/ser/README.auth_db
146
+%doc %{_docdir}/ser/README.cfg
147
+%doc %{_docdir}/ser/README.dbtext
148
+%doc %{_docdir}/ser/README.domain
149
+%doc %{_docdir}/ser/README.enum
150
+%doc %{_docdir}/ser/README.exec
151
+%doc %{_docdir}/ser/README.group
152
+%doc %{_docdir}/ser/README.maxfwd
153
+%doc %{_docdir}/ser/README.msilo
154
+%doc %{_docdir}/ser/README.nathelper
155
+%doc %{_docdir}/ser/README.pa
156
+%doc %{_docdir}/ser/README.permissions
157
+%doc %{_docdir}/ser/README.pike
158
+%doc %{_docdir}/ser/README.print
159
+%doc %{_docdir}/ser/README.registrar
160
+%doc %{_docdir}/ser/README.rr
161
+%doc %{_docdir}/ser/README.sl
162
+%doc %{_docdir}/ser/README.sms
163
+%doc %{_docdir}/ser/README.textops
164
+%doc %{_docdir}/ser/README.tm
165
+%doc %{_docdir}/ser/README.uri
166
+%doc %{_docdir}/ser/README.usrloc
167
+%doc %{_docdir}/ser/README.vm
168
+
169
+%dir %{_sysconfdir}/ser
170
+%config(noreplace) %{_sysconfdir}/ser/*
171
+%config %{_sysconfdir}/rc.d/init.d/*
172
+
173
+%dir %{_libdir}/ser
174
+%dir %{_libdir}/ser/modules
175
+%{_libdir}/ser/modules/acc.so
176
+%{_libdir}/ser/modules/auth.so
177
+%{_libdir}/ser/modules/auth_db.so
178
+%{_libdir}/ser/modules/dbtext.so
179
+%{_libdir}/ser/modules/domain.so
180
+%{_libdir}/ser/modules/enum.so
181
+%{_libdir}/ser/modules/exec.so
182
+%{_libdir}/ser/modules/group.so
183
+%{_libdir}/ser/modules/maxfwd.so
184
+%{_libdir}/ser/modules/msilo.so
185
+%{_libdir}/ser/modules/nathelper.so
186
+%{_libdir}/ser/modules/pa.so
187
+%{_libdir}/ser/modules/permissions.so
188
+%{_libdir}/ser/modules/pike.so
189
+%{_libdir}/ser/modules/print.so
190
+%{_libdir}/ser/modules/registrar.so
191
+%{_libdir}/ser/modules/rr.so
192
+%{_libdir}/ser/modules/sl.so
193
+%{_libdir}/ser/modules/sms.so
194
+%{_libdir}/ser/modules/textops.so
195
+%{_libdir}/ser/modules/tm.so
196
+%{_libdir}/ser/modules/uri.so
197
+%{_libdir}/ser/modules/usrloc.so
198
+%{_libdir}/ser/modules/vm.so
199
+
200
+%{_sbindir}/ser
201
+%{_sbindir}/serctl
202
+
203
+%{_bindir}/harv_ser.sh
204
+%{_bindir}/gen_ha1
205
+
206
+%{_mandir}/man5/*
207
+%{_mandir}/man8/*
208
+
209
+
210
+%files mysql
211
+%defattr(-,root,root)
212
+
213
+%{_libdir}/ser/modules/mysql.so
214
+%{_sbindir}/ser_mysql.sh
215
+
216
+%files jabber
217
+%defattr(-,root,root)
218
+%doc %{_docdir}/ser/README.jabber
219
+
220
+%{_libdir}/ser/modules/jabber.so
221
+
222
+%files radius
223
+%defattr(-,root,root)
224
+%doc %{_docdir}/ser/README.auth_radius
225
+%doc %{_docdir}/ser/README.group_radius
226
+%doc %{_docdir}/ser/README.uri_radius
227
+
228
+%{_libdir}/ser/modules/auth_radius.so
229
+%{_libdir}/ser/modules/group_radius.so
230
+%{_libdir}/ser/modules/uri_radius.so
231
+
232
+
233
+%changelog
234
+
235
+* Mon Jun 2 2003 Daniel-Constantin Mierla <mierla@fokus.fraunhofer.de>
236
+- added README files for ser-jabber and ser-radius packages
237
+- spec file updated to work with rpm v4.1+
238
+
239
+* Sun Jun 1 2003 Andrei Pelinescu - Onciul <pelinescu-onciul@fokus.fraunhofer.de>
240
+- added a separate rpm for the radius modules
241
+- updated to the new makefile variables (removed lots of unnecessary stuff)
242
+
243
+* Thu Nov 14 2002 Jan Janak <J.Janak@sh.cvut.cz>
244
+- Installing harv_ser.sh again
245
+- quick hack to move gen_ha1 to bin directory instead of sbin (should
246
+  be done from the Makefile next time)
247
+
248
+* Tue Nov 12 2002 Andrei Pelinescu - Onciul <pelinescu-onciul@fokus.gmd.de>
249
+- added a separate rpm for the jabber modules
250
+- moved all the binaries to sbin
251
+- removed obsolete installs (make install installs everything now)
252
+
253
+* Fri Oct 25 2002 Jan Janak <J.Janak@sh.cvut.cz>
254
+- Minor description fixes
255
+
256
+* Fri Oct  4 2002 Jiri Kuthan <jiri@iptel.org>
257
+- exec module introduced
258
+
259
+* Wed Sep 25 2002 Andrei Pelinescu - Onciul  <pelinescu-onciul@fokus.gmd.de>
260
+- modified make install & make: added cfg-target & modules-target
261
+
262
+* Sun Sep 08 2002 Jan Janak <J.Janak@sh.cvut.cz>
263
+- Created subpackage containing mysql connectivity support.
264
+
265
+* Mon Sep 02 2002 Jan Janak <J.Janak@sh.cvut.cz>
266
+- gen_ha1 utility added, scripts added.
267
+
268
+* Tue Aug 28 2002 Jan Janak <J.Janak@sh.cvut.cz>
269
+- Finished the first version of the spec file.
270
+
271
+* Sun Aug 12 2002 Jan Janak <J.Janak@sh.cvut.cz>
272
+- First version of the spec file.