]>
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 dynamic # dynamic modules | |
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.80.1 | |
18 | Release: 16 | |
19 | Epoch: 2 | |
20 | License: GPL | |
21 | Group: Networking/Daemons/SMTP | |
22 | Source0: ftp://ftp.exim.org/pub/exim/exim4/%{name}-%{version}.tar.bz2 | |
23 | # Source0-md5: 1a95dc9f02834b1b7430403a75edf162 | |
24 | Source1: ftp://ftp.exim.org/pub/exim/exim4/%{name}-html-%{version}.tar.bz2 | |
25 | # Source1-md5: a0974c2ed244faa27cb6bc1724880ed3 | |
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 | Patch4: %{name}4-Makefile-Default.patch | |
48 | # http://marc.merlins.org/linux/exim/files/sa-exim-cvs/localscan_dlopen_exim_4.20_or_better.patch | |
49 | Patch5: localscan_dlopen_%{name}_4.20_or_better.patch | |
50 | ||
51 | # http://sourceforge.net/projects/eximdsn/ | |
52 | Patch7: %{name}_463_dsn_1_3.patch | |
53 | Patch8: %{name}-spam-timeout.patch | |
54 | Patch9: exim-bug-659.patch | |
55 | Patch10: %{name}-force-sigalrm.patch | |
56 | Patch11: %{name}-bug-1057.patch | |
57 | URL: http://www.exim.org/ | |
58 | %{?with_sasl:BuildRequires: cyrus-sasl-devel >= 2.1.0} | |
59 | BuildRequires: db-devel | |
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: rpm >= 4.4.9-56 | |
71 | BuildRequires: rpmbuild(macros) >= 1.268 | |
72 | %{?with_sqlite:BuildRequires: sqlite3-devel} | |
73 | %{?with_whoson:BuildRequires: whoson-devel} | |
74 | %if "%{pld_release}" != "ac" | |
75 | BuildRequires: xorg-lib-libX11-devel | |
76 | BuildRequires: xorg-lib-libXaw-devel | |
77 | %else | |
78 | BuildRequires: XFree86-devel | |
79 | %endif | |
80 | Requires(post): /bin/hostname | |
81 | Requires(post): fileutils | |
82 | Requires(post,preun): /sbin/chkconfig | |
83 | Requires(postun): /usr/sbin/groupdel | |
84 | Requires(postun): /usr/sbin/userdel | |
85 | Requires(pre): /bin/id | |
86 | Requires(pre): /usr/bin/getgid | |
87 | Requires(pre): /usr/sbin/groupadd | |
88 | Requires(pre): /usr/sbin/useradd | |
89 | Requires: findutils | |
90 | Requires: pam >= 0.79.0 | |
91 | Requires: rc-scripts | |
92 | Requires: which | |
93 | Provides: group(exim) | |
94 | Provides: smtpdaemon | |
95 | Provides: user(exim) | |
96 | Obsoletes: smtpdaemon | |
97 | Conflicts: logrotate < 3.8.3 | |
98 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
99 | ||
100 | %description | |
101 | Smail like Mail Transfer Agent with single configuration file. | |
102 | Features: flexible retry algorithms, header & envelope rewriting, | |
103 | multiple deliveries down single connection or multiple deliveries in | |
104 | parallel, regular expressions in configuration parameters, file | |
105 | lookups, supports sender and/or reciever verification, selective | |
106 | relaying, supports virtual domains, built-in mail filtering and can be | |
107 | configured to drop root privilleges when possible. | |
108 | ||
109 | %description -l pl.UTF-8 | |
110 | Agent transferu poczty (MTA) z pojedynczym plikiem konfiguracyjnym. | |
111 | Jego zalety: świetne algorytmy, możliwość przepisywania nagłówków & | |
112 | koperty, wielokrotne dostarczanie poczty podczas jednego połączenia | |
113 | lub równoległe dostarczanie poczty, wyrażenia regularne w parametrach | |
114 | konfiguracyjnych, weryfikacja nadawcy i/lub odbiorcy, selektywne | |
115 | relayowanie, wsparcie dla wirtualnych domen, wbudowany system filtrów, | |
116 | możliwość odrzucania praw roota kiedy jest to możliwe. | |
117 | ||
118 | %description -l pt_BR.UTF-8 | |
119 | O exim é um agente de transporte de correio eletrônico (MTA), | |
120 | desenvolvido na Universidade de Cambridge para uso em sistemas Unix | |
121 | conectados a Internet. Similar em estilo ao smail 3, suas facilidades | |
122 | são mais extensivas e em particular ele tem opções para verificação do | |
123 | remetente e destinatário, para recusar mensagens de máquinas, redes ou | |
124 | remetentes específicos. | |
125 | ||
126 | %package X11 | |
127 | Summary: X11 based Exim administration tool | |
128 | Summary(pl.UTF-8): Narzędzia administracyjne exima dla X11 | |
129 | Summary(pt_BR.UTF-8): Monitor X11 para o exim | |
130 | Group: X11/Applications | |
131 | ||
132 | %description X11 | |
133 | X11 based monitor & administration utility for the Exim Mail Transfer | |
134 | Agent. | |
135 | ||
136 | %description X11 -l pl.UTF-8 | |
137 | Bazujące na X11 narzędzia dla Exima - monitor i program | |
138 | administracyjny. | |
139 | ||
140 | %description X11 -l pt_BR.UTF-8 | |
141 | O monitor exim é um suplemento opcional ao pacote exim. Ele mostra | |
142 | informações sobre o processamento do exim em uma janela X11. O | |
143 | administrador pode executar uma série de ações de controle a partir | |
144 | desta interface. | |
145 | ||
146 | %package devel | |
147 | Summary: Header files for Exim | |
148 | Summary(pl.UTF-8): Pliki nagłówkowe dla Exima | |
149 | Group: Development/Libraries | |
150 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
151 | ||
152 | %description devel | |
153 | Header files for Exim. | |
154 | ||
155 | %description devel -l pl.UTF-8 | |
156 | Pliki nagłówkowe dla Exima. | |
157 | ||
158 | %global dynamic_type yes | |
159 | %{?with_dynamic:%global dynamic_type 2} | |
160 | ||
161 | %prep | |
162 | %setup -q -a1 -a7 | |
163 | %patch0 -p1 | |
164 | %patch1 -p1 | |
165 | %patch2 -p1 | |
166 | %patch4 -p1 | |
167 | %patch5 -p1 | |
168 | ||
169 | %patch7 -p1 | |
170 | %patch8 -p1 | |
171 | %patch9 -p2 | |
172 | %patch10 -p1 | |
173 | %patch11 -p1 | |
174 | ||
175 | install %{SOURCE13} doc/FAQ.txt.bz2 | |
176 | install %{SOURCE14} doc/config.samples.tar.bz2 | |
177 | ||
178 | install -d Local | |
179 | cat << 'EOF' >> Local/Makefile-Linux | |
180 | CC=%{__cc} | |
181 | CUSTOM_CFLAGS=%{rpmcppflags} %{rpmcflags} | |
182 | CFLAGS_DYNAMIC=-shared -rdynamic -fPIC %{rpmldflags} | |
183 | LOOKUP_CDB=yes | |
184 | XLFLAGS=-L%{_prefix}/X11R6/%{_lib} | |
185 | X11_LD_LIB=%{_prefix}/X11R6/%{_lib} | |
186 | %{?with_dynamic:LOOKUP_MODULE_DIR=%{_libdir}/%{name}/modules} | |
187 | SUPPORT_DSN=yes | |
188 | %{?with_spf:EXPERIMENTAL_SPF=yes} | |
189 | %{?with_srs:EXPERIMENTAL_SRS=yes} | |
190 | %if %{with mysql} | |
191 | LOOKUP_MYSQL=%{dynamic_type} | |
192 | # for dynamic | |
193 | LOOKUP_MYSQL_INCLUDE=-I%{_includedir}/mysql | |
194 | LOOKUP_MYSQL_LIBS=-lmysqlclient | |
195 | # for static | |
196 | LOOKUP_INCLUDE+=-I%{_includedir}/mysql | |
197 | LOOKUP_LIBS+=-lmysqlclient | |
198 | %endif | |
199 | %if %{with pgsql} | |
200 | LOOKUP_PGSQL=%{dynamic_type} | |
201 | # for dynamic | |
202 | LOOKUP_PGSQL_INCLUDE=-I%{_includedir}/pgsql | |
203 | LOOKUP_PGSQL_LIBS=-lpq | |
204 | # for static | |
205 | LOOKUP_INCLUDE+=-I%{_includedir}/pgsql | |
206 | LOOKUP_LIBS+=-lpq | |
207 | %endif | |
208 | %if %{with sqlite} | |
209 | LOOKUP_SQLITE=%{dynamic_type} | |
210 | # for dynamic | |
211 | LOOKUP_SQLITE_LIBS=-lsqlite3 | |
212 | # for static | |
213 | LOOKUP_LIBS+=-lsqlite3 | |
214 | %endif | |
215 | %if %{with whoson} | |
216 | LOOKUP_WHOSON=%{dynamic_type} | |
217 | # for dynamic | |
218 | LOOKUP_WHOSON_LIBS=-lwhoson | |
219 | # for static | |
220 | LOOKUP_LIBS+=-lwhoson | |
221 | %endif | |
222 | %{?with_sasl:AUTH_CYRUS_SASL=yes} | |
223 | %if %{with ldap} | |
224 | LOOKUP_LDAP=%{dynamic_type} | |
225 | LDAP_LIB_TYPE=OPENLDAP2 | |
226 | # for dynamic | |
227 | LOOKUP_LDAP_LIBS=-lldap -llber | |
228 | # for static | |
229 | LOOKUP_LIBS+=-lldap -llber | |
230 | %endif | |
231 | LOOKUP_LIBS+=%{?with_spf:-lspf2} %{?with_srs:-lsrs_alt} %{?with_sasl:-lsasl2} | |
232 | EOF | |
233 | ||
234 | # have to be after Local/Makefile-Linux creation | |
235 | cp -f src/EDITME Local/Makefile | |
236 | cp -f exim_monitor/EDITME Local/eximon.conf | |
237 | ||
238 | %build | |
239 | %{__make} -e -j1 \ | |
240 | FULLECHO='' | |
241 | ||
242 | %install | |
243 | rm -rf $RPM_BUILD_ROOT | |
244 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/mail | |
245 | install -d $RPM_BUILD_ROOT/etc/{cron.daily,logrotate.d,rc.d/init.d,sysconfig,pam.d,security} | |
246 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man8,/usr/lib} | |
247 | install -d $RPM_BUILD_ROOT%{_var}/{spool/exim/{db,input,msglog},log/{archive,}/exim,mail} | |
248 | install -d $RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir}} | |
249 | install -d $RPM_BUILD_ROOT%{_libdir}/%{name}/modules | |
250 | ||
251 | install build-Linux-*/exim{,_fixdb,_tidydb,_dbmbuild,on.bin,_dumpdb,_lock} \ | |
252 | build-Linux-*/exi{cyclog,next,what} %{SOURCE10} \ | |
253 | build-Linux-*/{exigrep,eximstats,exiqsumm,convert4r4} \ | |
254 | util/unknownuser.sh \ | |
255 | $RPM_BUILD_ROOT%{_bindir} | |
256 | install build-Linux-*/eximon.bin $RPM_BUILD_ROOT%{_bindir} | |
257 | install build-Linux-*/eximon $RPM_BUILD_ROOT%{_bindir} | |
258 | %{?with_dynamic:install build-Linux-*/*/*.so $RPM_BUILD_ROOT%{_libdir}/%{name}/modules} | |
259 | ||
260 | install %{SOURCE5} . | |
261 | install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.daily | |
262 | install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/%{name} | |
263 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} | |
264 | install %{SOURCE11} $RPM_BUILD_ROOT/etc/logrotate.d/%{name} | |
265 | install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/mail/exim.conf | |
266 | install {doc,man}/*.8 $RPM_BUILD_ROOT%{_mandir}/man8 | |
267 | install %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases | |
268 | install %{SOURCE15} $RPM_BUILD_ROOT/etc/pam.d/smtp | |
269 | ||
270 | ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/sendmail | |
271 | ln -sf %{_bindir}/exim $RPM_BUILD_ROOT/usr/lib/sendmail | |
272 | ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/mailq | |
273 | ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/rsmtp | |
274 | ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/rmail | |
275 | ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/runq | |
276 | ||
277 | install %{SOURCE6} $RPM_BUILD_ROOT%{_desktopdir} | |
278 | install %{SOURCE16} $RPM_BUILD_ROOT%{_pixmapsdir} | |
279 | ||
280 | install -d $RPM_BUILD_ROOT%{_includedir}/%{name} | |
281 | install src/{local_scan,store,mytypes}.h $RPM_BUILD_ROOT%{_includedir}/%{name} | |
282 | install build-Linux-*/config.h $RPM_BUILD_ROOT%{_includedir}/%{name} | |
283 | ||
284 | touch $RPM_BUILD_ROOT%{_var}/log/exim/{main,reject,panic,process}.log | |
285 | ||
286 | touch $RPM_BUILD_ROOT/etc/security/blacklist.smtp | |
287 | ||
288 | %clean | |
289 | rm -rf $RPM_BUILD_ROOT | |
290 | ||
291 | %pre | |
292 | %groupadd -g 79 exim | |
293 | %useradd -u 79 -d /var/spool/exim -s /bin/false -c "Exim pseudo user" -g exim exim | |
294 | ||
295 | %post | |
296 | umask 022 | |
297 | /sbin/chkconfig --add %{name} | |
298 | %service %{name} restart "exim daemon" | |
299 | ||
300 | if [ ! -f /etc/mail/mailname ]; then | |
301 | rm -f /etc/mail/mailname && hostname -f > /etc/mail/mailname | |
302 | fi | |
303 | newaliases | |
304 | ||
305 | %preun | |
306 | if [ "$1" = "0" ]; then | |
307 | %service exim stop | |
308 | /sbin/chkconfig --del %{name} | |
309 | fi | |
310 | ||
311 | %postun | |
312 | if [ "$1" = "0" ]; then | |
313 | %userremove exim | |
314 | %groupremove exim | |
315 | fi | |
316 | ||
317 | %files | |
318 | %defattr(644,root,root,755) | |
319 | %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 | |
320 | %doc exim-html-*/doc/html | |
321 | %dir %{_sysconfdir}/mail | |
322 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/exim.conf | |
323 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/aliases | |
324 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/exim | |
325 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/exim | |
326 | %attr(754,root,root) /etc/rc.d/init.d/exim | |
327 | %attr(4755,root,root) %{_bindir}/exim | |
328 | %attr(770,root,exim) %dir %{_var}/spool/exim | |
329 | %attr(750,exim,exim) %dir %{_var}/spool/exim/db | |
330 | %attr(700,exim,root) %dir %{_var}/spool/exim/input | |
331 | %attr(750,exim,root) %dir %{_var}/spool/exim/msglog | |
332 | %attr(755,root,root) %{_bindir}/exim_* | |
333 | %attr(755,root,root) %{_bindir}/exinext | |
334 | %attr(755,root,root) %{_bindir}/exiwhat | |
335 | %attr(755,root,root) %{_bindir}/exicyclog | |
336 | %attr(755,root,root) %{_bindir}/exigrep | |
337 | %attr(755,root,root) %{_bindir}/eximstats | |
338 | %attr(755,root,root) %{_bindir}/exiqsumm | |
339 | %attr(755,root,root) %{_bindir}/unknownuser.sh | |
340 | %attr(755,root,root) %{_bindir}/newaliases | |
341 | %attr(755,root,root) %{_bindir}/convert4r4 | |
342 | %attr(755,root,root) %{_sbindir}/mailq | |
343 | %attr(755,root,root) %{_sbindir}/rmail | |
344 | %attr(755,root,root) %{_sbindir}/rsmtp | |
345 | %attr(755,root,root) %{_sbindir}/runq | |
346 | %attr(755,root,root) %{_sbindir}/sendmail | |
347 | %attr(755,root,root) /usr/lib/sendmail | |
348 | %attr(754,root,root) /etc/cron.daily/exim.cron.db | |
349 | %attr(750,exim,root) %dir %{_var}/log/exim | |
350 | %attr(750,exim,root) %dir %{_var}/log/archive/exim | |
351 | %attr(640,exim,root) %ghost %{_var}/log/exim/* | |
352 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/smtp | |
353 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/security/blacklist.smtp | |
354 | %if %{with dynamic} | |
355 | %dir %{_libdir}/%{name} | |
356 | %dir %{_libdir}/%{name}/modules | |
357 | %{?with_mysql:%attr(755,root,root) %{_libdir}/%{name}/modules/mysql.so} | |
358 | %{?with_pgsql:%attr(755,root,root) %{_libdir}/%{name}/modules/pgsql.so} | |
359 | %{?with_sqlite:%attr(755,root,root) %{_libdir}/%{name}/modules/sqlite.so} | |
360 | %{?with_whoson:%attr(755,root,root) %{_libdir}/%{name}/modules/whoson.so} | |
361 | %endif | |
362 | %{_mandir}/man8/* | |
363 | ||
364 | %files X11 | |
365 | %defattr(644,root,root,755) | |
366 | %attr(755,root,root) %{_bindir}/eximon | |
367 | %attr(755,root,root) %{_bindir}/eximon.bin | |
368 | %{_desktopdir}/eximon.desktop | |
369 | %{_pixmapsdir}/eximon.png | |
370 | ||
371 | %files devel | |
372 | %defattr(644,root,root,755) | |
373 | %{_includedir}/%{name} |