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