]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_without pgsql # without PostgreSQL support | |
4 | %bcond_without mysql # without MySQL support | |
5 | %bcond_without sqlite # without sqlite | |
6 | %bcond_without whoson # without whoson support | |
7 | %bcond_without sasl # without SASL | |
8 | %bcond_without ldap # without LDAP support | |
9 | %bcond_without spf # without spf support | |
10 | %bcond_without srs # without srs support | |
11 | %bcond_without dkeys # without domainkeys support | |
12 | # | |
13 | Summary: University of Cambridge Mail Transfer Agent | |
14 | Summary(pl.UTF-8): Agent Transferu Poczty Uniwersytetu w Cambridge | |
15 | Summary(pt_BR.UTF-8): Servidor de correio eletrônico exim | |
16 | Name: exim | |
17 | Version: 4.66 | |
18 | Release: 3 | |
19 | Epoch: 2 | |
20 | License: GPL | |
21 | Group: Networking/Daemons | |
22 | Source0: ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/%{name}-%{version}.tar.bz2 | |
23 | # Source0-md5: 01288e44919d8abdde5a7bd2c200449b | |
24 | Source1: ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/%{name}-texinfo-%{version}.tar.bz2 | |
25 | # Source1-md5: f45a204f3865afa2d72b0fbd3eff8bf8 | |
26 | Source2: %{name}.init | |
27 | Source3: %{name}.cron.db | |
28 | Source4: %{name}4.conf | |
29 | Source5: analyse-log-errors | |
30 | Source6: %{name}on.desktop | |
31 | # 20021016: http://www.logic.univie.ac.at/~ametzler/debian/exim4manpages/ | |
32 | Source7: %{name}4-man-021016.tar.bz2 | |
33 | # Source7-md5: b552704ebf853a401946038a2b7e8e98 | |
34 | Source9: %{name}.aliases | |
35 | Source10: newaliases | |
36 | Source11: %{name}.logrotate | |
37 | Source12: %{name}.sysconfig | |
38 | Source13: ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/FAQ.txt.bz2 | |
39 | # Source13-md5: ff781bd31fb1d574c8b9d33f4bfd34a7 | |
40 | Source14: ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/config.samples.tar.bz2 | |
41 | # Source14-md5: 4b93321938a800caa6127c48ad60a42b | |
42 | Source15: %{name}4-smtp.pamd | |
43 | Source16: %{name}on.png | |
44 | Patch0: %{name}4-EDITME.patch | |
45 | Patch1: %{name}4-monitor-EDITME.patch | |
46 | Patch2: %{name}4-cflags.patch | |
47 | Patch3: %{name}4-use_system_pcre.patch | |
48 | Patch4: %{name}4-Makefile-Default.patch | |
49 | # http://marc.merlins.org/linux/exim/files/sa-exim-cvs/localscan_dlopen_exim_4.20_or_better.patch | |
50 | Patch5: localscan_dlopen_%{name}_4.20_or_better.patch | |
51 | Patch6: %{name}-noloadbalance.patch | |
52 | # http://sourceforge.net/projects/eximdsn/ | |
53 | Patch7: %{name}_463_dsn_1_3.patch | |
54 | Patch8: %{name}-spam-timeout.patch | |
55 | Patch9: %{name}-bug-461.patch | |
56 | URL: http://www.exim.org/ | |
57 | %{?with_sasl:BuildRequires: cyrus-sasl-devel >= 2.1.0} | |
58 | BuildRequires: db-devel | |
59 | %{?with_dkeys:BuildRequires: libdomainkeys-devel >= 0.68} | |
60 | %{?with_spf:BuildRequires: libspf2-devel >= 1.2.5-2} | |
61 | %{?with_srs:BuildRequires: libsrs_alt-devel >= 1.0} | |
62 | %{?with_mysql:BuildRequires: mysql-devel} | |
63 | %{?with_ldap:BuildRequires: openldap-devel >= 2.3.0} | |
64 | BuildRequires: openssl-devel >= 0.9.7d | |
65 | BuildRequires: pam-devel | |
66 | BuildRequires: pcre-devel | |
67 | BuildRequires: perl-devel >= 1:5.6.0 | |
68 | %{?with_pgsql:BuildRequires: postgresql-devel} | |
69 | BuildRequires: readline-devel | |
70 | BuildRequires: rpmbuild(macros) >= 1.268 | |
71 | %{?with_sqlite:BuildRequires: sqlite3-devel} | |
72 | BuildRequires: texinfo >= 4.7 | |
73 | %{?with_whoson:BuildRequires: whoson-devel} | |
74 | BuildRequires: xorg-lib-libX11-devel | |
75 | Requires(post): /bin/hostname | |
76 | Requires(post): fileutils | |
77 | Requires(post,preun): /sbin/chkconfig | |
78 | Requires(postun): /usr/sbin/groupdel | |
79 | Requires(postun): /usr/sbin/userdel | |
80 | Requires(pre): /bin/id | |
81 | Requires(pre): /usr/bin/getgid | |
82 | Requires(pre): /usr/sbin/groupadd | |
83 | Requires(pre): /usr/sbin/useradd | |
84 | Requires: findutils | |
85 | Requires: pam >= 0.79.0 | |
86 | Requires: perl(DynaLoader) = %(%{__perl} -MDynaLoader -e 'print DynaLoader->VERSION') | |
87 | Requires: rc-scripts | |
88 | Provides: group(exim) | |
89 | Provides: smtpdaemon | |
90 | Provides: user(exim) | |
91 | Obsoletes: courier | |
92 | Obsoletes: masqmail | |
93 | Obsoletes: nullmailer | |
94 | Obsoletes: omta | |
95 | Obsoletes: postfix | |
96 | Obsoletes: qmail | |
97 | Obsoletes: qmail-client | |
98 | Obsoletes: sendmail | |
99 | Obsoletes: sendmail-cf | |
100 | Obsoletes: sendmail-doc | |
101 | Obsoletes: smail | |
102 | Obsoletes: smtpdaemon | |
103 | Obsoletes: ssmtp | |
104 | Obsoletes: zmailer | |
105 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
106 | ||
107 | %description | |
108 | Smail like Mail Transfer Agent with single configuration file. | |
109 | Features: flexible retry algorithms, header & envelope rewriting, | |
110 | multiple deliveries down single connection or multiple deliveries in | |
111 | parallel, regular expressions in configuration parameters, file | |
112 | lookups, supports sender and/or reciever verification, selective | |
113 | relaying, supports virtual domains, built-in mail filtering and can be | |
114 | configured to drop root privilleges when possible. | |
115 | ||
116 | %description -l pl.UTF-8 | |
117 | Agent transferu poczty (MTA) z pojedynczym plikiem konfiguracyjnym. | |
118 | Jego zalety: świetne algorytmy, możliwość przepisywania nagłówków & | |
119 | koperty, wielokrotne dostarczanie poczty podczas jednego połączenia | |
120 | lub równoległe dostarczanie poczty, wyrażenia regularne w parametrach | |
121 | konfiguracyjnych, weryfikacja nadawcy i/lub odbiorcy, selektywne | |
122 | relayowanie, wsparcie dla wirtualnych domen, wbudowany system filtrów, | |
123 | możliwość odrzucania praw roota kiedy jest to możliwe. | |
124 | ||
125 | %description -l pt_BR.UTF-8 | |
126 | O exim é um agente de transporte de correio eletrônico (MTA), | |
127 | desenvolvido na Universidade de Cambridge para uso em sistemas Unix | |
128 | conectados a Internet. Similar em estilo ao smail 3, suas facilidades | |
129 | são mais extensivas e em particular ele tem opções para verificação do | |
130 | remetente e destinatário, para recusar mensagens de máquinas, redes ou | |
131 | remetentes específicos. | |
132 | ||
133 | %package X11 | |
134 | Summary: X11 based Exim administration tool | |
135 | Summary(pl.UTF-8): Narzędzia administracyjne exima dla X11 | |
136 | Summary(pt_BR.UTF-8): Monitor X11 para o exim | |
137 | Group: X11/Applications | |
138 | ||
139 | %description X11 | |
140 | X11 based monitor & administration utility for the Exim Mail Transfer | |
141 | Agent. | |
142 | ||
143 | %description X11 -l pl.UTF-8 | |
144 | Bazujące na X11 narzędzia dla Exima - monitor i program | |
145 | administracyjny. | |
146 | ||
147 | %description X11 -l pt_BR.UTF-8 | |
148 | O monitor exim é um suplemento opcional ao pacote exim. Ele mostra | |
149 | informações sobre o processamento do exim em uma janela X11. O | |
150 | administrador pode executar uma série de ações de controle a partir | |
151 | desta interface. | |
152 | ||
153 | %package devel | |
154 | Summary: Header files for Exim | |
155 | Summary(pl.UTF-8): Pliki nagłówkowe dla Exima | |
156 | Group: Development/Libraries | |
157 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
158 | ||
159 | %description devel | |
160 | Header files for Exim. | |
161 | ||
162 | %description devel -l pl.UTF-8 | |
163 | Pliki nagłówkowe dla Exima. | |
164 | ||
165 | %prep | |
166 | %setup -q -a1 -a7 | |
167 | %patch0 -p1 | |
168 | %patch1 -p1 | |
169 | %patch2 -p1 | |
170 | %patch3 -p1 | |
171 | %patch4 -p1 | |
172 | %patch5 -p1 | |
173 | %patch6 -p1 | |
174 | %patch7 -p1 | |
175 | %patch8 -p1 | |
176 | %patch9 -p1 | |
177 | ||
178 | install %{SOURCE13} doc/FAQ.txt.bz2 | |
179 | install %{SOURCE14} doc/config.samples.tar.bz2 | |
180 | ||
181 | install -d Local | |
182 | cp -f src/EDITME Local/Makefile | |
183 | cp -f exim_monitor/EDITME Local/eximon.conf | |
184 | ||
185 | %build | |
186 | %{__make} -j1 \ | |
187 | %{?debug:FULLECHO=''} \ | |
188 | CC="%{__cc}" \ | |
189 | CUSTOM_CFLAGS="%{rpmcflags} -DSUPPORT_DSN=yes %{?with_spf:-DEXPERIMENTAL_SPF=yes} %{?with_srs:-DEXPERIMENTAL_SRS=yes} %{?with_dkeys:-DEXPERIMENTAL_DOMAINKEYS=yes}" \ | |
190 | LOOKUP_CDB=yes \ | |
191 | XLFLAGS=-L%{_prefix}/X11R6/%{_lib} \ | |
192 | X11_LD_LIB=%{_prefix}/X11R6/%{_lib} \ | |
193 | %{?with_mysql:LOOKUP_MYSQL=yes} \ | |
194 | %{?with_pgsql:LOOKUP_PGSQL=yes} \ | |
195 | %{?with_sqlite:LOOKUP_SQLITE=yes} \ | |
196 | %{?with_whoson:LOOKUP_WHOSON=yes} \ | |
197 | %{?with_sasl:AUTH_CYRUS_SASL=yes} \ | |
198 | %{?with_ldap:LOOKUP_LDAP=yes LDAP_LIB_TYPE=OPENLDAP2} \ | |
199 | LOOKUP_LIBS="%{?with_ldap:-lldap -llber} %{?with_mysql:-lmysqlclient} %{?with_pgsql:-lpq} %{?with_sqlite:-lsqlite3} %{?with_whoson:-lwhoson} %{?with_spf:-lspf2} %{?with_srs:-lsrs_alt} %{?with_sasl:-lsasl2} %{?with_dkeys:-ldomainkeys}" \ | |
200 | LOOKUP_INCLUDE="%{?with_mysql:-I%{_includedir}/mysql} %{?with_pgsql:-I%{_includedir}/pgsql}" | |
201 | ||
202 | makeinfo --force -o exim_filtering.info exim-texinfo-*/doc/filter.texinfo | |
203 | makeinfo --force -o exim.info exim-texinfo-*/doc/spec.texinfo | |
204 | ||
205 | %install | |
206 | rm -rf $RPM_BUILD_ROOT | |
207 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/mail | |
208 | install -d $RPM_BUILD_ROOT/etc/{cron.{daily,weekly},logrotate.d,rc.d/init.d,sysconfig,pam.d} | |
209 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man8,%{_prefix}/lib} | |
210 | install -d $RPM_BUILD_ROOT%{_var}/{spool/exim/{db,input,msglog},log/{archiv,}/exim,mail} | |
211 | install -d $RPM_BUILD_ROOT{%{_infodir},%{_desktopdir},%{_pixmapsdir}} | |
212 | install -d $RPM_BUILD_ROOT%{_libdir}/%{name} | |
213 | ||
214 | install build-Linux-*/exim{,_fixdb,_tidydb,_dbmbuild,on.bin,_dumpdb,_lock} \ | |
215 | build-Linux-*/exi{cyclog,next,what} %{SOURCE10} \ | |
216 | build-Linux-*/{exigrep,eximstats,exiqsumm,convert4r4} \ | |
217 | util/unknownuser.sh \ | |
218 | $RPM_BUILD_ROOT%{_bindir} | |
219 | install build-Linux-*/eximon.bin $RPM_BUILD_ROOT%{_bindir} | |
220 | install build-Linux-*/eximon $RPM_BUILD_ROOT%{_bindir} | |
221 | ||
222 | install %{SOURCE5} . | |
223 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.weekly | |
224 | install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/%{name} | |
225 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} | |
226 | install %{SOURCE11} $RPM_BUILD_ROOT/etc/logrotate.d/%{name} | |
227 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/mail/exim.conf | |
228 | install {doc,man}/*.8 $RPM_BUILD_ROOT%{_mandir}/man8 | |
229 | install %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases | |
230 | install *.info* $RPM_BUILD_ROOT%{_infodir} | |
231 | install %{SOURCE15} $RPM_BUILD_ROOT/etc/pam.d/smtp | |
232 | ||
233 | ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/sendmail | |
234 | ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_prefix}/lib/sendmail | |
235 | ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/mailq | |
236 | ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/rsmtp | |
237 | ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/rmail | |
238 | ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/runq | |
239 | ||
240 | install %{SOURCE6} $RPM_BUILD_ROOT%{_desktopdir} | |
241 | install %{SOURCE16} $RPM_BUILD_ROOT%{_pixmapsdir} | |
242 | ||
243 | install -d $RPM_BUILD_ROOT%{_includedir}/%{name} | |
244 | install src/{local_scan.h,store.h,mytypes.h} $RPM_BUILD_ROOT%{_includedir}/%{name} | |
245 | ||
246 | touch $RPM_BUILD_ROOT%{_var}/log/exim/{main,reject,panic,process}.log | |
247 | ||
248 | touch $RPM_BUILD_ROOT/etc/security/blacklist.smtp | |
249 | ||
250 | %clean | |
251 | rm -rf $RPM_BUILD_ROOT | |
252 | ||
253 | %pre | |
254 | %groupadd -g 79 exim | |
255 | %useradd -u 79 -d /var/spool/exim -s /bin/false -c "Exim pseudo user" -g exim exim | |
256 | ||
257 | %post | |
258 | umask 022 | |
259 | /sbin/chkconfig --add %{name} | |
260 | %service %{name} restart "exim daemon" | |
261 | ||
262 | if [ ! -f /etc/mail/mailname ]; then | |
263 | rm -f /etc/mail/mailname && hostname -f > /etc/mail/mailname | |
264 | fi | |
265 | newaliases | |
266 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 | |
267 | ||
268 | %preun | |
269 | if [ "$1" = "0" ]; then | |
270 | %service exim stop | |
271 | /sbin/chkconfig --del %{name} | |
272 | fi | |
273 | ||
274 | %postun | |
275 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 | |
276 | if [ "$1" = "0" ]; then | |
277 | %userremove exim | |
278 | %groupremove exim | |
279 | fi | |
280 | ||
281 | %triggerpostun -- exim < 3.90 | |
282 | if [ -f /etc/mail/exim.conf ]; then | |
283 | umask 022 | |
284 | mv /etc/mail/exim.conf /etc/mail/exim.conf.3 | |
285 | /usr/bin/convert4r4 < /etc/mail/exim.conf.3 > /etc/mail/exim.conf | |
286 | fi | |
287 | ||
288 | %files | |
289 | %defattr(644,root,root,755) | |
290 | %doc README* NOTICE LICENCE analyse-log-errors doc/{ChangeLog,NewStuff,dbm.discuss.txt,filter.txt,spec.txt,Exim*.upgrade,OptionLists.txt,experimental-spec.txt} build-Linux-*/transport-filter.pl | |
291 | %dir %{_sysconfdir}/mail | |
292 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/exim.conf | |
293 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/aliases | |
294 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/exim | |
295 | %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/exim | |
296 | %attr(754,root,root) /etc/rc.d/init.d/exim | |
297 | %attr(4755,root,root) %{_bindir}/exim | |
298 | %attr(770,root,exim) %dir %{_var}/spool/exim | |
299 | %attr(750,exim,exim) %dir %{_var}/spool/exim/db | |
300 | %attr(700,exim,root) %dir %{_var}/spool/exim/input | |
301 | %attr(750,exim,root) %dir %{_var}/spool/exim/msglog | |
302 | %attr(755,root,root) %{_bindir}/exim_* | |
303 | %attr(755,root,root) %{_bindir}/exinext | |
304 | %attr(755,root,root) %{_bindir}/exiwhat | |
305 | %attr(755,root,root) %{_bindir}/exicyclog | |
306 | %attr(755,root,root) %{_bindir}/exigrep | |
307 | %attr(755,root,root) %{_bindir}/eximstats | |
308 | %attr(755,root,root) %{_bindir}/exiqsumm | |
309 | %attr(755,root,root) %{_bindir}/unknownuser.sh | |
310 | %attr(755,root,root) %{_bindir}/newaliases | |
311 | %attr(755,root,root) %{_bindir}/convert4r4 | |
312 | %attr(755,root,root) %{_sbindir}/mailq | |
313 | %attr(755,root,root) %{_sbindir}/rmail | |
314 | %attr(755,root,root) %{_sbindir}/rsmtp | |
315 | %attr(755,root,root) %{_sbindir}/runq | |
316 | %attr(755,root,root) %{_sbindir}/sendmail | |
317 | %attr(755,root,root) %{_prefix}/lib/sendmail | |
318 | %attr(754,root,root) /etc/cron.weekly/exim.cron.db | |
319 | %attr(750,exim,root) %dir %{_var}/log/exim | |
320 | %attr(750,exim,root) %dir %{_var}/log/archiv/exim | |
321 | %attr(640,exim,root) %ghost %{_var}/log/exim/* | |
322 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/smtp | |
323 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.smtp | |
324 | %{_libdir}/%{name} | |
325 | %{_infodir}/*.info* | |
326 | %{_mandir}/man8/* | |
327 | ||
328 | %files X11 | |
329 | %defattr(644,root,root,755) | |
330 | %attr(755,root,root) %{_bindir}/eximon | |
331 | %attr(755,root,root) %{_bindir}/eximon.bin | |
332 | %{_desktopdir}/eximon.desktop | |
333 | %{_pixmapsdir}/eximon.png | |
334 | ||
335 | %files devel | |
336 | %defattr(644,root,root,755) | |
337 | %{_includedir}/%{name} |