]> git.pld-linux.org Git - packages/exim.git/blob - exim.spec
- merge some translations from CNV.
[packages/exim.git] / exim.spec
1 # Conditional build:
2 # _with_pgsql - build wiht PostgreSQ support
3 # _with_mysql - build with MySQL support
4 # _without_ldap - build without LDAP support
5 # _without_whoson - build without WHOSON support
6
7 Summary:        University of Cambridge Mail Transfer Agent 
8 Summary(pl):    Agent Transferu Poczty Uniwersytetu w Cambridge
9 Summary(pt_BR): Servidor de correio eletrônico exim
10 Name:           exim
11 Version:        3.33
12 Release:        3
13 License:        GPL
14 Group:          Networking/Daemons
15 Group(de):      Netzwerkwesen/Server
16 Group(pl):      Sieciowe/Serwery
17 Source0:        ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/%{name}-%{version}.tar.bz2
18 Source1:        ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/%{name}-texinfo-3.30.tar.bz2
19 Source2:        %{name}.init
20 Source3:        %{name}.cron.db
21 Source4:        %{name}.8
22 Source5:        analyse-log-errors
23 Source6:        %{name}on.desktop
24 Source8:        Makefile-Linux
25 Source9:        %{name}.aliases
26 Source10:       newaliases
27 Source11:       %{name}.logrotate
28 Source12:       %{name}.sysconfig
29 #Source13:      ftp://ftp.cus.cam.ac.uk/pub/software/programs/exim/FAQ.txt.gz
30 Source13:       %{name}-FAQ.txt.gz
31 #Source14:      ftp://ftp.cus.cam.ac.uk/pub/software/programs/exim/config.samples.tar.gz
32 Source14:       %{name}-config.samples.tar.gz
33 Patch0:         %{name}-EDITME.patch
34 Patch1:         %{name}-monitor-EDITME.patch
35 Patch2:         %{name}-texinfo.patch
36 Patch3:         %{name}-use_system_pcre.patch
37 Patch4:         %{name}-Makefile-Default.patch
38 Patch5:         %{name}-conf.patch
39 Patch6:         %{name}-whoson.patch
40 Patch7:         %{name}-whoson-config.patch
41 URL:            http://www.exim.org/
42 %{!?_without_ldap:BuildRequires: openldap-devel >= 2.0.0}
43 %{!?_without_whoson:BuildRequires: whoson-devel}
44 %{?_with_mysql:BuildRequires: mysql-devel}
45 %{?_with_pgsql:BuildRequires: postgresql-devel}
46 BuildRequires:  XFree86-devel
47 BuildRequires:  texinfo
48 BuildRequires:  perl
49 BuildRequires:  pam-devel
50 BuildRequires:  pcre-devel
51 BuildRequires:  db3-devel
52 BuildRequires:  openssl-devel >= 0.9.6a
53 Provides:       smtpdaemon
54 Prereq:         /usr/sbin/useradd
55 Prereq:         /usr/sbin/groupadd
56 Prereq:         /bin/awk
57 Prereq:         /sbin/chkconfig
58 Prereq:         rc-scripts
59 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
60 Obsoletes:      smtpdaemon
61 Obsoletes:      sendmail
62 Obsoletes:      sendmail-cf
63 Obsoletes:      sendmail-doc
64 Obsoletes:      postfix
65 Obsoletes:      zmailer
66 Obsoletes:      smail
67 Obsoletes:      omta
68 Obsoletes:      qmail
69 Obsoletes:      qmail-client
70
71 %description
72 Smail like Mail Transfer Agent with single configuration file.
73 Features: flexible retry algorithms, header & envelope rewriting,
74 multiple deliveries down single connection or multiple deliveries in
75 parallel, regular expressions in configuration parameters, file
76 lookups, supports sender and/or reciever verification, selective
77 relaying, supports virtual domains, built-in mail filtering and can be
78 configured to drop root privilleges when possible.
79
80 %description -l pl
81 Agent transferu poczty (MTA) z pojedynczym plikiem konfiguracyjnym.
82 Jego zalety: ¶wietne algorytmy, mo¿liwo¶æ przepisywania nag³ówków &
83 koperty, wielokrotne dostarczanie poczty podczas jednego po³±czenia
84 lub równoleg³e dostarczanie poczty, wyra¿enia regularne w parametrach
85 konfiguracyjnych, weryfikacja nadawcy i/lub odbiorcy, selektywne
86 relayowanie, wsparcie dla wirtualnych domen, wbudowany system filtrów,
87 mo¿liwo¶æ odrzucania praw roota kiedy jest to mo¿liwe.
88
89 %description -l pt_BR
90 O exim é um agente de transporte de correio eletrônico (MTA),
91 desenvolvido na Universidade de Cambridge para uso em sistemas Unix
92 conectados a Internet. Similar em estilo ao smail 3, suas facilidades
93 são mais extensivas e em particular ele tem opções para verificação do
94 remetente e destinatário, para recusar mensagens de máquinas, redes ou
95 remetentes específicos.
96
97 %package X11
98 Summary:        X11 based Exim administration tool
99 Summary(pl):    Narzêdzia administracyjne exima dla X11
100 Summary(pt_BR): Monitor X11 para o exim
101 Group:          X11/Applications
102 Group(de):      X11/Applikationen
103 Group(pl):      X11/Aplikacje
104 Requires:       applnk
105
106 %description X11
107 X11 based monitor & administration utility for the Exim Mail Transfer
108 Agent.
109
110 %description X11 -l pl
111 Bazuj±ce na X11 narzêdzia dla Exima - monitor i program
112 administracyjny.
113
114 %description -l pt_BR X11
115 O monitor exim é um suplemento opcional ao pacote exim. Ele mostra
116 informações sobre o processamento do exim em uma janela X11. O
117 administrador pode executar uma série de ações de controle a partir
118 desta interface.
119
120 %prep
121 %setup -q -T -b 0
122 %setup -q -T -D -a 1
123 %patch0 -p1
124 %patch1 -p1
125 %patch2 -p0
126 %patch3 -p1
127 %patch4 -p1
128 %{!?_without_whoson:%patch6 -p1}
129
130 install %{SOURCE13} doc/FAQ.txt.gz
131 install %{SOURCE14} doc/config.samples.tar.gz
132
133 install -d Local
134 cp -f src/EDITME Local/Makefile
135 cp -f exim_monitor/EDITME Local/eximon.conf
136
137 %build
138 %{__make} CFLAGS="%{rpmcflags}" \
139         LOOKUP_CDB=yes \
140         %{?_with_mysql:LOOKUP_MYSQL=yes} \
141         %{?_with_pgsql:LOOKUP_PGSQL=yes} \
142         %{!?_without_ldap:LOOKUP_LDAP=yes LDAP_LIB_TYPE=OPENLDAP2} \
143         LOOKUP_LIBS="%{!?_without_ldap:-lldap -llber} %{?_with_mysql:-lmysqlclient} %{?_with_pgsql:-lpq} %{!?_without_whoson:-lwhoson}" \
144         LOOKUP_INCLUDE="%{?_with_mysql:-I/usr/include/mysql} %{?_with_pgsql:-I/usr/include/pgsql}"
145
146 makeinfo exim-texinfo-*/doc/{oview,spec,filter}.texinfo
147
148 %install
149 rm -rf $RPM_BUILD_ROOT
150 install -d $RPM_BUILD_ROOT/etc/{cron.{daily,weekly},logrotate.d,rc.d/init.d,sysconfig,mail} \
151         $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_mandir}/man8,%{_libdir}} \
152         $RPM_BUILD_ROOT%{_var}/{spool/exim/{db,input,msglog},log/{archiv,}/exim,mail} \
153         $RPM_BUILD_ROOT{%{_infodir},/usr/X11R6/bin,%{_applnkdir}/System}
154
155 install build-Linux-pld/exim{,_fixdb,_tidydb,_dbmbuild,on.bin,_dumpdb,_lock} \
156         build-Linux-pld/exinext \
157         build-Linux-pld/exi{cyclog,next,what} %{SOURCE10} \
158         util/{exigrep,eximstats,exiqsumm,exiqsumm,unknownuser.sh,unknownuser.sh} \
159         $RPM_BUILD_ROOT%{_bindir}
160 install build-Linux-pld/eximon.bin $RPM_BUILD_ROOT/usr/X11R6/bin
161 install build-Linux-pld/eximon $RPM_BUILD_ROOT/usr/X11R6/bin
162
163 install %{SOURCE5} .
164 install %{SOURCE3} $RPM_BUILD_ROOT/etc/cron.weekly/
165 install %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
166 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
167 install %{SOURCE11} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
168 install src/configure.default $RPM_BUILD_ROOT%{_sysconfdir}/mail/exim.conf
169 cd $RPM_BUILD_ROOT%{_sysconfdir}/mail
170 patch -p0 < %{PATCH5}
171 %{!?_without_whoson:patch -p0 < %{PATCH7}}
172 cd -
173 install %{SOURCE4} $RPM_BUILD_ROOT%{_mandir}/man8/
174 install %{SOURCE9} $RPM_BUILD_ROOT%{_sysconfdir}/mail/aliases
175 install *.info* $RPM_BUILD_ROOT%{_infodir}/
176
177 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/sendmail
178 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_libdir}/sendmail
179 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/mailq
180 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/rsmtp
181 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/rmail
182 ln -sf %{_bindir}/exim $RPM_BUILD_ROOT%{_sbindir}/runq
183
184 install %{SOURCE6} $RPM_BUILD_ROOT%{_applnkdir}/System
185
186 touch $RPM_BUILD_ROOT%{_var}/log/exim/{main,reject,panic,process}.log
187
188 gzip -9nf README* NOTICE LICENCE analyse-log-errors \
189         doc/{ChangeLog,NewStuff,dbm.discuss.txt,filter.txt,oview.txt,spec.txt} \
190         util/transport-filter.pl
191
192 %clean
193 rm -rf $RPM_BUILD_ROOT
194
195 %pre
196 if [ -n "`/usr/bin/getgid exim`" ]; then
197         if [ "`getgid exim`" != "79" ]; then
198                 echo "Warning: group exim haven't gid=79. Correct this before installing exim" 1>&2
199                 exit 1
200         fi
201 else
202         /usr/sbin/groupadd -g 79 -r -f exim
203 fi
204
205 if [ -n "`/bin/id -u exim 2>/dev/null`" ]; then
206         if [ "`id -u exim`" != "79" ]; then
207                 echo "Warning: user exim doesn't have uid=79. Correct this before installing Exim" 1>&2
208                 exit 1
209         fi
210 else
211         /usr/sbin/useradd -u 79 -r -d /var/spool/exim -s /bin/false -c "Exim pseudo user" -g exim exim 1>&2
212 fi
213
214 %post
215 umask 022
216 /sbin/chkconfig --add %{name}
217 if [ -f /var/lock/subsys/exim ]; then
218         /etc/rc.d/init.d/%{name} restart >&2
219 else
220         echo "Run \"/etc/rc.d/init.d/%{name} start\" to start exim daemon."
221 fi
222
223 if [ ! -f /etc/mail/mailname ]; then
224         rm -f /etc/mail/mailname && hostname -f > /etc/mail/mailname
225         chmod 644 /etc/mail/mailname
226 fi
227 newaliases
228 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
229
230 %preun
231 if [ "$1" = "0" ]; then
232         if [ -f /var/lock/subsys/exim ]; then
233                 /etc/rc.d/init.d/exim stop >&2
234         fi
235         /sbin/chkconfig --del %{name}
236 fi
237
238 %postun
239 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
240 if [ "$1" = "0" ]; then
241         /usr/sbin/userdel exim
242         /usr/sbin/groupdel exim
243 fi
244
245 %files
246 %defattr(644,root,root,755)
247 %doc *.gz doc/*.gz
248 %doc util/*.gz
249 %attr( 644,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/exim.conf
250 %attr( 644,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/mail/aliases
251 %attr( 644,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/exim
252 %attr( 644,root,root) /etc/logrotate.d/exim
253 %attr( 754,root,root) /etc/rc.d/init.d/exim
254 %attr(4755,root,root) %{_bindir}/exim
255 %attr(1777,root,mail) %dir %{_var}/mail
256 %attr( 770,root,exim) %dir %{_var}/spool/exim
257 %attr( 750,exim,exim) %dir %{_var}/spool/exim/db
258 %attr( 700,exim,root) %dir %{_var}/spool/exim/input
259 %attr( 750,exim,root) %dir %{_var}/spool/exim/msglog
260 %attr( 755,root,root) %{_bindir}/exim_*
261 %attr( 755,root,root) %{_bindir}/exinext
262 %attr( 755,root,root) %{_bindir}/exiwhat
263 %attr( 755,root,root) %{_bindir}/exicyclog
264 %attr( 755,root,root) %{_bindir}/exigrep
265 %attr( 755,root,root) %{_bindir}/eximstats
266 %attr( 755,root,root) %{_bindir}/exiqsumm
267 %attr( 755,root,root) %{_bindir}/unknownuser.sh
268 %attr( 755,root,root) %{_bindir}/newaliases
269 %attr( 755,root,root) %{_sbindir}/*
270 %attr( 755,root,root) %{_libdir}/*
271 %attr( 754,root,root) /etc/cron.weekly/exim.cron.db
272 %attr( 750,exim,root) %dir %{_var}/log/exim
273 %attr( 750,exim,root) %dir %{_var}/log/archiv/exim
274 %attr( 640,exim,root) %ghost %{_var}/log/exim/*
275 %{_infodir}/*
276 %{_mandir}/man8/*
277
278 %files X11
279 %defattr(644,root,root,755)
280 %attr(755,root,root) /usr/X11R6/bin/*
281 %{_applnkdir}/System/*
This page took 0.055502 seconds and 4 git commands to generate.