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