-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathperdition.spec.in
471 lines (393 loc) · 12.7 KB
/
perdition.spec.in
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
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
%define ver @VERSION@
%define rel 1
%global debug_package %{nil}
## Our optional build-time flags. Since the configuration script
# defaults to --enable-FEATURE we only set the --disable-FEATURE
# versions here. NOTE: We default to ENABLE
%{?_without_ldap: %define _without_ldap --disable-ldap}
%{?_without_ldap: %define _without_ldap --disable-ldap}
%{?_without_gdbm: %define _without_gdbm --disable-gdbm}
%{?_without_mysql: %define _without_mysql --disable-mysql}
%{?_without_pg: %define _without_pg --disable-pg}
%{?_without_pam: %define _without_pam --disable-pam}
%{?_without_ssl: %define _without_ssl --disable-ssl}
%{?_without_odbc: %define _without_odbc --disable-odbc}
%{?_without_bdb: %define _without_bdb --disable-bdb}
%{?_without_cdb: %define _without_cdb --disable-cdb}
Summary: Mail Retrieval Proxy
Name: perdition
Version: %ver
Release: %rel
License: GPL
Group: Applications/Internet
Source: http://horms.net/projects/perdition/download/%{ver}/perdition-%{ver}.tar.xz
BuildRoot: %{_tmppath}/perdition-%{PACKAGE_VERSION}-root
URL: http://horms.net/projects/perdition/
Provides: perdition-%{ver}-%{rel}
BuildRequires: gcc
BuildRequires: make
BuildRequires: libvanessa_logger0-devel >= 0.0.10
BuildRequires: libvanessa_adt1-devel >= 0.0.9
BuildRequires: libvanessa_socket2-devel >= 0.0.12
BuildRequires: zlib-devel
BuildRequires: pkgconfig
%{!?_without_gdbm:BuildRequires: gdbm-devel}
%{!?_without_mysql:BuildRequires: mysql-devel}
%{!?_without_pg:BuildRequires: postgresql-devel}
%{!?_without_pam:BuildRequires: pam-devel}
%{!?_without_ssl:BuildRequires: openssl-devel}
%{!?_without_odbc:BuildRequires: unixODBC-devel}
%if 0%{?centos_version} && 0%{?centos_version} < 600 || 0%{?rhel_version} && 0%{?rhel_version} < 600
BuildRequires: popt
%else
%if 0%{?mandriva_version}
BuildRequires: libpopt-devel
%else
BuildRequires: popt-devel
%endif
%endif
%if %{?_without_bdb:0}%{!?_without_bdb:1}
%if 0%{?centos_version} && 0%{?centos_version} < 700
BuildRequires: db-devel
%else
%if 0%{?rhel_version} && 0%{?rhel_version} < 700
BuildRequires: db-devel
%else
%if 0%{?suse_version}
BuildRequires: db-devel
%else
%if 0%{?mandriva_version}
BuildRequires: libdb4.6-devel
%else
%if 0%{?scientificlinux_version} == 600
BuildRequires: db4-devel
%else
BuildRequires: libdb-devel
%endif
%endif
%endif
%endif
%endif
%endif
%if %{?_without_ldap:0}%{!?_without_ldap:1}
%if 0%{?suse_version}
BuildRequires: openldap2-devel
%else
BuildRequires: openldap-devel
%endif
%endif
%if %{?_without_odbc:0}%{!?_without_odbc:1}
%if 0%{?suse_version} >= 1200 && 0%{?suse_version} <= 1320
BuildRequires: libtool-ltdl-devel
%endif
%endif
%if 0%{?suse_version}
PreReq: %insserv_prereq %fillup_prereq
%else
Requires(post): chkconfig
Requires(preun): chkconfig
%if 0%{?mandriva_version}
%else
Requires(preun): initscripts
%endif
%endif
Requires: libvanessa_socket2 >= 0.0.12
%description
Perdition is a fully featured POP3 and IMAP4 proxy server. It is able to
handle both SSL and non-SSL connections and redirect users to a
real-server based on a database lookup. Perdition supports modular based
database access. ODBC, MySQL, PostgreSQL, GDBM, POSIX Regular Expression
and NIS modules ship with the distribution. The API for modules is open
allowing abitary modules to be written to allow access to any data store.
Perdition can be used to: Create large mail systems where a users mailbox
may be stored on one of several hosts. Integrate different mail systems
together. Migrate between different email infastructure. And in firewall
applications.
Accepted build-time options (i.e. # rpmbuild --without XXX -ba perdition.spec) are:
--without pam Exclude PAM support
--without ssl Exclude SSL support
--without cdb Exclude CDB support
--without mysql Do not build libperditiondb_mysql0 package
--without odbc Do not build libperditiondb_odbc0 package
--without pg Do not build libperditiondb_pg0 package
--without gdbm Do not build libperditiondb_gdbm0 package
--without bdb Do not build libperditiondb_bdb0 package
--without ldap Do not build libperditiondb_ldap0 package
%package devel
Summary: Headers and static libraries for perditiondb library development
Group: Development/Libraries
Requires: perdition-%{ver}-%{rel}
%description devel
Perdition allows for arbitrary user database access through
shared libraries much in the manner of NSS in glibc. This package
provides headers and libraries that may be useful in the development
of perditiondb libraries.
%package -n libperditiondb_bdb0
Summary: Library to allow perdition to access Berkeley DB based pop maps
Group: Applications/Internet
License: GPL
Requires: perdition-%{ver}-%{rel}
Provides: perdition-bdb-%{ver}-%{rel}
%description -n libperditiondb_bdb0
Perdition allows for arbitrary user database access through shared
libraries much in the manner of NSS in glibc. This package allows a user
database to be sourced from a Berkeley DB.
%package -n libperditiondb_ldap0
Summary: Library to allow perdition to access LDAP based pop maps
Group: Applications/Internet
License: GPL
Requires: perdition-%{ver}-%{rel}
Provides: perdition-ldap-%{ver}-%{rel}
%description -n libperditiondb_ldap0
Perdition allows for arbitrary user database access through shared
libraries much in the manner of NSS in glibc. This package allows a user
database to be sourced from LDAP.
%package -n libperditiondb_mysql0
Summary: Library to allow perdition to access MySQL based pop maps
Group: Applications/Internet
License: GPL
Requires: perdition-%{ver}-%{rel}
Provides: perdition-mysql-%{ver}-%{rel}
%description -n libperditiondb_mysql0
Perdition allows for arbitrary user database access through shared
libraries much in the manner of NSS in glibc. This package allows a user
database stored in a MySQL database.
%package -n libperditiondb_postgresql0
Summary: Library to allow perdition to access PostgreSQL based pop maps
Group: Applications/Internet
License: GPL
Requires: perdition-%{ver}-%{rel}
Provides: perdition-postgresql-%{ver}-%{rel}
%description -n libperditiondb_postgresql0
Perdition allows for arbitrary user database access through shared
libraries much in the manner of NSS in glibc. This package allows a user
database stored in a PostgreSQL database.
%package -n libperditiondb_odbc0
Summary: Library to allow perdition to access pop maps via ODBC
Group: Applications/Internet
License: GPL
Requires: perdition-%{ver}-%{rel}
Provides: perdition-odbc-%{ver}-%{rel}
%description -n libperditiondb_odbc0
Perdition allows for arbitrary user database access through shared
libraries much in the manner of NSS in glibc. This package allows a user
access databases via ODBC.
%prep
%setup
%build
%configure \
--with-ldap-schema-directory=no \
--enable-shared \
--disable-static \
%{?_without_mysql} \
%{?_without_odbc} \
%{?_without_pg} \
%{?_without_gdbm} \
%{?_without_bdb} \
%{?_without_cdb} \
%{?_without_ldap}
make
%install
%if 0%{?suse_version}
mkdir -p ${RPM_BUILD_ROOT}/etc/init.d
mkdir -p ${RPM_BUILD_ROOT}/var/adm/fillup-templates
%else
mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/init.d
mkdir -p ${RPM_BUILD_ROOT}/etc/sysconfig
%endif
make DESTDIR=$RPM_BUILD_ROOT install-strip
%if 0%{?suse_version}
install -m755 \
${RPM_BUILD_DIR}/perdition-%{ver}/etc/rc.d/init.d/perdition.suse \
${RPM_BUILD_ROOT}/etc/init.d/perdition
install -m644 ${RPM_BUILD_DIR}/perdition-%{ver}/etc/sysconfig/perdition.suse \
${RPM_BUILD_ROOT}/var/adm/fillup-templates/sysconfig.perdition
%else
install -m755 \
${RPM_BUILD_DIR}/perdition-%{ver}/etc/rc.d/init.d/perdition.rh \
${RPM_BUILD_ROOT}/etc/rc.d/init.d/perdition
install -m644 ${RPM_BUILD_DIR}/perdition-%{ver}/etc/sysconfig/perdition \
${RPM_BUILD_ROOT}/etc/sysconfig/perdition
%endif
# Don't install .la and .so files
rm $RPM_BUILD_ROOT/%{_libdir}/*.{la,so}
%clean
rm -rf $RPM_BUILD_ROOT
%post
%if 0%{?suse_version}
%{fillup_and_insserv -n perdition}
%else
%if 0%{?mandriva_version}
%_post_service perdition
%else
/sbin/chkconfig --add perdition
%endif
%endif
make -C /etc/perdition/
ldconfig
%postun
ldconfig
%if 0%{?suse_version}
%restart_on_update perdition
%insserv_cleanup
%else
%if 0%{?mandriva_version}
%else
if [ "$1" -ge "1" ] ; then
/sbin/service perdition condrestart >/dev/null 2>&1 || :
fi
%endif
%endif
%preun
%if 0%{?suse_version}
%stop_on_removal perdition
%else
%if 0%{?mandriva_version}
%_preun_service perdition
%else
if [ $1 = 0 ]; then
/sbin/service <script> stop >/dev/null 2>&1
/sbin/chkconfig --del perdition
make -C /etc/perdition/ clean
fi
%endif
%endif
%files
%defattr(-,root,root)
%doc %attr(-, root, root) README
%doc %attr(-, root, root) ChangeLog TODO
%{_sbindir}/perdition
%{_sbindir}/perdition.*
# pam configuration
%if %{?_without_pam:0}%{!?_without_pam:1}
%config /etc/pam.d/perdition
%endif
%if 0%{?suse_version}
%config /etc/init.d/perdition
/var/adm/fillup-templates/sysconfig.perdition
%else
%config /etc/rc.d/init.d/perdition
%config /etc/sysconfig/perdition
%endif
%config /etc/perdition/perdition.conf
%{_mandir}/man8/perdition.*
%{_mandir}/man5/perditiondb.*
%config /etc/perdition/Makefile
%config /etc/perdition/Makefile.popmap
%config /etc/perdition/popmap
# nis map
%{_libdir}/libperditiondb_nis.so.0
%{_libdir}/libperditiondb_nis.so.0.0.0
# posix_regex map
%{_libdir}/libperditiondb_posix_regex.so.0
%{_libdir}/libperditiondb_posix_regex.so.0.0.0
%dir /etc/perdition
%config /etc/perdition/popmap.re
## gdbm map
%if %{?_without_gdbm:0}%{!?_without_gdbm:1}
%{_libdir}/libperditiondb_gdbm.so.0
%{_libdir}/libperditiondb_gdbm.so.0.0.0
%{_bindir}/makegdbm
%{_mandir}/man1/makegdbm.*
%endif
# daemon map
%{_libdir}/libperditiondb_daemon.so.0
%{_libdir}/libperditiondb_daemon.so.0.0.0
%{_libdir}/libperditiondb_daemon_base.so.0
%{_libdir}/libperditiondb_daemon_base.so.0.0.0
## bdb map
%if %{?_without_bdb:0}%{!?_without_bdb:1}
%files -n libperditiondb_bdb0
%defattr(-,root,root)
%{_libdir}/libperditiondb_bdb.so.0
%{_libdir}/libperditiondb_bdb.so.0.0.0
%{_bindir}/makebdb
%{_mandir}/man1/makebdb.*
%post -n libperditiondb_bdb0
ldconfig
%postun -n libperditiondb_bdb0
ldconfig
%endif
## ldap map
%if %{?_without_ldap:0}%{!?_without_ldap:1}
%files -n libperditiondb_ldap0
%defattr(-,root,root)
%doc %attr(-, root, root) perdition/db/ldap/perdition.schema
%{_libdir}/libperditiondb_ldap.so.0
%{_libdir}/libperditiondb_ldap.so.0.0.0
%{_sbindir}/perditiondb_ldap_makedb
%{_mandir}/man8/perditiondb_ldap_makedb.*
%post -n libperditiondb_ldap0
ldconfig
%postun -n libperditiondb_ldap0
ldconfig
%endif
## mysql map
%if %{?_without_mysql:0}%{!?_without_mysql:1}
%files -n libperditiondb_mysql0
%defattr(-,root,root)
%{_libdir}/libperditiondb_mysql.so.0
%{_libdir}/libperditiondb_mysql.so.0.0.0
%{_sbindir}/perditiondb_mysql_makedb
%{_mandir}/man8/perditiondb_mysql_makedb.*
%post -n libperditiondb_mysql0
ldconfig
%postun -n libperditiondb_mysql0
ldconfig
%endif
## postgresql map
%if %{?_without_pg:0}%{!?_without_pg:1}
%files -n libperditiondb_postgresql0
%defattr(-,root,root)
%{_libdir}/libperditiondb_postgresql.so.0
%{_libdir}/libperditiondb_postgresql.so.0.0.0
%{_sbindir}/perditiondb_postgresql_makedb
%{_mandir}/man8/perditiondb_postgresql_makedb.*
%post -n libperditiondb_postgresql0
ldconfig
%postun -n libperditiondb_postgresql0
ldconfig
%endif
## odbc map
%if %{?_without_odbc:0}%{!?_without_odbc:1}
%files -n libperditiondb_odbc0
%defattr(-,root,root)
%{_libdir}/libperditiondb_odbc.so.0
%{_libdir}/libperditiondb_odbc.so.0.0.0
%{_sbindir}/perditiondb_odbc_makedb
%{_mandir}/man8/perditiondb_odbc_makedb.*
%post -n libperditiondb_odbc0
ldconfig
%postun -n libperditiondb_odbc0
ldconfig
%endif
%changelog
* Tue Nov 1 2016 Simon Horman <[email protected]> (2.2)
new release
* Sun Dec 1 2013 Simon Horman <[email protected]> (2.1)
new release
* Fri Oct 4 2013 Simon Horman <[email protected]> (2.0)
new release
* Tue Mar 20 2012 Simon Horman <[email protected]> (1.19rc5-1)
new release
* Mon Sep 13 2010 Simon Horman <[email protected]> (1.19rc4-1)
new release
* Thu Jul 29 2010 Simon Horman <[email protected]> (1.19rc3-1)
new release
* Sat Jul 10 2010 Simon Horman <[email protected]> (1.19rc2-1)
new release
* Tue Jul 6 2010 Simon Horman <[email protected]> (1.19rc1-1)
new release
* Wed Jun 30 2010 Nic Bernstein <[email protected]> (1.18-2)
- Removed dependency on mysql, odbc and pam and added build-time config flags:
--without pam Exclude PAM support
--without ssl Exclude SSL support
--without cdb Exclude CDB support
--without mysql Do not build libperditiondb_mysql0 package
--without odbc Do not build libperditiondb_odbc0 package
--without pg Do not build libperditiondb_pg0 package
--without gdbm Do not build libperditiondb_gdbm0 package
--without bdb Do not build libperditiondb_bdb0 package
--without ldap Do not build libperditiondb_ldap0 package
* Fri Nov 27 2009 Simon Horman <[email protected]> (1.18-1)
new release