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