]> git.pld-linux.org Git - packages/exim.git/blob - exim.spec
- rel 3; ability to turn-off spamd loadbalancing and just use fallback
[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  whoson  # without whoson support
6 %bcond_without  sasl    # without SASL
7 %bcond_without  ldap    # without LDAP support
8 %bcond_without  spf     # without spf support
9 %bcond_without  srs     # without srs support
10 %bcond_without  dkeys   # without domainkeys support
11 #
12 Summary:        University of Cambridge Mail Transfer Agent
13 Summary(pl):    Agent Transferu Poczty Uniwersytetu w Cambridge
14 Summary(pt_BR): Servidor de correio eletrônico exim
15 Name:           exim
16 Version:        4.54
17 Release:        3
18 Epoch:          2
19 License:        GPL
20 Group:          Networking/Daemons
21 Source0:        ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/%{name}-%{version}.tar.bz2
22 # Source0-md5:  f3cdf5292f4bbb1ee2de42d4338b3b9f
23 Source1:        ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/%{name}-texinfo-4.50.tar.bz2
24 # Source1-md5:  a12993436e9943083e3ce5b76cf96b11
25 Source2:        %{name}.init
26 Source3:        %{name}.cron.db
27 Source4:        %{name}4.conf
28 Source5:        analyse-log-errors
29 Source6:        %{name}on.desktop
30 # 20021016: http://www.logic.univie.ac.at/~ametzler/debian/exim4manpages/
31 Source7:        %{name}4-man-021016.tar.bz2
32 # Source7-md5:  b552704ebf853a401946038a2b7e8e98
33 Source9:        %{name}.aliases
34 Source10:       newaliases
35 Source11:       %{name}.logrotate
36 Source12:       %{name}.sysconfig
37 Source13:       ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/FAQ.txt.bz2
38 # Source13-md5: ff781bd31fb1d574c8b9d33f4bfd34a7
39 Source14:       ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/config.samples.tar.bz2
40 # Source14-md5: 4b93321938a800caa6127c48ad60a42b
41 Source15:       %{name}4-smtp.pamd
42 Source16:       %{name}on.png
43 Patch0:         %{name}4-EDITME.patch
44 Patch1:         %{name}4-monitor-EDITME.patch
45 Patch2:         %{name}4-texinfo.patch
46 Patch3:         %{name}4-use_system_pcre.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 Patch6:         %{name}-noloadbalance.patch
51 URL:            http://www.exim.org/
52 %{?with_ldap:BuildRequires:     openldap-devel >= 2.0.0}
53 %{?with_spf:BuildRequires:      libspf2-devel >= 1.2.5-2}
54 %{?with_srs:BuildRequires:      libsrs_alt-devel >= 1.0}
55 %{?with_mysql:BuildRequires:    mysql-devel}
56 %{?with_pgsql:BuildRequires:    postgresql-devel}
57 %{?with_whoson:BuildRequires:   whoson-devel}
58 %{?with_sasl:BuildRequires:     cyrus-sasl-devel >= 2.1.0}
59 %{?with_dkeys:BuildRequires:    libdomainkeys-devel >= 0.68}
60 BuildRequires:  XFree86-devel
61 BuildRequires:  db-devel
62 BuildRequires:  openssl-devel >= 0.9.7d
63 BuildRequires:  pam-devel
64 BuildRequires:  pcre-devel
65 BuildRequires:  perl-devel >= 1:5.6.0
66 BuildRequires:  readline-devel
67 BuildRequires:  rpmbuild(macros) >= 1.202
68 BuildRequires:  texinfo
69 Requires:       rc-scripts
70 Requires(pre):  /bin/id
71 Requires(pre):  /usr/bin/getgid
72 Requires(pre):  /usr/sbin/groupadd
73 Requires(pre):  /usr/sbin/useradd
74 Requires(postun):       /usr/sbin/groupdel
75 Requires(postun):       /usr/sbin/userdel
76 Requires(post): fileutils
77 Requires(post): /bin/hostname
78 Requires(post,preun):   /sbin/chkconfig
79 Requires:       pam >= 0.79.0
80 Requires:       perl(DynaLoader) = %(%{__perl} -MDynaLoader -e 'print DynaLoader->VERSION')
81 Provides:       group(exim)
82 Provides:       smtpdaemon
83 Provides:       user(exim)
84 Obsoletes:      courier
85 Obsoletes:      masqmail
86 Obsoletes:      nullmailer
87 Obsoletes:      omta
88 Obsoletes:      postfix
89 Obsoletes:      qmail
90 Obsoletes:      qmail-client
91 Obsoletes:      sendmail
92 Obsoletes:      sendmail-cf
93 Obsoletes:      sendmail-doc
94 Obsoletes:      smail
95 Obsoletes:      smtpdaemon
96 Obsoletes:      ssmtp
97 Obsoletes:      zmailer
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
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
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):    Narzêdzia administracyjne exima dla X11
129 Summary(pt_BR): 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
137 Bazuj±ce na X11 narzêdzia dla Exima - monitor i program
138 administracyjny.
139
140 %description X11 -l pt_BR
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):    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
156 Pliki nag³ówkowe dla Exima.
157
158 %prep
159 %setup -q -a1 -a7
160 %patch0 -p1
161 %patch1 -p1
162 %patch2 -p0
163 %patch3 -p1
164 %patch4 -p1
165 %patch5 -p1
166 %patch6 -p1
167
168 install %{SOURCE13} doc/FAQ.txt.bz2
169 install %{SOURCE14} doc/config.samples.tar.bz2
170
171 install -d Local
172 cp -f src/EDITME Local/Makefile
173 cp -f exim_monitor/EDITME Local/eximon.conf
174
175 %build
176 %{__make} -j1 \
177         %{?debug:FULLECHO=''} \
178         CC="%{__cc}" \
179         CFLAGS="%{rpmcflags} %{?with_spf:-DEXPERIMENTAL_SPF=yes} %{?with_srs:-DEXPERIMENTAL_SRS=yes} %{?with_dkeys:-DEXPERIMENTAL_DOMAINKEYS=yes}" \
180         LOOKUP_CDB=yes \
181         XLFLAGS=-L%{_prefix}/X11R6/%{_lib} \
182         X11_LD_LIB=%{_prefix}/X11R6/%{_lib} \
183         %{?with_mysql:LOOKUP_MYSQL=yes} \
184         %{?with_pgsql:LOOKUP_PGSQL=yes} \
185         %{?with_whoson:LOOKUP_WHOSON=yes} \
186         %{?with_sasl:AUTH_CYRUS_SASL=yes} \
187         %{?with_ldap:LOOKUP_LDAP=yes LDAP_LIB_TYPE=OPENLDAP2} \
188         LOOKUP_LIBS="%{?with_ldap:-lldap -llber} %{?with_mysql:-lmysqlclient} %{?with_pgsql:-lpq} %{?with_whoson:-lwhoson} %{?with_spf:-lspf2} %{?with_srs:-lsrs_alt} %{?with_sasl:-lsasl2} %{?with_dkeys:-ldomainkeys}" \
189         LOOKUP_INCLUDE="%{?with_mysql:-I%{_includedir}/mysql} %{?with_pgsql:-I%{_includedir}/pgsql}"
190
191 makeinfo --force exim-texinfo-*/doc/*.texinfo
192
193 %install
194 rm -rf $RPM_BUILD_ROOT
195 install -d $RPM_BUILD_ROOT%{_sysconfdir}/mail
196 install -d $RPM_BUILD_ROOT/etc/{cron.{daily,weekly},logrotate.d,rc.d/init.d,sysconfig,pam.d}
197 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man8,%{_prefix}/lib}
198 install -d $RPM_BUILD_ROOT%{_var}/{spool/exim/{db,input,msglog},log/{archiv,}/exim,mail}
199 install -d $RPM_BUILD_ROOT{%{_infodir},%{_desktopdir},%{_pixmapsdir}}
200 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}
201
202 install build-Linux-*/exim{,_fixdb,_tidydb,_dbmbuild,on.bin,_dumpdb,_lock} \
203         build-Linux-*/exi{cyclog,next,what} %{SOURCE10} \
204         build-Linux-*/{exigrep,eximstats,exiqsumm,convert4r4} \
205         util/unknownuser.sh \
206         $RPM_BUILD_ROOT%{_bindir}
207 install build-Linux-*/eximon.bin $RPM_BUILD_ROOT%{_bindir}
208 install build-Linux-*/eximon $RPM_BUILD_ROOT%{_bindir}
209
210 install %{SOURCE5} .
211 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.weekly
212 install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
213 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
214 install %{SOURCE11} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
215 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/mail/exim.conf
216 install {doc,man}/*.8 $RPM_BUILD_ROOT%{_mandir}/man8
217 install %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases
218 install *.info* $RPM_BUILD_ROOT%{_infodir}
219 install %{SOURCE15} $RPM_BUILD_ROOT/etc/pam.d/smtp
220
221 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/sendmail
222 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_prefix}/lib/sendmail
223 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/mailq
224 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/rsmtp
225 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/rmail
226 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/runq
227
228 install %{SOURCE6} $RPM_BUILD_ROOT%{_desktopdir}
229 install %{SOURCE16} $RPM_BUILD_ROOT%{_pixmapsdir}
230
231 install -d $RPM_BUILD_ROOT%{_includedir}/%{name}
232 install src/{local_scan.h,store.h,mytypes.h} $RPM_BUILD_ROOT%{_includedir}/%{name}
233
234 touch $RPM_BUILD_ROOT%{_var}/log/exim/{main,reject,panic,process}.log
235
236 %clean
237 rm -rf $RPM_BUILD_ROOT
238
239 %pre
240 %groupadd -g 79 exim
241 %useradd -u 79 -d /var/spool/exim -s /bin/false -c "Exim pseudo user" -g exim exim
242
243 %post
244 umask 022
245 /sbin/chkconfig --add %{name}
246 if [ -f /var/lock/subsys/exim ]; then
247         /etc/rc.d/init.d/%{name} restart >&2
248 else
249         %banner %{name} -e <<EOF
250 Run \"/etc/rc.d/init.d/%{name} start\" to start exim daemon.
251 EOF
252 # vim:"
253 fi
254
255 if [ ! -f /etc/mail/mailname ]; then
256         rm -f /etc/mail/mailname && hostname -f > /etc/mail/mailname
257 fi
258 newaliases
259 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
260
261 %preun
262 if [ "$1" = "0" ]; then
263         if [ -f /var/lock/subsys/exim ]; then
264                 /etc/rc.d/init.d/exim stop >&2
265         fi
266         /sbin/chkconfig --del %{name}
267 fi
268
269 %postun
270 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
271 if [ "$1" = "0" ]; then
272         %userremove exim
273         %groupremove exim
274 fi
275
276 %triggerpostun -- exim  < 3.90
277 if [ -f /etc/mail/exim.conf ]; then
278         umask 022
279         mv /etc/mail/exim.conf /etc/mail/exim.conf.3
280         /usr/bin/convert4r4 < /etc/mail/exim.conf.3 > /etc/mail/exim.conf
281 fi
282
283 %files
284 %defattr(644,root,root,755)
285 %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
286 %dir %{_sysconfdir}/mail
287 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/exim.conf
288 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/aliases
289 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/exim
290 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/exim
291 %attr(754,root,root) /etc/rc.d/init.d/exim
292 %attr(4755,root,root) %{_bindir}/exim
293 %attr(770,root,exim) %dir %{_var}/spool/exim
294 %attr(750,exim,exim) %dir %{_var}/spool/exim/db
295 %attr(700,exim,root) %dir %{_var}/spool/exim/input
296 %attr(750,exim,root) %dir %{_var}/spool/exim/msglog
297 %attr(755,root,root) %{_bindir}/exim_*
298 %attr(755,root,root) %{_bindir}/exinext
299 %attr(755,root,root) %{_bindir}/exiwhat
300 %attr(755,root,root) %{_bindir}/exicyclog
301 %attr(755,root,root) %{_bindir}/exigrep
302 %attr(755,root,root) %{_bindir}/eximstats
303 %attr(755,root,root) %{_bindir}/exiqsumm
304 %attr(755,root,root) %{_bindir}/unknownuser.sh
305 %attr(755,root,root) %{_bindir}/newaliases
306 %attr(755,root,root) %{_bindir}/convert4r4
307 %attr(755,root,root) %{_sbindir}/mailq
308 %attr(755,root,root) %{_sbindir}/rmail
309 %attr(755,root,root) %{_sbindir}/rsmtp
310 %attr(755,root,root) %{_sbindir}/runq
311 %attr(755,root,root) %{_sbindir}/sendmail
312 %attr(755,root,root) %{_prefix}/lib/sendmail
313 %attr(754,root,root) /etc/cron.weekly/exim.cron.db
314 %attr(750,exim,root) %dir %{_var}/log/exim
315 %attr(750,exim,root) %dir %{_var}/log/archiv/exim
316 %attr(640,exim,root) %ghost %{_var}/log/exim/*
317 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/smtp
318 %{_libdir}/%{name}
319 %{_infodir}/*.info*
320 %{_mandir}/man8/*
321
322 %files X11
323 %defattr(644,root,root,755)
324 %attr(755,root,root) %{_bindir}/eximon
325 %attr(755,root,root) %{_bindir}/eximon.bin
326 %{_desktopdir}/eximon.desktop
327 %{_pixmapsdir}/eximon.png
328
329 %files devel
330 %defattr(644,root,root,755)
331 %{_includedir}/%{name}
This page took 0.057936 seconds and 3 git commands to generate.