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