]> git.pld-linux.org Git - packages/exim.git/blob - exim.spec
- exiscan_version 4.41-25
[packages/exim.git] / exim.spec
1 # Conditional build:
2 %bcond_without  pgsql   # without PostgreSQL support
3 %bcond_without  mysql   # without MySQL support
4 %bcond_without  whoson  # without whoson support
5 %bcond_without  ldap    # without LDAP support
6 %bcond_without  exiscan # without exiscan support
7 %bcond_without  spf     # without spf support
8 %bcond_without  srs     # without srs support
9 %bcond_with     saexim  # with sa-exim support
10 #
11 %define         exiscan_version 4.41-25
12 %define         saexim_version 3.1
13 Summary:        University of Cambridge Mail Transfer Agent
14 Summary(pl):    Agent Transferu Poczty Uniwersytetu w Cambridge
15 Summary(pt_BR): Servidor de correio eletrônico exim
16 Name:           exim
17 Version:        4.41
18 Release:        6
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:  769c8b03cdefcc98c9707dde965c96f1
24 Source1:        ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/%{name}-texinfo-4.40.tar.bz2
25 # Source1-md5:  cc91bd804ee0f7fd70991e2e6b529033
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 Source8:        http://duncanthrax.net/exiscan-acl/exiscan-acl-%{exiscan_version}.patch.bz2
35 # Source8-md5:  09abdec4413519d827d099fbce7b1edc
36 Source9:        %{name}.aliases
37 Source10:       newaliases
38 Source11:       %{name}.logrotate
39 Source12:       %{name}.sysconfig
40 Source13:       ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/FAQ.txt.bz2
41 # Source13-md5: 339a25b820ed4c5cbd5f9043131568d4
42 Source14:       ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/config.samples.tar.bz2
43 # Source14-md5: 3e8b3f4f231e98b535a63fad7ccce60e
44 Source15:       %{name}4-smtp.pamd
45 Source16:       %{name}on.png
46 Source17:       http://marc.merlins.org/linux/exim/files/sa-exim-%{saexim_version}.tar.gz
47 # Source17-md5: 34892f195384c127f7c40c461a9ef421
48 Patch0:         %{name}4-EDITME.patch
49 Patch1:         %{name}4-monitor-EDITME.patch
50 Patch2:         %{name}4-texinfo.patch
51 Patch3:         %{name}4-use_system_pcre.patch
52 Patch4:         %{name}4-Makefile-Default.patch
53 Patch5:         %{name}4-exiscan-pld.patch
54 URL:            http://www.exim.org/
55 %{?with_ldap:BuildRequires:     openldap-devel >= 2.0.0}
56 %{?with_spf:BuildRequires:      libspf2-devel}
57 %{?with_srs:BuildRequires:      libsrs_alt-devel}
58 %{?with_mysql:BuildRequires:    mysql-devel}
59 %{?with_pgsql:BuildRequires:    postgresql-devel}
60 %{?with_whoson:BuildRequires:   whoson-devel}
61 BuildRequires:  XFree86-devel
62 BuildRequires:  db-devel
63 BuildRequires:  openssl-devel >= 0.9.7d
64 BuildRequires:  pam-devel
65 BuildRequires:  pcre-devel
66 BuildRequires:  perl-devel >= 1:5.6.0
67 BuildRequires:  texinfo
68 PreReq:         rc-scripts
69 Requires(pre):  /bin/id
70 Requires(pre):  /usr/bin/getgid
71 Requires(pre):  /usr/sbin/groupadd
72 Requires(pre):  /usr/sbin/useradd
73 Requires(postun):       /usr/sbin/groupdel
74 Requires(postun):       /usr/sbin/userdel
75 Requires(post): fileutils
76 Requires(post,preun):   /sbin/chkconfig
77 Requires:       pam >= 0.77.3
78 Provides:       smtpdaemon
79 Obsoletes:      courier
80 Obsoletes:      masqmail
81 Obsoletes:      nullmailer
82 Obsoletes:      omta
83 Obsoletes:      postfix
84 Obsoletes:      qmail
85 Obsoletes:      qmail-client
86 Obsoletes:      sendmail
87 Obsoletes:      sendmail-cf
88 Obsoletes:      sendmail-doc
89 Obsoletes:      smail
90 Obsoletes:      smtpdaemon
91 Obsoletes:      ssmtp
92 Obsoletes:      zmailer
93 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
94
95 %description
96 Smail like Mail Transfer Agent with single configuration file.
97 Features: flexible retry algorithms, header & envelope rewriting,
98 multiple deliveries down single connection or multiple deliveries in
99 parallel, regular expressions in configuration parameters, file
100 lookups, supports sender and/or reciever verification, selective
101 relaying, supports virtual domains, built-in mail filtering and can be
102 configured to drop root privilleges when possible.
103
104 %description -l pl
105 Agent transferu poczty (MTA) z pojedynczym plikiem konfiguracyjnym.
106 Jego zalety: ¶wietne algorytmy, mo¿liwo¶æ przepisywania nag³ówków &
107 koperty, wielokrotne dostarczanie poczty podczas jednego po³±czenia
108 lub równoleg³e dostarczanie poczty, wyra¿enia regularne w parametrach
109 konfiguracyjnych, weryfikacja nadawcy i/lub odbiorcy, selektywne
110 relayowanie, wsparcie dla wirtualnych domen, wbudowany system filtrów,
111 mo¿liwo¶æ odrzucania praw roota kiedy jest to mo¿liwe.
112
113 %description -l pt_BR
114 O exim é um agente de transporte de correio eletrônico (MTA),
115 desenvolvido na Universidade de Cambridge para uso em sistemas Unix
116 conectados a Internet. Similar em estilo ao smail 3, suas facilidades
117 são mais extensivas e em particular ele tem opções para verificação do
118 remetente e destinatário, para recusar mensagens de máquinas, redes ou
119 remetentes específicos.
120
121 %package X11
122 Summary:        X11 based Exim administration tool
123 Summary(pl):    Narzêdzia administracyjne exima dla X11
124 Summary(pt_BR): Monitor X11 para o exim
125 Group:          X11/Applications
126
127 %description X11
128 X11 based monitor & administration utility for the Exim Mail Transfer
129 Agent.
130
131 %description X11 -l pl
132 Bazuj±ce na X11 narzêdzia dla Exima - monitor i program
133 administracyjny.
134
135 %description X11 -l pt_BR
136 O monitor exim é um suplemento opcional ao pacote exim. Ele mostra
137 informações sobre o processamento do exim em uma janela X11. O
138 administrador pode executar uma série de ações de controle a partir
139 desta interface.
140
141 %prep
142 %setup -q -a1 -a7
143 %patch0 -p1
144 %patch1 -p1
145 %patch2 -p0
146 %patch3 -p1
147 %patch4 -p1
148 %patch5 -p0
149
150 %{?with_exiscan:test -f %{SOURCE8} || exit 1; bzip2 -d -c %{SOURCE8} | patch -p1 || exit 1}
151 %{?with_saexim:test -f %{SOURCE17} || exit 1; gzip -d -c %{SOURCE17} | tar -x || exit 1}
152
153 install %{SOURCE13} doc/FAQ.txt.bz2
154 install %{SOURCE14} doc/config.samples.tar.bz2
155
156 install -d Local
157 cp -f src/EDITME Local/Makefile
158 cp -f exim_monitor/EDITME Local/eximon.conf
159
160 %build
161
162 %if %{with saexim}
163     cd sa-exim-%{saexim_version}
164     %{__make} -j1 sa-exim.h
165     echo '#define SPAMASSASSIN_CONF "%{_sysconfdir}/mail/spamassassin/local.cf"' >> sa-exim.h
166     cat sa-exim.c > ../src/local_scan.c
167     cat sa-exim.h > ../src/sa-exim.h
168     cd ..
169 %endif
170
171 %{__make} -j1 \
172         CC="%{__cc}" \
173         CFLAGS="%{rpmcflags} %{?with_spf:-DSPF} %{?with_srs:-DSRS}" \
174         LOOKUP_CDB=yes \
175 XLFLAGS=-L%{_prefix}/X11R6/%{_lib} \
176 X11_LD_LIB=%{_prefix}/X11R6/%{_lib} \
177         %{?with_mysql:LOOKUP_MYSQL=yes} \
178         %{?with_pgsql:LOOKUP_PGSQL=yes} \
179         %{?with_whoson:LOOKUP_WHOSON=yes} \
180         %{?with_ldap:LOOKUP_LDAP=yes LDAP_LIB_TYPE=OPENLDAP2} \
181         LOOKUP_LIBS="%{?with_ldap:-lldap -llber} %{?with_mysql:-lmysqlclient} %{?with_pgsql:-lpq} %{?with_whoson:-lwhoson} %{?with_spf:-lspf2} %{?with_srs:-lsrs_alt}" \
182         LOOKUP_INCLUDE="%{?with_mysql:-I%{_includedir}/mysql} %{?with_pgsql:-I%{_includedir}/pgsql}"
183
184 makeinfo --force exim-texinfo-*/doc/*.texinfo
185
186 %install
187 rm -rf $RPM_BUILD_ROOT
188 install -d $RPM_BUILD_ROOT%{_sysconfdir}/mail
189 install -d $RPM_BUILD_ROOT/etc/{cron.{daily,weekly},logrotate.d,rc.d/init.d,sysconfig,pam.d}
190 install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man8,/usr/lib}
191 install -d $RPM_BUILD_ROOT%{_var}/{spool/exim/{db,input,msglog},log/{archiv,}/exim,mail}
192 install -d $RPM_BUILD_ROOT{%{_infodir},%{_prefix}/X11R6/bin,%{_desktopdir},%{_pixmapsdir}}
193
194 install build-Linux-*/exim{,_fixdb,_tidydb,_dbmbuild,on.bin,_dumpdb,_lock} \
195         build-Linux-*/exi{cyclog,next,what} %{SOURCE10} \
196         build-Linux-*/{exigrep,eximstats,exiqsumm,convert4r4} \
197         util/unknownuser.sh \
198         $RPM_BUILD_ROOT%{_bindir}
199 install build-Linux-*/eximon.bin $RPM_BUILD_ROOT%{_prefix}/X11R6/bin
200 install build-Linux-*/eximon $RPM_BUILD_ROOT%{_prefix}/X11R6/bin
201
202 install %{SOURCE5} .
203 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.weekly/
204 install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
205 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
206 install %{SOURCE11} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
207 install %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/mail/exim.conf
208 install {doc,man}/*.8 $RPM_BUILD_ROOT%{_mandir}/man8/
209 install %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases
210 install *.info* $RPM_BUILD_ROOT%{_infodir}/
211 install %{SOURCE15} $RPM_BUILD_ROOT/etc/pam.d/smtp
212
213 %{?with_saexim:install sa-exim-%{saexim_version}/sa-exim.conf $RPM_BUILD_ROOT/%{_sysconfdir}/mail/sa-exim.conf}
214
215 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/sendmail
216 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT/usr/lib/sendmail
217 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/mailq
218 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/rsmtp
219 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/rmail
220 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/runq
221
222 install %{SOURCE6} $RPM_BUILD_ROOT%{_desktopdir}
223 install %{SOURCE16} $RPM_BUILD_ROOT%{_pixmapsdir}
224
225 touch $RPM_BUILD_ROOT%{_var}/log/exim/{main,reject,panic,process}.log
226
227 %clean
228 rm -rf $RPM_BUILD_ROOT
229
230 %pre
231 if [ -n "`/usr/bin/getgid exim`" ]; then
232         if [ "`getgid exim`" != "79" ]; then
233                 echo "Warning: group exim haven't gid=79. Correct this before installing exim" 1>&2
234                 exit 1
235         fi
236 else
237         /usr/sbin/groupadd -g 79 -r -f exim
238 fi
239
240 if [ -n "`/bin/id -u exim 2>/dev/null`" ]; then
241         if [ "`id -u exim`" != "79" ]; then
242                 echo "Warning: user exim doesn't have uid=79. Correct this before installing Exim" 1>&2
243                 exit 1
244         fi
245 else
246         /usr/sbin/useradd -u 79 -r -d /var/spool/exim -s /bin/false -c "Exim pseudo user" -g exim exim 1>&2
247 fi
248
249 %post
250 umask 022
251 /sbin/chkconfig --add %{name}
252 if [ -f /var/lock/subsys/exim ]; then
253         /etc/rc.d/init.d/%{name} restart >&2
254 else
255         echo "Run \"/etc/rc.d/init.d/%{name} start\" to start exim daemon."
256 fi
257
258 if [ ! -f /etc/mail/mailname ]; then
259         rm -f /etc/mail/mailname && hostname -f > /etc/mail/mailname
260         chmod 644 /etc/mail/mailname
261 fi
262 newaliases
263 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
264
265 %preun
266 if [ "$1" = "0" ]; then
267         if [ -f /var/lock/subsys/exim ]; then
268                 /etc/rc.d/init.d/exim stop >&2
269         fi
270         /sbin/chkconfig --del %{name}
271 fi
272
273 %postun
274 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
275 if [ "$1" = "0" ]; then
276         /usr/sbin/userdel exim
277         /usr/sbin/groupdel exim
278 fi
279
280 %triggerpostun -- exim  < 3.90
281 if [ -f /etc/mail/exim.conf ]; then
282         umask 022
283         mv /etc/mail/exim.conf /etc/mail/exim.conf.3
284         /usr/bin/convert4r4 < /etc/mail/exim.conf.3 > /etc/mail/exim.conf
285 fi
286
287 %files
288 %defattr(644,root,root,755)
289 %doc README* NOTICE LICENCE analyse-log-errors doc/{ChangeLog,NewStuff,dbm.discuss.txt,filter.txt,spec.txt,Exim*.upgrade,OptionLists.txt%{?with_exiscan:,exiscan-*.txt}} build-Linux-*/transport-filter.pl
290 %attr( 644,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/exim.conf
291 %{?with_saexim:%attr( 644,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/sa-exim.conf}
292 %attr( 644,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/aliases
293 %attr( 644,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/exim
294 %attr( 644,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/exim
295 %attr( 754,root,root) /etc/rc.d/init.d/exim
296 %attr(4755,root,root) %{_bindir}/exim
297 %attr( 770,root,exim) %dir %{_var}/spool/exim
298 %attr( 750,exim,exim) %dir %{_var}/spool/exim/db
299 %attr( 700,exim,root) %dir %{_var}/spool/exim/input
300 %attr( 750,exim,root) %dir %{_var}/spool/exim/msglog
301 %attr( 755,root,root) %{_bindir}/exim_*
302 %attr( 755,root,root) %{_bindir}/exinext
303 %attr( 755,root,root) %{_bindir}/exiwhat
304 %attr( 755,root,root) %{_bindir}/exicyclog
305 %attr( 755,root,root) %{_bindir}/exigrep
306 %attr( 755,root,root) %{_bindir}/eximstats
307 %attr( 755,root,root) %{_bindir}/exiqsumm
308 %attr( 755,root,root) %{_bindir}/unknownuser.sh
309 %attr( 755,root,root) %{_bindir}/newaliases
310 %attr( 755,root,root) %{_bindir}/convert4r4
311 %attr( 755,root,root) %{_sbindir}/*
312 %attr( 755,root,root) /usr/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 size mtime) /etc/pam.d/smtp
318 %{_infodir}/*
319 %{_mandir}/man8/*
320
321 %files X11
322 %defattr(644,root,root,755)
323 %attr(755,root,root) %{_prefix}/X11R6/bin/*
324 %{_desktopdir}/%{name}on.desktop
325 %{_pixmapsdir}/%{name}on.png
This page took 0.056858 seconds and 4 git commands to generate.